summaryrefslogtreecommitdiff
path: root/revision.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2007-11-03 18:11:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-11-04 08:54:20 (GMT)
commitcdcefbc971d8fcdd293750af7571d4c715f86964 (patch)
tree32606101107381af6f87615ba23ee9f0547777ad /revision.h
parent23c17d4a4a0e1fc9a5fa347f1fc6be3cf477e543 (diff)
downloadgit-cdcefbc971d8fcdd293750af7571d4c715f86964.zip
git-cdcefbc971d8fcdd293750af7571d4c715f86964.tar.gz
git-cdcefbc971d8fcdd293750af7571d4c715f86964.tar.bz2
Add "--early-output" log flag for interactive GUI use
This adds support for "--early-output[=n]" as a flag to the "git log" family of commands. This allows GUI programs to state that they want to get some output early, in order to be able to show at least something quickly, even if the full output may take longer to generate. If no count is specified, a default count of a hundred commits will be used, although the actual numbr of commits output may be smaller depending on how many commits were actually found in the first tenth of a second (or if *everything* was found before that, in which case no early output will be provided, and only the final list is made available). When the full list is generated, there will be a "Final output:" string prepended to it, regardless of whether any early commits were shown or not, so that the consumer can always know the difference between early output and the final list. 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.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/revision.h b/revision.h
index 1f64576..d8a5a50 100644
--- a/revision.h
+++ b/revision.h
@@ -30,6 +30,8 @@ struct rev_info {
void *prune_data;
prune_fn_t *prune_fn;
+ unsigned int early_output;
+
/* Traversal flags */
unsigned int dense:1,
no_merges:1,
@@ -105,6 +107,8 @@ struct rev_info {
#define REV_TREE_DIFFERENT 2
/* revision.c */
+typedef void (*show_early_output_fn_t)(struct rev_info *, struct commit_list *);
+volatile show_early_output_fn_t show_early_output;
extern void init_revisions(struct rev_info *revs, const char *prefix);
extern int setup_revisions(int argc, const char **argv, struct rev_info *revs, const char *def);