Re: [PATCH v2 2/4] run_builtin(): save "-h" detection result for later use

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

 



2010/10/22 Junio C Hamano <gitster@xxxxxxxxx>:
> Nguyán ThÃi Ngác Duy <pclouds@xxxxxxxxx> writes:
>
>> When run_builtin() sees "-h" as the first argument, it assumes:
>>
>> Â- this is the call for help usage
>> Â- the real git command will only print help usage then exit
>>
>> So it skips all setup in this case. ÂUnfortunately, some commands do
>> other things before calling parse_options(), which is often where the
>> help usage is printed. ÂSome of those things may try to access the
>> repository unnecessarily. If a repository is broken, the command may
>> die() before it prints help usage, not really helpful.
>
> What does die() message say in that case? ÂIf it says "your repository is
> broken", that may be more useful than giving a help message. ÂI dunno.

I should have written "if repository access is broken" (i.e. .git has
not been found, then somewhere access to .git is requested and .git is
set up automatically). But I'm chasing a ghost here. And the impact to
"-h" is probably nothing (how can accessing a wrong .git impacts a
static help string?). I'll take the series back. There are more
important things to work on than this.
--
Duy
--
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]