Re: [PATCH] show-ref: place angle brackets around variables in usage string

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

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

>>> - N_("git show-ref --exclude-existing[=pattern] < ref-list"),
>>> + N_("git show-ref --exclude-existing[=<pattern>] < <ref-list>"),
>>
>> Should the '<' stdin redirection be shown?
>
> Hmm, that actually is an interesting thought,...

Having said all that (i.e. I agree dropping "< $anything" may be a
good idea in general), for this particular command, I suspect that
the feature may have outlived its usefulness.  It was introduced
(silently) in ed9f7c95 (git-fetch: Avoid reading packed refs over
and over again, 2006-12-17) as an optimisation that is very specific
to the way how "git fetch" scripted Porcelain happened to be written
back then.

The way the feature is misdesigned clearly shows that it was not
designed for general consumption---if it were, we would have made
"show-ref" to be usable as a filter even when we are not excluding
anything with "--exclude-existing" option.

Of course, it is OK and definitely a lot safer to keep the "can work
as a filter" feature for possible third-party uses, but if we were
to go that route, it is not too late to extend the machinery so that
"work as a filter" is not tied too closely to "exclude-existing".

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