fix simple deepening of a repo
[gitweb.git] / t / t5500-fetch-pack.sh
index c450f33f333e6f1c367f8f350dfd78f8f44a0fee..ea5a4ed3b230e259bcf81bb6c6e5f2370fa14205 100755 (executable)
@@ -147,7 +147,35 @@ test_expect_success "clone shallow object count (part 2)" '
 test_expect_success "fsck in shallow repo" \
        "(cd shallow; git fsck --full)"
 
-#test_done; exit
+test_expect_success 'simple fetch in shallow repo' '
+       (
+               cd shallow &&
+               git fetch
+       )
+'
+
+test_expect_success 'no changes expected' '
+       (
+               cd shallow &&
+               git count-objects -v
+       ) > count.shallow.2 &&
+       cmp count.shallow count.shallow.2
+'
+
+test_expect_success 'fetch same depth in shallow repo' '
+       (
+               cd shallow &&
+               git fetch --depth=2
+       )
+'
+
+test_expect_success 'no changes expected' '
+       (
+               cd shallow &&
+               git count-objects -v
+       ) > count.shallow.3 &&
+       cmp count.shallow count.shallow.3
+'
 
 add B66 $B65
 add B67 $B66
@@ -179,4 +207,21 @@ test_expect_success "clone shallow object count" \
 test_expect_success "pull in shallow repo with missing merge base" \
        "(cd shallow && test_must_fail git pull --depth 4 .. A)"
 
+test_expect_success 'additional simple shallow deepenings' '
+       (
+               cd shallow &&
+               git fetch --depth=8 &&
+               git fetch --depth=10 &&
+               git fetch --depth=11
+       )
+'
+
+test_expect_success 'clone shallow object count' '
+       (
+               cd shallow &&
+               git count-objects -v
+       ) > count.shallow &&
+       grep "^count: 52" count.shallow
+'
+
 test_done