git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 0/2] fix error handling in checkout-index
Date: Tue, 27 Oct 2020 12:13:03 -0700	[thread overview]
Message-ID: <xmqq1rhjcwjk.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <20201027073000.GA3651896@coredump.intra.peff.net> (Jeff King's message of "Tue, 27 Oct 2020 03:30:00 -0400")

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.

Thanks.

>   [1/2]: checkout-index: drop error message from empty --stage=all
>   [2/2]: checkout-index: propagate errors to exit code
>
>  builtin/checkout-index.c        | 16 ++++++++++++++--
>  t/t2004-checkout-cache-temp.sh  | 10 +++++++++-
>  t/t2006-checkout-index-basic.sh | 11 +++++++++++
>  3 files changed, 34 insertions(+), 3 deletions(-)
>
> -Peff

  parent reply	other threads:[~2020-10-27 19:14 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 ` Junio C Hamano [this message]
2020-10-27 20:27   ` [PATCH 0/2] fix error handling in checkout-index Jeff King

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=xmqq1rhjcwjk.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).