git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Andy Koppe <andy.koppe@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, pclouds@gmail.com
Subject: Re: [PATCH] restore: fault --staged --worktree with merge opts
Date: Tue, 21 Feb 2023 22:27:27 +0000	[thread overview]
Message-ID: <CAHWeT-Zy=iJZoVAWZHqnGGFb-KMbg1fk_mmdE2T=K4+xRHpG0A@mail.gmail.com> (raw)
In-Reply-To: <xmqqa616g8yv.fsf@gitster.g>

On Tue, 21 Feb 2023 at 18:38, Junio C Hamano wrote:
>         Side note 2: it is conceivable that --worktree --staged
>         --ours may want to (1) resolve the conflicted path to stage
>         #2 in the index and (2) check out the result in the working
>         tree.

Same with restore --worktree --staged --theirs and stage #3?

That's basically what I thought these combinations would do when I
noticed that they were accepted. I think they would be quite
convenient compared to separate restore and add. They'd be the
equivalent of 'svn resolve --accept=mine-full/theirs-full'.

>         But until such an improved behaviour gets
>         implemented, it is probably better to error it out for now.

Indeed. Unfortunately implementing that improvement is beyond my
knowledge of git internals.

>> +test_expect_success 'restore with merge options rejects --staged' '
>> +     test_must_fail git restore --staged --merge . -- 2>err1 &&

> What is "." meant to be on this command line?  If it is "the whole
> working tree", it should come after the double-dash "--", no?

Sorry, that was accidental. The command requires a path argument to
get to the option conflict error, but as you say, putting it before
the "--" doesn't make sense.

Thank you very much for the thorough review. I'll prepare a new
version of the patch.

  reply	other threads:[~2023-02-21 22:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-18 16:39 [PATCH] restore: fault --staged --worktree with merge opts Andy Koppe
2023-02-21 18:38 ` Junio C Hamano
2023-02-21 22:27   ` Andy Koppe [this message]
2023-02-22 23:09     ` Junio C Hamano
2023-02-26 18:43       ` [PATCH v2] " Andy Koppe
2023-02-28  1:02         ` Junio C Hamano

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='CAHWeT-Zy=iJZoVAWZHqnGGFb-KMbg1fk_mmdE2T=K4+xRHpG0A@mail.gmail.com' \
    --to=andy.koppe@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).