]> git.droids-corp.org - git-central.git/blobdiff - tests/t3200-server-post-receive-assign-commit-numbers.sh
Append to a separate "commitnumbers" to avoid race conditions.
[git-central.git] / tests / t3200-server-post-receive-assign-commit-numbers.sh
index 6e76cd69e3687a8506c370d193cd0e6c6fb967e9..4f8f9248c8ad39777a6794a97db27a5d57ab9e95 100644 (file)
@@ -25,8 +25,8 @@ test_expect_success 'assign one new commit' '
        git push origin master &&
        git fetch &&
 
-       test "$(git rev-parse HEAD)" = "$(git rev-parse r/0)"
-       test "$(git describe --tags)" = "r/0"
+       test "$(git rev-parse HEAD)" = "$(git rev-parse r/1)"
+       test "$(git describe --tags)" = "r/1"
 '
 
 test_expect_success 'assign two new commits' '
@@ -37,11 +37,11 @@ test_expect_success 'assign two new commits' '
        git push origin master &&
        git fetch &&
 
-       test "$(git rev-parse HEAD)" = "$(git rev-parse r/2)"
-       test "$(git describe --tags)" = "r/2"
+       test "$(git rev-parse HEAD)" = "$(git rev-parse r/3)"
+       test "$(git describe --tags)" = "r/3"
 
-       test "$(git rev-parse HEAD^)" = "$(git rev-parse r/1)"
-       test "$(git describe --tags HEAD^)" = "r/1"
+       test "$(git rev-parse HEAD^)" = "$(git rev-parse r/2)"
+       test "$(git describe --tags HEAD^)" = "r/2"
 '
 
 test_expect_success 'pushing commits to a new branch does not reassign' '
@@ -50,7 +50,7 @@ test_expect_success 'pushing commits to a new branch does not reassign' '
        git push origin topica &&
        git fetch &&
 
-       ! git rev-parse r/3
+       ! git rev-parse r/4
 '
 
 test_done