summaryrefslogtreecommitdiff
path: root/revision.h
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-09-05 21:28:36 -0700
committerJunio C Hamano <junkio@cox.net>2006-09-05 21:28:36 -0700
commit5d6f0935e6df017fcc446e348aebf4da2d210a27 (patch)
tree8f12a6e9a5b5675bf6d02dd4fe08e4a21cfe2ba8 /revision.h
parent0caea90be0e565a923b69df7b32c13cbcf892d6d (diff)
downloadgit-5d6f0935e6df017fcc446e348aebf4da2d210a27.tar.gz
revision.c: allow injecting revision parameters after setup_revisions().
setup_revisions() wants to get all the parameters at once and then postprocesses the resulting revs structure after it is done with them. This code structure is a bit cumbersome to deal with efficiently when we want to inject revision parameters from the side (e.g. read from standard input). Fortunately, the nature of this postprocessing is not affected by revision parameters; they are affected only by flags. So it is Ok to do add_object() after the it returns. This splits out the code that deals with the revision parameter out of the main loop of setup_revisions(), so that we can later call it from elsewhere after it returns. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'revision.h')
-rw-r--r--revision.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/revision.h b/revision.h
index d289781051..c1f71afe6f 100644
--- a/revision.h
+++ b/revision.h
@@ -90,6 +90,8 @@ extern int rev_compare_tree(struct rev_info *, struct tree *t1, struct tree *t2)
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);
+extern int handle_revision_arg(const char *arg, struct rev_info *revs,int flags,int cant_be_filename);
+
extern void prepare_revision_walk(struct rev_info *revs);
extern struct commit *get_revision(struct rev_info *revs);