summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f8aae12)
raw | patch | inline | side by side (parent: f8aae12)
author | Jeff King <peff@peff.net> | |
Tue, 22 Apr 2008 11:11:13 +0000 (07:11 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 25 Apr 2008 05:30:31 +0000 (22:30 -0700) |
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>
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>
builtin-remote.c | patch | blob | history | |
t/t5505-remote.sh | patch | blob | history |
diff --git a/builtin-remote.c b/builtin-remote.c
index 8fe31dbd9af2833f4dc6c3e93b9179f20d2a1d66..4149f3b3ce4bed091200fdff539e459aa39fb06d 100644 (file)
--- a/builtin-remote.c
+++ b/builtin-remote.c
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);
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
index af2d077792c108a9125c73d1e4194f2532cb5156..48ff2d424d1587bde388422da874feb3d55cbf0d 100755 (executable)
--- a/t/t5505-remote.sh
+++ b/t/t5505-remote.sh
)
'
+test_expect_success 'remote forces tracking branches' '
+(
+ cd test &&
+ case `git config remote.second.fetch` in
+ +*) true ;;
+ *) false ;;
+ esac
+)
+'
+
test_expect_success 'remove remote' '
(
cd test &&