diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-29 10:28:25 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-06-29 12:32:51 -0700 |
commit | b8e8db281cea9641253233a2bf8d01ab1f908abe (patch) | |
tree | 70f88a15d03585f1f50964789874f98ce3110dab /revision.h | |
parent | 4f2b15ce88b70dd9e269517a9903864393ca873b (diff) | |
download | git-b8e8db281cea9641253233a2bf8d01ab1f908abe.tar.gz |
git log: add '--merges' flag to match '--no-merges'
I do various statistics on git, and one of the things I look at is merges,
because they are often interesting events to count ("how many merges vs
how much 'real development'" kind of statistics). And you can do it with
some fairly straightforward scripting, ie
git rev-list --parents HEAD |
grep ' .* ' |
git diff-tree --always -s --pretty=oneline --stdin |
less -S
will do it.
But I finally got irritated with the fact that we can skip merges with
'--no-merges', but we can't do the trivial reverse operation.
So this just adds a '--merges' flag that _only_ shows merges. Now you can
do the above with just a
git log --merges --pretty=oneline
which is a lot simpler. It also means that we automatically get a lot of
statistics for free, eg
git shortlog -ns --merges
does exactly what you'd want it to do.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'revision.h')
-rw-r--r-- | revision.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/revision.h b/revision.h index 227164cf70..fb74492714 100644 --- a/revision.h +++ b/revision.h @@ -36,6 +36,7 @@ struct rev_info { unsigned int dense:1, prune:1, no_merges:1, + merges_only:1, no_walk:1, show_all:1, remove_empty_trees:1, |