git status -u is mildly astonishing

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

 



Hi list,

Today I found what I thought was a bug in git status:

https://paste.fedoraproject.org/268333/42480833/

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.

The documentation supports this:

       -u[<mode>], --untracked-files[=<mode>]
           Show untracked files.

There is no space here, but it is not obvious that it is *important*
that there is no space here.

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

    git status [<options>...] [--] [<pathspec>...]

Therefore I would argue that -u is behaving differently from other
arguments (especially when considered across all git subcommands) by
only accepting its argument when not separated by a space. This at
least should be explicitly documented, but, preferably, should be
consistent with other arguments and use the -- token as the separator.

-Altreus
--
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]