]> git.ipfire.org Git - thirdparty/git.git/blobdiff - fetch-pack.c
p4 unshelve: fix "Not a valid object name HEAD0" on Windows
[thirdparty/git.git] / fetch-pack.c
index 08b3b356faeabdeeff90918142f7225ce5460e8c..812be15d7e568522973227bb939343d94c008ceb 100644 (file)
@@ -1290,6 +1290,8 @@ static void receive_shallow_info(struct fetch_pack_args *args,
                setup_alternate_shallow(&shallow_lock, &alternate_shallow_file,
                                        NULL);
                args->deepen = 1;
+       } else {
+               alternate_shallow_file = NULL;
        }
 }
 
@@ -1514,6 +1516,7 @@ static void update_shallow(struct fetch_pack_args *args,
                        rollback_lock_file(&shallow_lock);
                } else
                        commit_lock_file(&shallow_lock);
+               alternate_shallow_file = NULL;
                return;
        }
 
@@ -1537,6 +1540,7 @@ static void update_shallow(struct fetch_pack_args *args,
                                                &alternate_shallow_file,
                                                &extra);
                        commit_lock_file(&shallow_lock);
+                       alternate_shallow_file = NULL;
                }
                oid_array_clear(&extra);
                return;
@@ -1576,6 +1580,7 @@ static void update_shallow(struct fetch_pack_args *args,
                commit_lock_file(&shallow_lock);
                oid_array_clear(&extra);
                oid_array_clear(&ref);
+               alternate_shallow_file = NULL;
                return;
        }