diff-delta: set size out-parameter to 0 for NULL delta
[gitweb.git] / t / t0410-partial-clone.sh
index ba3887f178b03a71b1ee1d2149429e2ee76814a6..6415063980b49985b25d351f5c0079f44ad92533 100755 (executable)
@@ -349,7 +349,7 @@ test_expect_success 'rev-list stops traversal at promisor commit, tree, and blob
        grep $(git -C repo rev-parse bar) out  # sanity check that some walking was done
 '
 
-test_expect_success 'rev-list accepts missing and promised objects on command line' '
+test_expect_success 'rev-list dies for missing objects on cmd line' '
        rm -rf repo &&
        test_create_repo repo &&
        test_commit -C repo foo &&
@@ -366,7 +366,19 @@ test_expect_success 'rev-list accepts missing and promised objects on command li
 
        git -C repo config core.repositoryformatversion 1 &&
        git -C repo config extensions.partialclone "arbitrary string" &&
-       git -C repo rev-list --exclude-promisor-objects --objects "$COMMIT" "$TREE" "$BLOB"
+
+       for OBJ in "$COMMIT" "$TREE" "$BLOB"; do
+               test_must_fail git -C repo rev-list --objects \
+                       --exclude-promisor-objects "$OBJ" &&
+               test_must_fail git -C repo rev-list --objects-edge-aggressive \
+                       --exclude-promisor-objects "$OBJ" &&
+
+               # Do not die or crash when --ignore-missing is passed.
+               git -C repo rev-list --ignore-missing --objects \
+                       --exclude-promisor-objects "$OBJ" &&
+               git -C repo rev-list --ignore-missing --objects-edge-aggressive \
+                       --exclude-promisor-objects "$OBJ"
+       done
 '
 
 test_expect_success 'gc repacks promisor objects separately from non-promisor objects' '
@@ -480,7 +492,6 @@ test_expect_success 'gc stops traversal when a missing but promised object is re
        ! grep "$TREE_HASH" out
 '
 
-LIB_HTTPD_PORT=12345  # default port, 410, cannot be used as non-root
 . "$TEST_DIRECTORY"/lib-httpd.sh
 start_httpd
 
@@ -507,6 +518,7 @@ test_expect_success 'fetching of missing objects from an HTTP server' '
        git verify-pack --verbose "$IDX" | grep "$HASH"
 '
 
-stop_httpd
+# DO NOT add non-httpd-specific tests here, because the last part of this
+# test script is only executed when httpd is available and enabled.
 
 test_done