2011년 8월 22일 월요일

How to use 'git diff' on specific commit

Sometimes we might need to create 'diff' file for specific commit(s) and forward it to reviewers.
I also sometimes don't understand why they let me do it because they can but I understand there are a lot of patches for them to review.

Anyway, this is very simple to achieve it.
We just need to know commit-id on each patch.
We can use 'git log' for that.

For example, git shows patches like below when we type 'git log'.
$ git log
+++
commit commit-id1
Author Someone
Date Someday
Blur...blur..

commit commit-id2
Author Someone
Date Someday
Blur...blur..

...
+++

If we want to know diffs on commit-id1, we can do like below.
$ git diff commit-id1 commit-id2
In some cases, we can extract diffs to a file like below.
$ git diff commit-id1 commit-id2 > diff.txt

Hope this helps you.

2011년 8월 2일 화요일

How to exclude multiple patterns in use of doxygen

I usually separate public and private used API in different directories.
But, things aren't likely so when it comes to a massive project.

Anyway, my current work was creating doxygen result and public/private header files were mixed together. :(
So it is clear that I had to exclude private header files from result.

What I did is:
1. Created configure file as doxygen website denoted.
2. Open it with editor program.
3. Find 'EXCLUDE_PATTERNS'.
4. Add patterns with wildcard character.

That's it.
Please note that when you need to add more than two patterns, use space between them.
For example, when you need to exclude with pattern 'hello' and 'world', configure file will be like below.

EXCLUDE_PATTERNS = *hello* *world*

Hope this helps you.