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:
-rw-r--r--builtin-remote.c1
-rwxr-xr-xt/t5505-remote.sh10
2 files changed, 11 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);
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
index af2d077792..48ff2d424d 100755
--- a/t/t5505-remote.sh
+++ b/t/t5505-remote.sh
@@ -77,6 +77,16 @@ test_expect_success 'add another remote' '
)
'
+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 &&