All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 0/2] fix error handling in checkout-index
Date: Tue, 27 Oct 2020 16:27:59 -0400	[thread overview]
Message-ID: <20201027202759.GA643305@coredump.intra.peff.net> (raw)
In-Reply-To: <xmqq1rhjcwjk.fsf@gitster.c.googlers.com>

On Tue, Oct 27, 2020 at 12:13:03PM -0700, Junio C Hamano wrote:

> Jeff King <peff@peff.net> writes:
> 
> > While working on another topic, I noticed that "git checkout-index --
> > path" does not propagate errors through its exit code. It has been that
> > way for so long that I almost wondered if it is intentional, but I'm
> > pretty sure it's not. A bit scary, though. :)
> 
> Quite honestly, at this point, I do not think the intention matters
> any more.  If somebody depends on the behaviour and wrote
> 
>     do some thing &&
>     git checkout-index -- $path_that_is_possibly_missing &&
>     do another thing &&
> 
> then this change _will_ be a regression, whether it was originally
> done this way on purpose or not.
> 
> I do not think it is the kind of regression that we should avoid,
> though.  I'd say that we should bite the bullet and fix it, as it
> should also be easy to fix/adjust such a collateral damage.  That
> would make the world a better place in the end.

Right, agreed with all of that. What I meant more with "intentional"
was: is there some really clever reason I was missing that it was done
this way in the first place? And I think the answer is "no", it was just
an oversight.

Whether it is OK to change a plumbing command's behavior is somewhat
orthogonal, but I agree it a bug fix and OK to do here.

-Peff

      reply	other threads:[~2020-10-27 20:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-27  7:30 [PATCH 0/2] fix error handling in checkout-index Jeff King
2020-10-27  7:36 ` [PATCH 1/2] checkout-index: drop error message from empty --stage=all Jeff King
2020-10-27  7:37 ` [PATCH 2/2] checkout-index: propagate errors to exit code Jeff King
2020-10-27 19:13 ` [PATCH 0/2] fix error handling in checkout-index Junio C Hamano
2020-10-27 20:27   ` Jeff King [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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20201027202759.GA643305@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.