From: Linus Torvalds Date: Tue, 23 Aug 2005 17:07:31 GMT Subject: Re: git-rev-parse question. Message-ID: In-Reply-To: <7v7jedulli.fsf@assigned-by-dhcp.cox.net> On Tue, 23 Aug 2005, Junio C Hamano wrote: > > I have been looking at what git-rev-parse does and could not > figure out a way to convince it to give me only arguments with > a '-' prefix. Gaah. Understandable. It got broken during some cleanup. Try this trivial patch, it should work better. NOTE! The behaviour of "--" for git-rev-parse is somewhat unclear. Right now it prints it out with "--flags", which is probably wrong. Linus --- Subject: Fix git-rev-parse --default and --flags handling This makes the argument to --default and any --flags arguments should up correctly. Signed-off-by: Linus Torvalds --- diff --git a/rev-parse.c b/rev-parse.c --- a/rev-parse.c +++ b/rev-parse.c @@ -107,7 +107,7 @@ static void show_arg(char *arg) if (do_rev_argument && is_rev_argument(arg)) show_rev_arg(arg); else - show_norev(arg); + show(arg); } static void show_default(void) @@ -122,7 +122,7 @@ static void show_default(void) show_rev(NORMAL, sha1, s); return; } - show_arg(s); + show(s); } }