From: Eric Sunshine <sunshine@sunshineco.com>
To: Git List <git@vger.kernel.org>
Cc: "Harri Mehtälä" <harri.mehtala@finago.com>,
"Duy Nguyen" <pclouds@gmail.com>
Subject: Re: [PATCH 1/2] restore: require --source when combining --worktree and --staged
Date: Fri, 1 May 2020 04:49:50 -0400 [thread overview]
Message-ID: <CAPig+cR4VpyAzqok8+QoUgQQc=mS-ooD8+PUCPMuO6XQ21dL6w@mail.gmail.com> (raw)
In-Reply-To: <20200501082746.23943-2-sunshine@sunshineco.com>
On Fri, May 1, 2020 at 4:28 AM Eric Sunshine <sunshine@sunshineco.com> wrote:
> diff --git a/builtin/checkout.c b/builtin/checkout.c
> @@ -1604,6 +1604,9 @@ static int checkout_main(int argc, const char **argv, const char *prefix,
> }
> if (opts->checkout_index < 0 || opts->checkout_worktree < 0)
> BUG("these flags should be non-negative by now");
> + if (opts->checkout_index > 0 && opts->checkout_worktree > 0 &&
> + !opts->from_treeish)
If I re-roll the series for some reason, I'll drop the unnecessary ">
0". (But this code goes away in patch 2/2 anyhow, so I'm not too
worried about it.)
next prev parent reply other threads:[~2020-05-01 8:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-01 8:27 [PATCH 0/2] enhance "git restore --worktree --staged" behavior Eric Sunshine
2020-05-01 8:27 ` [PATCH 1/2] restore: require --source when combining --worktree and --staged Eric Sunshine
2020-05-01 8:49 ` Eric Sunshine [this message]
2020-05-01 22:16 ` Taylor Blau
2020-05-01 8:27 ` [PATCH 2/2] restore: default to HEAD " Eric Sunshine
2020-05-01 15:32 ` Junio C Hamano
2020-05-05 3:53 ` Eric Sunshine
2020-05-01 22:19 ` Taylor Blau
2020-05-05 4:00 ` Eric Sunshine
2020-05-05 4:44 ` Taylor Blau
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='CAPig+cR4VpyAzqok8+QoUgQQc=mS-ooD8+PUCPMuO6XQ21dL6w@mail.gmail.com' \
--to=sunshine@sunshineco.com \
--cc=git@vger.kernel.org \
--cc=harri.mehtala@finago.com \
--cc=pclouds@gmail.com \
/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).