Re: [PATCH] Allow 'git cmd -h' outside of repository

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

 



Hi,

On Thu, 28 Aug 2008, SZEDER Gábor wrote:

> Printing usage strings of git commands should obviously not depend on 
> the command being run inside a git repository.  However, in case of a 
> command requiring a repository, the command line options are parsed only 
> after it is ensured that the command was started inside a repository, 
> resulting in a 'fatal: Not a git repository' if 'git cmd -h' wasn't 
> executed inside a repository.
> 
> To get around this issue, we will check early for the presence of '-h'
> option, and skip ensuring that the command is run inside a repository.

You miss the fact that "git grep -h" does not mean "show usage".  Oh, and 
"git ls-remote -h" neither.  Three times's a charm: "git show-ref -h" does 
not show the help either.

I am also not quite certain if we should not just tout "git help <cmd>" as 
the official way to request help.

Ciao,
Dscho

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

  Powered by Linux