From: Junio C Hamano <hidden> Date: 2016-08-11 20:43:43
Andy Parkins [off-list ref] writes:
On Sunday 2006, November 26 00:48, Johannes Schindelin wrote:
quoted
This hunk is wrong: "git-repo-config remote.bla.fetch b" will _overwrite_
remoter.bla.fetch. To avoid that, you have to use "git repo-config
remote.bla.fetch b ^$". (The last argument is a regular expression which
has to be matched by the value-to-be-oreplaced.)
This is in git-clone; the config is empty. What is there to overwrite?
The entry you wrote in the previous iteration in the same loop,
perhaps?
From: Andy Parkins <hidden> Date: 2016-08-11 19:21:05
Rather than use a separate config .git/remotes/ for remote shortcuts, this
patch adds the analogous definitions to .git/config using git-repo-config
calls.
For example what was previously .git/remotes/origin
URL: proto://host/path
Pull: refs/heads/master:refs/heads/origin
Is now added to .git/config as
[remote "origin"]
url = proto://host/path
fetch = refs/heads/master:refs/heads/origin
Signed-off-by: Andy Parkins <redacted>
---
Oops; you're absolutely right. I'd not realised that it was the add operation
that needed the special syntax rather than the replace.
git-clone.sh | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
You do not need the "^$" here: this _is_ the first entry. I would even
argue that this _has_ to replace whatever might be there (could be
introduced by some bogus templates, for example), since the first fetch
entry has a special meaning for pull.
Ciao,
Dscho
From: Andy Parkins <hidden> Date: 2016-08-11 20:33:38
Rather than use a separate config .git/remotes/ for remote shortcuts, this
patch adds the analagous definitions to .git/config using git-repo-config
calls.
For example what was previously .git/remotes/origin
URL: proto://host/path
Pull: refs/heads/master:refs/heads/origin
Is now added to .git/config as
[remote "origin"]
url = proto://host/path
fetch = refs/heads/master:refs/heads/origin
Signed-off-by: Andy Parkins <redacted>
---
You're absolutely correct; fixed. This patch replaces the previous (again).
git-clone.sh | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)