Bug#462557: [PATCH] Let 'git -h' show usage without a git dir

2009-11-08 Thread Jonathan Nieder
Junio C Hamano wrote: > Jonathan Nieder writes: > >> +/* >> + * Let RUN_SETUP, USE_PAGER, and NEED_WORK_TREE take effect even if >> + * passed the -h option. >> + */ >> +#define H_IS_NOT_HELP (1<<3) > > Yuck. Let's think of a way to avoid this ugliness. Thank you. :) > So I think the ri

Bug#462557: [PATCH] Let 'git -h' show usage without a git dir

2009-11-08 Thread Junio C Hamano
Jonathan Nieder writes: > diff --git a/git.c b/git.c > index bd2c5fe..bfa9518 100644 > --- a/git.c > +++ b/git.c > @@ -220,6 +220,11 @@ const char git_version_string[] = GIT_VERSION; > * RUN_SETUP for reading from the configuration file. > */ > #define NEED_WORK_TREE (1<<2) > +/* > + *

Bug#462557: [PATCH] Let 'git -h' show usage without a git dir

2009-11-07 Thread Jonathan Nieder
Hi, Gerfried Fuchs wrote: > I really wonder why "git -h" depends on being inside a > repository. I noticed it with "git diff -h" (add, branch does that, too): > > #v+ > ~/git> git tag -h > usage: git-tag [-n []] -l [] | [-a | -s | -u ] [-f | -d > | -v] [-m | -F ] [] > ~/git> cd > ~> git tag