diff options
author | Junio C Hamano <junkio@cox.net> | 2006-09-23 14:40:17 +0400 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-09-24 11:13:49 +0400 |
commit | 7be1d62c6f6b322d826d145762db0050057aeb69 (patch) | |
tree | e3efee8e987b430a7586d76915ed16eaef6575b2 /t | |
parent | 648ad18f5077295c4317f0784b29e09d2c0bac93 (diff) |
Add t5510 to test per branch configuration affecting git-fetch.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't')
-rwxr-xr-x | t/t5510-fetch.sh | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh new file mode 100755 index 0000000000..e71581a95d --- /dev/null +++ b/t/t5510-fetch.sh @@ -0,0 +1,44 @@ +#!/bin/sh +# Copyright (c) 2006, Junio C Hamano. + +test_description='Per branch config variables affects "git fetch". + +' + +. ./test-lib.sh + +D=`pwd` + +test_expect_success setup ' + echo >file original && + git add file && + git commit -a -m original' + +test_expect_success "clone and setup child repos" ' + git clone . one && + cd one && + echo >file updated by one && + git commit -a -m "updated by one" && + cd .. && + git clone . two && + cd two && + git repo-config branch.master.remote one && + { + echo "URL: ../one/.git/" + echo "Pull: refs/heads/master:refs/heads/one" + } >.git/remotes/one +' + +test_expect_success "fetch test" ' + cd "$D" && + echo >file updated by origin && + git commit -a -m "updated by origin" && + cd two && + git fetch && + test -f .git/refs/heads/one && + mine=`git rev-parse refs/heads/one` && + his=`cd ../one && git rev-parse refs/heads/master` && + test "z$mine" = "z$his" +' + +test_done |