Re: [RFC WIP PATCH] merge: implement -s theirs -X N

2018-04-20 Thread Ævar Arnfjörð Bjarmason
On Thu, Apr 19 2018, Junio C. Hamano wrote: I suppose this is more in reply to xmqqpo2ud9ih@gitster-ct.c.googlers.com. I was trying to answer all your questions in my 87r2nbeh1r@evledraar.gmail.com, but I think it wasn't clear, hopefully this inline clears things up. > Ævar Arnfjörð

Re: [RFC WIP PATCH] merge: implement -s theirs -X N

2018-04-19 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > On Thu, Apr 19 2018, Junio C. Hamano wrote: > >> This question has nothing to do with your "-s theirs" but let me see >> if I got the above correctly. Suppose you have a deployed branch >> (say, "prod"), all developments happen on "master"

Re: [RFC WIP PATCH] merge: implement -s theirs -X N

2018-04-19 Thread Ævar Arnfjörð Bjarmason
On Thu, Apr 19 2018, Junio C. Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> We have a -s ours, but not a -s theirs. This is a WIP patch to implement >> that. It works, but I haven't dealt with this part of the internal API >> before, comments most welcome. >> >> The

Re: [RFC WIP PATCH] merge: implement -s theirs -X N

2018-04-18 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > We have a -s ours, but not a -s theirs. This is a WIP patch to implement > that. It works, but I haven't dealt with this part of the internal API > before, comments most welcome. > > The purpose of this is that I'm working with a rollout tool

Re: [RFC WIP PATCH] merge: implement -s theirs -X N

2018-04-18 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > Questions: > > 1. Should I be calling read-tree here with run_command_v_opt(), or is > there some internal API I should be using? The internal is unpack_trees(), which is usabe as a library-ish API reasonably cleanly and easily. For a

Re: [RFC WIP PATCH] merge: implement -s theirs -X N

2018-04-18 Thread Stefan Beller
On Wed, Apr 18, 2018 at 3:48 PM, Ævar Arnfjörð Bjarmason wrote: > We have a -s ours, but not a -s theirs. This is a WIP patch to implement > that. It works, but I haven't dealt with this part of the internal API > before, comments most welcome. I hope reference pointers are

[RFC WIP PATCH] merge: implement -s theirs -X N

2018-04-18 Thread Ævar Arnfjörð Bjarmason
We have a -s ours, but not a -s theirs. This is a WIP patch to implement that. It works, but I haven't dealt with this part of the internal API before, comments most welcome. The purpose of this is that I'm working with a rollout tool that is capable of doing hotfixes on top of old commits on