Re: [PATCH v2 9/9] fetch: allow explicit --refmap to override configuration
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 5, 2014, 18:36 UTC
- Message-ID
- <xmqqy4xbrynr.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <539090AD.9040100@xiplink.com>
Marc Branchaud <marcnarc@xiplink.com> 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 +puinstead 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/pubut there may be more useful scenarios other people can come up with ;-).