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-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 7A5421F619 for ; Wed, 11 Mar 2020 19:27:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730944AbgCKT1V (ORCPT ); Wed, 11 Mar 2020 15:27:21 -0400 Received: from cloud.peff.net ([104.130.231.41]:36736 "HELO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1730705AbgCKT1V (ORCPT ); Wed, 11 Mar 2020 15:27:21 -0400 Received: (qmail 3559 invoked by uid 109); 11 Mar 2020 19:27:21 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with SMTP; Wed, 11 Mar 2020 19:27:21 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 22312 invoked by uid 111); 11 Mar 2020 19:36:42 -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; Wed, 11 Mar 2020 15:36:42 -0400 Authentication-Results: peff.net; auth=none Date: Wed, 11 Mar 2020 15:27:20 -0400 From: Jeff King To: Junio C Hamano Cc: Elijah Newren via GitGitGadget , Phillip Wood , git@vger.kernel.org, Elijah Newren Subject: Re: [PATCH 1/2] sequencer: clear CHERRY_PICK_HEAD upon dropping a become-empty commit Message-ID: <20200311192720.GB27978@coredump.intra.peff.net> References: <132f769adb0a34e74b6c237ff84bf8b624ea0d9f.1583903621.git.gitgitgadget@gmail.com> <94eec36b-581a-17eb-7aeb-2d24c90b8e73@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Wed, Mar 11, 2020 at 11:38:18AM -0700, Junio C Hamano wrote: > >> } else if (allow == 2) { > >> drop_commit = 1; > >> + unlink(git_path_cherry_pick_head(r)); > > When this fails for whatever reason, do we need to do something > special? The same question for MERGE_MSG Phillip mentioned. I don't think there's much we _can_ do. The other call-sites seem to just ignore failures. I suspect turning those into unlink_or_warn() would be a good idea (and should be safe; it treats ENOENT as a noop, so anything it reports should be an actual error worthy of the user's attention). But probably it would make sense to do that consistently for all of those calls, and that doesn't need to be part of the 2.26 fixup. -Peff