Re: support comma-separated fetch specs list?

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

 



On Wed, 4 Nov 2020 at 13:41, Junio C Hamano <gitster@xxxxxxxxx> wrote:
>
> ryenus <ryenus@xxxxxxxxx> writes:
>
> > It's nice to have negative ref spec support with 2.29 release, so now
> > we can have
> >
> > ```
> > [remote "origin"]
> >   fetch = +refs/heads/*:refs/remotes/origin/*
> >   fetch = ^refs/heads/gh-pages
> > ```
> >
> > What about having all the fetch specs put together in one comma-separated list?
> > Like this:
> >
> > ```
> > [remote "origin"]
> >   fetch = +refs/heads/*:refs/remotes/origin/*,^refs/heads/gh-pages
> > ```
>
> I thought comma was a valid character that you can have in refnames,
> so no, I do not think it would fly without breaking existing users.
>
> What problem are you trying to solve?

I guess the problem is mainly about intuition? Since comma-separated
lists are everywhere.

Personally I never thought about using comma in refnames, or even knew
it's allowed.

Well, now I know because, after skimming through the 2.29 release notes,
I tried out the negative refspec feature in a repo where I'd like to
exclude the gh-pages branch. But somehow I appended a comma and the
negative refspec to the existing fetch line, and expected it to work,
then, oops, I got dozens of those refnames with commas, and had to go
inside the .git dir and managed the clean up all the mess. And that's
for sure and nice and hard lesson :-)

Maybe the cause is also my ignorance or lack of carefulness to read the
docs, but searching for "comma separated list" in Git manual would
return hundreds of results:
https://www.google.com/search?q=%22comma+separated%22+list+site%3Agit-scm.com

So I guess it's fair to expect it to work in the fetch spec as well?



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

  Powered by Linux