Re: git status -u is mildly astonishing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alastair McGowan-Douglas <altreus@xxxxxxxx> writes:

> It seemed that the argument to -u was being ignored. It turns out that
> 'no' was not actually being considered an argument to -u in the first
> place.

-u takes an optional argument. We can't consider the command-line
argument following u as its argument, because that would mean

  git status -u --null

would be read as

  git status -u=--null

> The usage string implies that -- is used to disambiguate path specs
> from option arguments

Yes, but the problem here is not path specs Vs options, but anything Vs
argument of the previous option.

> Therefore I would argue that -u is behaving differently from other
> arguments (especially when considered across all git subcommands)

This is because you have options with non-optional argument in mind, or
options that have no short version.

If I grep the source correctly, the only options accepting a short
version and an optional string argument are "{merge,am,commit,revert}
-S", "grep -O" and "status -u", which behave consistantly.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]