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,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 5C3F7211B3 for ; Tue, 4 Dec 2018 00:45:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726011AbeLDApX (ORCPT ); Mon, 3 Dec 2018 19:45:23 -0500 Received: from mail-vs1-f66.google.com ([209.85.217.66]:41120 "EHLO mail-vs1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725943AbeLDApX (ORCPT ); Mon, 3 Dec 2018 19:45:23 -0500 Received: by mail-vs1-f66.google.com with SMTP id t17so8753878vsc.8 for ; Mon, 03 Dec 2018 16:45:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=27stdBQ68/bqG3jg4WWb4BE9hJ4QL0EycPlAGtYEgvs=; b=uFdsJpslUqL3KiOEjGImaEPVa7cZHpwL6VCQWbfjtY4nJHvutsiOYonT7eBj9M/Chs Q2Zpen8WWG2Uj9/VjRLQrLwjrzhYxHbPX57ktwYp5WvKvstCpzvW/vILYDLH9LaWhnjl qTO411TubA0dc71t4fHa055dVMH7QoZ495Gc7hIncnHKAhfPe/1qFdhelyvtZGRuaWsn zbkHb+4p93F36r0RvZzfgfZPeewU++3RiVepmabKCPoiyWHtFJst2XJQbtJxNF3TMEiw Z0gK/UdhIT1iT+I9vm0kYonWj9ELBO5ZKk5K5fahrCZfa/bAiekMhE2/Fu4puAIMKNGs F+zw== 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:content-transfer-encoding; bh=27stdBQ68/bqG3jg4WWb4BE9hJ4QL0EycPlAGtYEgvs=; b=ELyy+Z+i856ijhrBLqgMh33DGtLKD+CX/AAnw/G6QdLpuc2ACiTjg9pHHgq8JHHO+9 xhFPYnITAJODxMPX3LPM/pVH+aSwpa1YigrMkewdxPuQf5fXvNiztFgTwoCOSGrmkXCG 0CHDPhvlKgskyEFlwEgjLRTOcCJHCQWO/qa3jSBeEABU83dDWLue0SIneICEu71Bf9TA yu4wKUiSOc/7UC7o91GpWhwnt/oQ6oQ63+9eTEkMjlorrgndwjnU5kLaEBNBWSImH9Li 3mJVvRUr9LtwHGh9j+9XIOrrCQg8+dsOMYg9uWWyLYsxSj1irBhFSTa17H2VirfnTHWt tpfA== X-Gm-Message-State: AA+aEWaAqGX8yP1FF+Bn4tC1jimmUWgbwNaB9mUV2IJECJb2nLDpH5y1 cwnrvMEJDwseAUoZ90uucvs2cpI1EG2Td2vaQYE= X-Google-Smtp-Source: AFSGD/VrQmuDOcxP/14q4t4J6MosZy7qunMMG5FvPKMEPSfg21ntMe8SRTH6idRjdIdhM0k6kquhhqj8J8/FuOAP1I0= X-Received: by 2002:a67:e44f:: with SMTP id n15mr8231738vsm.116.1543884320145; Mon, 03 Dec 2018 16:45:20 -0800 (PST) MIME-Version: 1.0 References: <20181127165211.24763-1-pclouds@gmail.com> <20181129215850.7278-1-pclouds@gmail.com> <20181129215850.7278-8-pclouds@gmail.com> In-Reply-To: <20181129215850.7278-8-pclouds@gmail.com> From: Elijah Newren Date: Mon, 3 Dec 2018 16:45:08 -0800 Message-ID: Subject: Re: [PATCH v3 07/14] checkout: split into switch-branch and restore-files To: =?UTF-8?B?Tmd1eeG7hW4gVGjDoWkgTmfhu41j?= Cc: =?UTF-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= , Git Mailing List , Junio C Hamano , Stefan Beller , Thomas Gummerer , sxenos@google.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Thu, Nov 29, 2018 at 2:03 PM Nguy=E1=BB=85n Th=C3=A1i Ng=E1=BB=8Dc Duy <= pclouds@gmail.com> wrote: > > "git checkout" doing too many things is a source of confusion for many > users (and it even bites old timers sometimes). To rememdy that, the > command is now split in two: switch-branch and checkout-files. The "checkout-files" here....(will comment more on this below) > good old "git checkout" command is still here and will be until all > (or most of users) are sick of it. > > See the new man pages for the final design of these commands. The > actual implementation though is still pretty much the same as "git > checkout". Following patches will adjust their behavior to match the > man pages. > > Signed-off-by: Nguy=E1=BB=85n Th=C3=A1i Ng=E1=BB=8Dc Duy > --- > .gitignore | 2 + > Documentation/git-checkout.txt | 5 + > Documentation/git-restore-files.txt | 167 ++++++++++++++++ > Documentation/git-switch-branch.txt | 289 ++++++++++++++++++++++++++++ > Makefile | 2 + > builtin.h | 2 + > builtin/checkout.c | 84 ++++++-- > command-list.txt | 2 + > git.c | 2 + > 9 files changed, 543 insertions(+), 12 deletions(-) > create mode 100644 Documentation/git-restore-files.txt > create mode 100644 Documentation/git-switch-branch.txt > > diff --git a/.gitignore b/.gitignore > index 0d77ea5894..c63dcb1427 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -143,6 +143,7 @@ > /git-request-pull > /git-rerere > /git-reset > +/git-restore-files ...and "restore-files" here. Should be consistent with whatever name you p= ick. > /git-rev-list > /git-rev-parse > /git-revert > @@ -167,6 +168,7 @@ > /git-submodule > /git-submodule--helper > /git-svn > +/git-switch-branch > /git-symbolic-ref > /git-tag > /git-unpack-file > diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.= txt > index 25887a6087..25ec7f508f 100644 > --- a/Documentation/git-checkout.txt > +++ b/Documentation/git-checkout.txt > @@ -406,6 +406,11 @@ $ edit frotz > $ git add frotz > ------------ > > +SEE ALSO > +-------- > +linkgit:git-switch-branch[1] > +linkgit:git-restore-files[1] > + > GIT > --- > Part of the linkgit:git[1] suite > diff --git a/Documentation/git-restore-files.txt b/Documentation/git-rest= ore-files.txt > new file mode 100644 > index 0000000000..03c1250ad0 > --- /dev/null > +++ b/Documentation/git-restore-files.txt > @@ -0,0 +1,167 @@ > +git-restore-files(1) > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +NAME > +---- > +git-restore-files - Restore working tree files > + > +SYNOPSIS > +-------- > +[verse] > +'git restore-files' [-f|--ours|--theirs|-m|--conflict=3D