]> git.ipfire.org Git - thirdparty/git.git/blobdiff - fetch-pack.c
Merge branch 'jt/promisor-pack-fix'
[thirdparty/git.git] / fetch-pack.c
index 7f20eca4f81ce401f951361ce59e1be6aa31cd67..d467edc24edeabd9f819003a8ddd3d1a6d497c47 100644 (file)
@@ -866,13 +866,16 @@ static int get_pack(struct fetch_pack_args *args,
                         * have this responsibility.
                         */
                        args->check_self_contained_and_connected = 0;
-               /*
-                * If we're obtaining the filename of a lockfile, we'll use
-                * that filename to write a .promisor file with more
-                * information below. If not, we need index-pack to do it for
-                * us.
-                */
-               if (!(do_keep && pack_lockfiles) && args->from_promisor)
+
+               if (args->from_promisor)
+                       /*
+                        * write_promisor_file() may be called afterwards but
+                        * we still need index-pack to know that this is a
+                        * promisor pack. For example, if transfer.fsckobjects
+                        * is true, index-pack needs to know that .gitmodules
+                        * is a promisor object (so that it won't complain if
+                        * it is missing).
+                        */
                        strvec_push(&cmd.args, "--promisor");
        }
        else {