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.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, 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 4CD181F464 for ; Mon, 25 Nov 2019 16:11:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728773AbfKYQLE (ORCPT ); Mon, 25 Nov 2019 11:11:04 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:34791 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728721AbfKYQLE (ORCPT ); Mon, 25 Nov 2019 11:11:04 -0500 Received: by mail-wm1-f67.google.com with SMTP id j18so242017wmk.1 for ; Mon, 25 Nov 2019 08:11:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2+wIXxkvBdL3rmoyv/DvwVx8nb1MKasdOzLDTXjy9+Q=; b=JXbOG1q3nlksvZistP/OrtB5b0D8uThS8LjfeosWfW5ASNOsQtwHid0krNPx46m4Wm ETRK+e9QJbTwkhb+GhYL952ByPAIfDq6Db3ZgJ98RiWHq8vFXf9r3dltEHgNqWBwFj+v aaX6Wjt1KSUQi//PXkSvjQVmtoio9rLHEItS7DAT6Kk/c7ofSWVebRR4hfcO21MShAYW ipgA+sUHG3Xg7FmZgJNBiotajEHPnQ76bOSu9vING8jaV/IAzFANxHcyQY7HWGM5ksbO r5qNGbxgZWfJ/J6eBrAnLJFgn3TACE/MT2jjb5CXC6txqRnePDXD2wkrC9TMV7ReUlFd ueoA== X-Gm-Message-State: APjAAAWsjZ2AwBVkzJvL/8F6fKlojhwgD3QFrLv4YHWPgDRfYjv5+fPX Md3Q3wiKCcX4ugMXt5xQ7h3DwcQ5GsfouL2Ty7Lfhlen X-Google-Smtp-Source: APXvYqwRo8prds28RQewjHK+3idwidhAMhP18KCjvhFDLX6YOsL4P5xilfJ9v1h4Tgr8RkTmF4x9uZ8SrwajffKwE9E= X-Received: by 2002:a7b:c94c:: with SMTP id i12mr25788360wml.95.1574698260529; Mon, 25 Nov 2019 08:11:00 -0800 (PST) MIME-Version: 1.0 References: <037f2b2975e06847443aef46939e3c712053dedf.1574451783.git.gitgitgadget@gmail.com> <340859a7-5cc4-f641-818d-fcedbf29a2a6@gmail.com> <94573071-556b-caae-b159-40c168a08f44@gmail.com> <43bdadd2-9ea9-4e50-1f47-ec18e0db4794@gmail.com> In-Reply-To: From: Eric Sunshine Date: Mon, 25 Nov 2019 11:10:49 -0500 Message-ID: Subject: Re: [PATCH v2 1/1] sequencer: fix empty commit check when amending To: Johannes Schindelin Cc: Phillip Wood , Junio C Hamano , Phillip Wood via GitGitGadget , Git List Content-Type: text/plain; charset="UTF-8" Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Mon, Nov 25, 2019 at 10:54 AM Johannes Schindelin wrote: > On Mon, 25 Nov 2019, Phillip Wood wrote: > > On 25/11/2019 03:00, Junio C Hamano wrote: > > > That "git rm -rf ." scares me, though. > > > > I know I'm not too keen on it my self but we need to empty the worktree and > > index if we're going to switch to an unborn branch > > How about `git worktree --orphan does-not-exist unborn`? git-worktree doesn't presently recognize --orphan, though it would be nice if it did. In fact, I clearly was thinking of --orphan (along with -b, -B, and --detach), when I wrote the implementation, as can be seen from the commentary in one of the original patches[1]. That --orphan never got added was either due to an oversight or it was one of those "we'll add it when someone actually needs it" deals. [1]: https://lore.kernel.org/git/1436573146-3893-11-git-send-email-sunshine@sunshineco.com/