]> git.ipfire.org Git - thirdparty/git.git/commit - revision.c
revision.c: allow injecting revision parameters after setup_revisions().
authorJunio C Hamano <junkio@cox.net>
Wed, 6 Sep 2006 04:28:36 +0000 (21:28 -0700)
committerJunio C Hamano <junkio@cox.net>
Wed, 6 Sep 2006 04:28:36 +0000 (21:28 -0700)
commit5d6f0935e6df017fcc446e348aebf4da2d210a27
tree8f12a6e9a5b5675bf6d02dd4fe08e4a21cfe2ba8
parent0caea90be0e565a923b69df7b32c13cbcf892d6d
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>
revision.c
revision.h