fetch-pack: clear alternate shallow in one more place
authorbrian m. carlson <sandals@crustytoothpaste.net>
Wed, 6 Feb 2019 23:59:37 +0000 (23:59 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 7 Feb 2019 02:50:49 +0000 (18:50 -0800)
The previous one did not clear the variable in one codepath,
but we should aim to be complete.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
[jc: made a reroll into incremental, as the previous one already is
in the next branch]
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fetch-pack.c
index 2d76287674f035b3534ae31934f577c472a9b90d..a92621a388303cd5fa4a56e2b3a7cddc3d96e236 100644 (file)
@@ -1272,6 +1272,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;
        }
 }