summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ab7d707)
raw | patch | inline | side by side (parent: ab7d707)
author | Junio C Hamano <gitster@pobox.com> | |
Wed, 5 Dec 2007 05:58:42 +0000 (21:58 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 5 Dec 2007 05:58:42 +0000 (21:58 -0800) |
"git pull/fetch" that gets explicit refspecs from the command line should
not update configured tracking refs.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
not update configured tracking refs.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5510-fetch.sh | patch | blob | history |
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index 46a9c4d95cf889990f2e6387a9838a55642bbe64..02882c1e4bdcef725b3575ccee6fb298f01c21b4 100755 (executable)
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
'
+test_expect_success 'explicit fetch should not update tracking' '
+
+ cd "$D" &&
+ git branch -f side &&
+ (
+ cd three &&
+ o=$(git rev-parse --verify refs/remotes/origin/master) &&
+ git fetch origin master &&
+ n=$(git rev-parse --verify refs/remotes/origin/master) &&
+ test "$o" = "$n" &&
+ ! git rev-parse --verify refs/remotes/origin/side
+ )
+'
+
+test_expect_success 'explicit pull should not update tracking' '
+
+ cd "$D" &&
+ git branch -f side &&
+ (
+ cd three &&
+ o=$(git rev-parse --verify refs/remotes/origin/master) &&
+ git pull origin master &&
+ n=$(git rev-parse --verify refs/remotes/origin/master) &&
+ test "$o" = "$n" &&
+ ! git rev-parse --verify refs/remotes/origin/side
+ )
+'
+
+test_expect_success 'configured fetch updates tracking' '
+
+ cd "$D" &&
+ git branch -f side &&
+ (
+ cd three &&
+ o=$(git rev-parse --verify refs/remotes/origin/master) &&
+ git fetch origin &&
+ n=$(git rev-parse --verify refs/remotes/origin/master) &&
+ test "$o" != "$n" &&
+ git rev-parse --verify refs/remotes/origin/side
+ )
+'
+
test_done