summaryrefslogtreecommitdiff
path: root/revision.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2007-11-04 12:12:05 -0800
committerJunio C Hamano <gitster@pobox.com>2007-11-05 14:28:53 -0800
commit252a7c02354a3e2825cfde3c5053a04acc07be9c (patch)
tree0a0d349a0299800c1791a32771d664f87eee20ae /revision.h
parentcdcefbc971d8fcdd293750af7571d4c715f86964 (diff)
downloadgit-252a7c02354a3e2825cfde3c5053a04acc07be9c.tar.gz
Enhance --early-output format
This makes --early-output a bit more advanced, and actually makes it generate multiple "Final output:" headers as it updates things asynchronously. I realize that the "Final output:" line is now illogical, since it's not really final until it also says "done", but It now _always_ generates a "Final output:" header in front of any commit list, and that output header gives you a *guess* at the maximum number of commits available. However, it should be noted that the guess can be completely off: I do a reasonable job estimating it, but it is not meant to be exact. So what happens is that you may get output like this: - at 0.1 seconds: Final output: 2 incomplete .. 2 commits listed .. - half a second later: Final output: 33 incomplete .. 33 commits listed .. - another half a second after that: Final output: 71 incomplete .. 71 commits listed .. - another half second later: Final output: 136 incomplete .. 100 commits listed: we hit the --early-output limit, and .. will only output 100 commits, and after this you'll not .. see an "incomplete" report any more since you got as much .. early output as you asked for! - .. and then finally: Final output: 73106 done .. all the commits .. The above is a real-life scenario on my current kernel tree after having flushed all the caches. Tested with the experimental gitk patch that Paul sent out, and by looking at the actual log output (and verifying that my commit count guesses actually match real life fairly well). 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.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/revision.h b/revision.h
index d8a5a5021f..2232247be4 100644
--- a/revision.h
+++ b/revision.h
@@ -133,4 +133,12 @@ extern void add_object(struct object *obj,
extern void add_pending_object(struct rev_info *revs, struct object *obj, const char *name);
+enum commit_action {
+ commit_ignore,
+ commit_show,
+ commit_error
+};
+
+extern enum commit_action simplify_commit(struct rev_info *revs, struct commit *commit);
+
#endif