Re: [PATCH] Show usage string for 'git http-push -h'

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

 



Hi,

On Sun, Nov 8, 2009 at 3:26 PM, Jonathan Nieder <jrnieder@xxxxxxxxx> 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 <arg> 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
--
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]