aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorSanti Béjar <sbejar@gmail.com>2006-09-23 22:55:35 +0200
committerJunio C Hamano <junkio@cox.net>2006-09-24 02:00:21 -0700
commit6cc7c36d5e2fd89be596a164bcc2afede9d855d3 (patch)
tree4cb22bf44c322bd027ca06a8e7a575c070b8cbbb /t
parent5372806a849cf117596b1f7c8c7d512c519f8092 (diff)
downloadgit-6cc7c36d5e2fd89be596a164bcc2afede9d855d3.tar.gz
git-6cc7c36d5e2fd89be596a164bcc2afede9d855d3.tar.xz
Add test for the default merges in fetch.
[jc: with minor fix-ups] Signed-off-by: Santi Béjar <sbejar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't')
-rwxr-xr-xt/t5510-fetch.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index e71581a95..df0ae4811 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -27,6 +27,16 @@ test_expect_success "clone and setup child repos" '
echo "URL: ../one/.git/"
echo "Pull: refs/heads/master:refs/heads/one"
} >.git/remotes/one
+ cd .. &&
+ git clone . three &&
+ cd three &&
+ git repo-config branch.master.remote two &&
+ git repo-config branch.master.merge refs/heads/one &&
+ {
+ echo "URL: ../two/.git/"
+ echo "Pull: refs/heads/master:refs/heads/two"
+ echo "Pull: refs/heads/one:refs/heads/one"
+ } >.git/remotes/two
'
test_expect_success "fetch test" '
@@ -41,4 +51,19 @@ test_expect_success "fetch test" '
test "z$mine" = "z$his"
'
+test_expect_success "fetch test for-merge" '
+ cd "$D" &&
+ cd three &&
+ git fetch &&
+ test -f .git/refs/heads/two &&
+ test -f .git/refs/heads/one &&
+ master_in_two=`cd ../two && git rev-parse master` &&
+ one_in_two=`cd ../two && git rev-parse one` &&
+ {
+ echo "$master_in_two not-for-merge"
+ echo "$one_in_two "
+ } >expected &&
+ cut -f -2 .git/FETCH_HEAD >actual &&
+ diff expected actual'
+
test_done