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

Re: [PATCH 2/2] submodule-helper: fix indexing in clone retry error reporting path

From
Stefan Beller <sbeller@google.com>
Date
Jul 22, 2016, 20:00 UTC
Message-ID
<CAGZ79kaoxo9qM-r9nNzG8GV4aCfun4RaK8jpsdSgbyix1bJBFg@mail.gmail.com>
In-Reply-To
<xmqq60rxa1sl.fsf@gitster.mtv.corp.google.com>
On Fri, Jul 22, 2016 at 12:52 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 9 quoted lines
> Stefan Beller <sbeller@google.com> writes:
>
>> The approach to tests is different though. I like yours better than mine,
>> as it doesn't add more tests, but strengthens existing tests.
>
> So... are you retracting
> http://thread.gmane.org/gmane.comp.version-control.git/299995 and
> instead giving an Ack to these two?
>
I like this series better
* for the approach
* for the tests
* for the commit message
So I do think this should be applied instead of what I sent.

I am tempted to send a squash proposal like: (broken whitespaces)

diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index 6f6d67a..77be97e 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -796,6 +796,8 @@ static int update_clone_task_finished(int result,
  return 0;
  } else {
  idx -= suc->list.nr;
+ if (idx >= suc->failed_clones_nr)
+ die("BUG: idx too large???");
  ce  = suc->failed_clones[idx];
  strbuf_addf(err, _("Failed to clone '%s' a second time, aborting"),
     ce->name);
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 9 in “git-submodule: forward exit code of git-submodule--helper more faithfully”
  1. 1/2 git-submodule: forward exit code of git-submodule--helper more faithfullyJohannes Sixt, Jul 22, 2016
  2. 2/2 submodule-helper: fix indexing in clone retry error reporting pathJohannes Sixt, Jul 22, 2016
  3. Stefan BellerJul 22, 2016
  4. Junio C HamanoJul 22, 2016
  5. Stefan BellerJul 22, 2016
  6. Junio C HamanoJul 22, 2016
  7. Stefan BellerJul 22, 2016
  8. Junio C HamanoJul 22, 2016
  9. Stefan BellerJul 22, 2016

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.