]> asedeno.scripts.mit.edu Git - git.git/blobdiff - t/t5501-post-upload-pack.sh
Merge branch 'ef/msys-imap'
[git.git] / t / t5501-post-upload-pack.sh
index 47ee7b5039a02d0bc5ca3a3ada305ac860d3aaa8..d89fb51bad36acd9affc862a5086674aad5847d9 100755 (executable)
@@ -29,7 +29,9 @@ test_expect_success initial '
        ) &&
        want=$(sed -n "s/^want //p" "$LOGFILE") &&
        test "$want" = "$(git rev-parse --verify B)" &&
-       ! grep "^have " "$LOGFILE"
+       ! grep "^have " "$LOGFILE" &&
+       kind=$(sed -n "s/^kind //p" "$LOGFILE") &&
+       test "$kind" = fetch
 '
 
 test_expect_success second '
@@ -43,7 +45,25 @@ test_expect_success second '
        want=$(sed -n "s/^want //p" "$LOGFILE") &&
        test "$want" = "$(git rev-parse --verify C)" &&
        have=$(sed -n "s/^have //p" "$LOGFILE") &&
-       test "$have" = "$(git rev-parse --verify B)"
+       test "$have" = "$(git rev-parse --verify B)" &&
+       kind=$(sed -n "s/^kind //p" "$LOGFILE") &&
+       test "$kind" = fetch
+'
+
+test_expect_success all '
+       rm -fr sub &&
+       HERE=$(pwd) &&
+       git init sub &&
+       (
+               cd sub &&
+               git clone "file://$HERE/.git" new
+       ) &&
+       sed -n "s/^want //p" "$LOGFILE" | sort >actual &&
+       git rev-parse A B C | sort >expect &&
+       test_cmp expect actual &&
+       ! grep "^have " "$LOGFILE" &&
+       kind=$(sed -n "s/^kind //p" "$LOGFILE") &&
+       test "$kind" = clone
 '
 
 test_done