Re: [PATCH v2 9/9] fetch: allow explicit --refmap to override configuration

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

 



Marc Branchaud <marcnarc@xxxxxxxxxxx> writes:

> I don't have any objection to the option per se.  But I do wonder if there's
> a need to add yet another knob to git just for completeness.  Has anyone ever
> needed this?

It is not a good yardstick, as everybody has survived without it
since Git's inception.  The right question to ask is: would it help
new use patterns, or improve existing use patterns?

Two possible scenarios I can think of offhand are

 * using an empty refmap to ensure that your "fetch" this time is
   really ephemeral without affecting the longer-term configured
   remote-tracking branches

 * grabbing only a few selected branches out of hundreds, e.g.

   $ git fetch https://github.com/gitster/git \
       --refmap=refs/heads/*:refs/remotes/jch/* maint master next +pu

   instead of having to spell its long-hand

   $ git fetch https://github.com/gitster/git \
       refs/heads/maint:refs/remotes/jch/maint \
       refs/heads/master:refs/remotes/jch/master \
       refs/heads/next:refs/remotes/jch/next \
       +refs/heads/pu:refs/remotes/jch/pu

but there may be more useful scenarios other people can come up
with ;-).
--
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]