archive mirror
 help / color / mirror / Atom feed
From: Taylor Blau <>
To: Jeff King <>
Cc:, Greg Pflaum <>
Subject: Re: [PATCH] clone: clean up directory after transport_fetch_refs() failure
Date: Wed, 19 May 2021 10:30:29 -0400	[thread overview]
Message-ID: <YKUhBdO1KSiLwqOZ@nand.local> (raw)
In-Reply-To: <>

On Wed, May 19, 2021 at 07:17:15AM -0400, Jeff King wrote:
> One obvious option to fix this is to reorder the end of the function to
> set the flag first, before cleanup code, and put the label between them.
> But we can observe another small bug: the error return from
> transport_fetch_refs() is generally "-1", and we propagate that to the
> return value of cmd_clone(), which ultimately becomes the exit code of
> the process. And we try to avoid transmitting negative values via exit
> codes (only the low 8 bits are passed along as an unsigned value, though
> in practice for "-1" this at least retains the property that it's
> non-zero).
> Instead, let's just die(). That makes us consistent with rest of the
> code in the function. It does add a new "fatal:" line to the output, but
> I'd argue that's a good thing:

This reasoning makes sense to me, and thanks for cleaning this up.

    Reviewed-by: Taylor Blau <>


      reply	other threads:[~2021-05-19 14:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19 11:17 Jeff King
2021-05-19 14:30 ` Taylor Blau [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YKUhBdO1KSiLwqOZ@nand.local \ \ \ \ \
    --subject='Re: [PATCH] clone: clean up directory after transport_fetch_refs() failure' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).