Re: Potential problems with url.<base>.insteadOf

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

 



El vie, 26 ago 2022 a las 9:09, Andreas Schwab
(<schwab@xxxxxxxxxxxxxx>) escribió:
>
> On Aug 26 2022, Javier Mora wrote:
>
> > Well, now I have a problem.  If I do:
> >
> > git config url.'http://example.com/'.insteadOf 'http://example.org/'
> > git config url.'http://example.com/'.insteadOf 'http://example.net/'
>
> git config --add url.'http://example.com/'.insteadOf 'http://example.net/'

Well, that was embarrassing...
My bad; I didn't know about the `--add` option (nor that gitconfig
supported multi-value options, for that matter, but that's on me for
not reading the whole manpage).
Maybe the manpage section on `insteadOf` should mention that it's a
multi-value option, but I see that this is not a bug as I thought it
was.  (If anything, a not-very-intuitive feature, but that's a
different matter.)

One minor issue I still see is the fact that adding the same insteadOf
key-value pair multiple times will result in the same line being added
multiple times unless you explicitly delete it first; there doesn't
seem to be an easy way to "add key-value pair if it doesn't exist
yet".  (The closest seems to be `--replace-all`, but that complicates
things a bit.)




[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