diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-02-09 14:02:07 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-02-13 15:59:26 -0800 |
commit | 3131b713013f06285cad3ffdcc61f417ac4ba158 (patch) | |
tree | b431106812e10a3ab9dab43ec044bfdd48223cf6 /revision.h | |
parent | aa8d53ec387a7baf72ab5e3a91c35bb5bf20eb4d (diff) | |
download | git-3131b713013f06285cad3ffdcc61f417ac4ba158.tar.gz |
Add "--show-all" revision walker flag for debugging
It's really not very easy to visualize the commit walker, because - on
purpose - it obvously doesn't show the uninteresting commits!
This adds a "--show-all" flag to the revision walker, which will make
it show uninteresting commits too, and they'll have a '^' in front of
them (it also fixes a logic error for !verbose_header for boundary
commits - we should show the '-' even if left_right isn't shown).
A separate patch to gitk to teach it the new '^' was sent
to paulus. With the change in place, it actually is interesting
even for the cases that git doesn't have any problems with, ie
for the kernel you can do:
gitk -d --show-all v2.6.24..
and you see just how far down it has to parse things to see it all. The
use of "-d" is a good idea, since the date-ordered toposort is much better
at showing why it goes deep down (ie the date of some of those commits
after 2.6.24 is much older, because they were merged from trees that
weren't rebased).
So I think this is a useful feature even for non-debugging - just to
visualize what git does internally more.
When it actually breaks out due to the "everybody_uninteresting()"
case, it adds the uninteresting commits (both the one it's looking at
now, and the list of pending ones) to the list
This way, we really list *all* the commits we've looked at.
Because we now end up listing commits we may not even have been parsed
at all "show_log" and "show_commit" need to protect against commits
that don't have a commit buffer entry.
That second part is debatable just how it should work. Maybe we shouldn't
show such entries at all (with this patch those entries do get shown, they
just don't get any message shown with them). But I think this is a useful
case.
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 8572315954..b5f01f8309 100644 --- a/revision.h +++ b/revision.h @@ -33,6 +33,7 @@ struct rev_info { prune:1, no_merges:1, no_walk:1, + show_all:1, remove_empty_trees:1, simplify_history:1, lifo:1, |