From: Junio C Hamano <gitster@pobox.com>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: git@vger.kernel.org, Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH 1/2] checkout --conflict=<style>: recreate merge in a non-default style
Date: Mon, 01 Sep 2008 03:39:07 -0700 [thread overview]
Message-ID: <7vhc90w3p0.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: 48BB9F45.4070509@viscovery.net
Johannes Sixt <j.sixt@viscovery.net> writes:
> If --conflict is basically the same as --merge, couldn't we then pass
> style argument to --merge or omit it to get the default style?
I originally was thinking about doing it that way, but the option parsing
would become somewhat hairly.
$ git checkout --merge=diff3 foo
$ git checkout --merge diff3 foo
$ git checkout --merge diff3
The first one is clearly "switch to branch 'foo'; simple 2-way read-tree
may find the changes in my working tree conflicting and refuse, so use
3-way merge to resolve such conflicts and express the conflicts in diff3
style".
The third one is "switch to branch 'diff3'; don't barf on conflicting
working tree changes; 3-way merge them".
What about the second one? Is it "switch to 'foo', express conflicts in
diff3 style", or "checkout path foo from tree-ish diff3"?
It is the former, but that is only because the latter is an error (-m is
defined only for checking things out of the index). That is not something
parse-options can easily/cleanly do.
prev parent reply other threads:[~2008-09-01 10:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-01 6:22 [PATCH 1/2] checkout --conflict=<style>: recreate merge in a non-default style Junio C Hamano
2008-09-01 7:52 ` Johannes Sixt
2008-09-01 10:39 ` Junio C Hamano [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vhc90w3p0.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=j.sixt@viscovery.net \
--cc=torvalds@linux-foundation.org \
/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.
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 NNTP newsgroup(s).