Re: [PATCH 3/3] fetch: optionally store the current remote information in the config
From: sean <hidden>
Date: 2016-06-15 22:42:24
On Sun, 30 Apr 2006 19:09:18 +0200 (CEST) Johannes Schindelin [off-list ref] wrote:
quoted
Which head does git-pull then use to merge, all of them?The first one.
Which can be confusing since you can only specify one "first one" in a remotes file (or .git/config) yet you can pull while having any random local branch being checkout out, each with a different merge branch being appropriate.
You are right. But you are also wrong. The patch uses git-repo-config --get remote.$nick.url which fails if there are more than one matching line. Note that "--get-all" is used to get _all_ remote.$nick.pull lines... But of course, Linus "built git-push in" so that multiple urls are allowed and handled. It is probably confusing, if you can push but cannot fetch with the same remote information... But then, I fail to see how you could possibly specify the refspecs for the different urls.
Yeah, I was speaking only of git push, but see you were speaking of fetch. Anyway, thanks for helping me understand your proposal, it seems flexible enough to handle just about any case one might want to throw at it. Cheers, Sean