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

Re: [PATCH] pack-protocol.txt: accept error packets in any context

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 29, 2018, 07:49 UTC
Message-ID
<xmqq1s74nx1n.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<xmqqh8g3t7gm.fsf@gitster-ct.c.googlers.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 13 quoted lines
>> diff --git a/connect.c b/connect.c
>> index 24281b608..458906e60 100644
>> --- a/connect.c
>> +++ b/connect.c
>> @@ -306,8 +306,6 @@ struct ref **get_remote_heads(struct packet_reader *reader,
>>  			die_initial_contact(1);
>>  		case PACKET_READ_NORMAL:
>>  			len = reader->pktlen;
>> -			if (len > 4 && skip_prefix(reader->line, "ERR ", &arg))
>> -				die(_("remote error: %s"), arg);
>>  			break;
>>  		case PACKET_READ_FLUSH:
>>  			state = EXPECTING_DONE;

This breaks build by not removing the decl of arg while removing the last user of that variable in the function.

 connect.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/connect.c b/connect.c
index 458906e60d..4813f005ab 100644
--- a/connect.c
+++ b/connect.c
@@ -296,7 +296,6 @@ struct ref **get_remote_heads(struct packet_reader *reader,
 	struct ref **orig_list = list;
 	int len = 0;
 	enum get_remote_heads_state state = EXPECTING_FIRST_REF;
-	const char *arg;
 
 	*list = NULL;
 
-- 
2.20.0-rc1-10-g7068cbc4ab
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 7 in “pack-protocol.txt: accept error packets in any context”
  1. pack-protocol.txt: accept error packets in any contextMasaya Suzuki, Nov 27, 2018
  2. Junio C HamanoNov 27, 2018
  3. Junio C HamanoNov 29, 2018
  4. Junio C HamanoNov 29, 2018
  5. Masaya SuzukiNov 29, 2018
  6. Junio C HamanoNov 30, 2018
  7. Stefan BellerDec 3, 2018

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.