git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] fetch-pack: clear alternate shallow when complete

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 7, 2019, 02:53 UTC
Message-ID
<xmqqzhr8qpfl.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<xmqq4l9gs49w.fsf@gitster-ct.c.googlers.com>
Junio C Hamano <gitster@pobox.com> writes:
>> The patch looks good to me.
>
> Thanks, all.

Oops, spoke a bit too fast. As the previous one is already in 'next', let's do this instead.

-- >8 --
From: "brian m. carlson" <sandals@crustytoothpaste.net>
Date: Wed, 6 Feb 2019 23:59:37 +0000
Subject: [PATCH] fetch-pack: clear alternate shallow in one more place

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 | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/fetch-pack.c b/fetch-pack.c
index 2d76287674..a92621a388 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -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;
 	}
 }
 
-- 
2.20.1-519-g8feddda32c
Previous: Junio C HamanoNext: brian m. carlson
Message 12 of 13 in “t5702 failing under ASan on master”
  1. brian m. carlsonJan 30, 2019
  2. Duy NguyenJan 30, 2019
  3. brian m. carlsonJan 30, 2019
  4. Junio C HamanoJan 31, 2019
  5. fetch-pack: clear alternate shallow when completebrian m. carlson, Feb 4, 2019
  6. Duy NguyenFeb 4, 2019
  7. Jonathan TanFeb 5, 2019
  8. brian m. carlsonFeb 6, 2019
  9. fetch-pack: clear alternate shallow when completebrian m. carlson, Feb 6, 2019
  10. Duy NguyenFeb 7, 2019
  11. Junio C HamanoFeb 7, 2019
  12. Junio C HamanoFeb 7, 2019
  13. brian m. carlsonFeb 7, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.