From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 0CBBA1FF9C for ; Tue, 27 Oct 2020 07:30:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2507692AbgJ0HaB (ORCPT ); Tue, 27 Oct 2020 03:30:01 -0400 Received: from cloud.peff.net ([104.130.231.41]:38308 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2507689AbgJ0HaB (ORCPT ); Tue, 27 Oct 2020 03:30:01 -0400 Received: (qmail 14372 invoked by uid 109); 27 Oct 2020 07:30:00 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Tue, 27 Oct 2020 07:30:00 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 15127 invoked by uid 111); 27 Oct 2020 07:30:00 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Tue, 27 Oct 2020 03:30:00 -0400 Authentication-Results: peff.net; auth=none Date: Tue, 27 Oct 2020 03:30:00 -0400 From: Jeff King To: git@vger.kernel.org Subject: [PATCH 0/2] fix error handling in checkout-index Message-ID: <20201027073000.GA3651896@coredump.intra.peff.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org 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. :) [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