Re: [PATCH v4 5/5] fetch: reduce duplicate in ref update status lines with placeholder

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

 



On Sun, Jun 26, 2016 at 1:58 AM, Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> wrote:
> In the "remote -> local" line, if either ref is a substring of the
> other, the common part in the other string is replaced with "$". For
> example
>
>     abc                -> origin/abc
>     refs/pull/123/head -> pull/123
>
> become
>
>     abc         -> origin/$
>     refs/$/head -> pull/123

Bikeshedding...

I think I recall in an earlier iteration that you asked for opinions
about '$', but don't recall if there were responses. Have you
considered '*' rather than '$'?

In my brain, at least, '$' is associated so strongly with regex that
"origin/$" is interpreted automatically as anchoring "origin/" at the
end of string, and "refs/$/head" just feels weird.

On the other hand, given the familiarity of shell globbing, "origin/*"
and "refs/*/head" feel quite natural and intuitive.

> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>
> ---
> diff --git a/Documentation/git-fetch.txt b/Documentation/git-fetch.txt
> @@ -116,6 +116,11 @@ representing the status of a single ref. Each line is of the form:
> +In compact output mode, if either entire `<from>` or `<to>` is found
> +in the other string, it will be substituted with `$` in the other
> +string. or example, `master -> origin/master` becomes

s/or/For/

> +`master -> origin/$`.
--
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]