From: Tay Ray Chuan Date: Mon, 09 Nov 2009 08:52:48 GMT Subject: Re: [PATCH] Show usage string for 'git http-push -h' Message-ID: In-Reply-To: <20091108072604.GA21367@progeny.tock> Hi, On Sun, Nov 8, 2009 at 3:26 PM, Jonathan Nieder wrote: > @@ -1792,6 +1792,11 @@ int main(int argc, char **argv) > >        git_extract_argv0_path(argv[0]); > > +       if (argc == 2 && !strcmp(argv[1], "-h")) { > +               fprintf(stderr, "usage: %s\n", http_push_usage); > +               return 0; > +       } > + >        setup_git_directory(); > >        repo = xcalloc(sizeof(*repo), 1); just curious, I'm wondering why isn't the check for "-h" done in the argv loop later on? I see this being done already in the builtins diff, log, ls-remote and update-index. Also, unlike grep, -h is not an option we're looking out for, so I'm not sure if we should allow the user to mix -h with a valid set of arguments (which is what Johnathan's patch would allow). -- Cheers, Ray Chuan