Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2008-04-22 15:11:13 +0400
committerJunio C Hamano <gitster@pobox.com>2008-04-25 09:30:31 +0400
commit1ce89cc4bb18b0e66f7073562d6634f6a9841335 (patch)
tree13dce1f6404c0d9a759d29cc7902e0ea7b3915b9 /builtin-remote.c
parentf8aae120345f511e59bb008e8de2a8f6e65cf377 (diff)
remote: create fetch config lines with '+'
Since git-remote always uses remote tracking branches, it should be safe to always force updates of those branches. I.e., we should generate fetch = +refs/heads/*:refs/remotes/$remote/* instead of fetch = refs/heads/*:refs/remotes/$remote/* This was the behavior of the perl version, which seems to have been lost in the C rewrite. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-remote.c')
-rw-r--r--builtin-remote.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin-remote.c b/builtin-remote.c
index 8fe31dbd9a..4149f3b3ce 100644
--- a/builtin-remote.c
+++ b/builtin-remote.c
@@ -105,6 +105,7 @@ static int add(int argc, const char **argv)
struct path_list_item *item = track.items + i;
strbuf_reset(&buf2);
+ strbuf_addch(&buf2, '+');
if (mirror)
strbuf_addf(&buf2, "refs/%s:refs/%s",
item->path, item->path);