Re: [PATCH 1/2] checkout --conflict=<style>: recreate merge in a non-default style

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Sixt <j.sixt@xxxxxxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux