threads / bug / 44139

Bug? Short command line options

Subject: Bug? Short command line options

## tl;dr

2 messages between Sep 22, 2016 and Sep 23, 2016.

replies: 1people: 2as markdown or json

Anatoly Borodin· Sep 22, 2016, 19:03 UTC · lore
Hi All,
is there a good reason why
	git fetch -vpnf
works like
	git fetch -v -p -n -f
and
	
	git commit -avem msg
works like
	git commit -a -v -e -m msg
etc etc, but
	git log -wWp
says
	fatal: unrecognized argument: -wWp
?
-- 
Mit freundlichen Grüßen,
Anatoly Borodin
Jeff King· Sep 23, 2016, 04:47 UTC · re: Anatoly Borodin · lore

Re: Bug? Short command line options

On Thu, Sep 22, 2016 at 07:03:00PM +0000, Anatoly Borodin wrote:
Show 23 quoted lines
> is there a good reason why
> 
> 	git fetch -vpnf
> 
> works like
> 
> 	git fetch -v -p -n -f
> 
> and
> 	
> 	git commit -avem msg
> 
> works like
> 
> 	git commit -a -v -e -m msg
> 
> etc etc, but
> 
> 	git log -wWp
> 
> says
> 
> 	fatal: unrecognized argument: -wWp

Yes. The reason is that the arguments to git-log are passed to the revision.c parser, which predates our parse_options() infrastructure, and does not understand bundled options.

It could be updated to use parse_options(), but nobody has done so yet.
-Peff

← back to recent threads