Re: Sharing a massive distributed merge

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

 



On Thu, Mar 17, 2011 at 18:58, Jay Soffian <jaysoffian@xxxxxxxxx> wrote:
> On Thu, Mar 17, 2011 at 10:54 AM, Alex Riesen <raa.lkml@xxxxxxxxx> wrote:
>> On Thu, Mar 17, 2011 at 15:10, Jay Soffian <jaysoffian@xxxxxxxxx> wrote:
>>> On Thu, Mar 17, 2011 at 4:53 AM, Alex Riesen <raa.lkml@xxxxxxxxx> wrote:
>>>> What if they just revert the rest? Reset the files to their states before
>>>> merge.
>>>
>>> That's the same as checkout --ours which is sometimes a valid
>>> resolution for a file. So I think "I resolved this file" needs to be
>>> recorded either way.
>>
>> But it is recorded: the file is different now!
>
> Let's say we have:
>
> Âa---b---c
> Â \
> Â Âd---e
>
> $ git checkout c
> $ git merge e Â# files "foo" and "bar" conflict
> $ git checkout --ours foo Â# correct resolution for foo

I doubt that'll be a correct resolution. Someone have to look
at the conflict markers, right?

> $ git checkout HEAD bar  Â# "revert" bar to its pre-merge state
> $ git add foo
> $ git commit
>
> In the merge commit, both "foo" and "bar" are identical to their
> pre-merge state. There's no effective difference between the "checkout
> --ours" and "reset the files to their states before the merge".
>
> So again, how do you tell the difference here?
>

The difference may be simple (git diff --name-status c^..),
it just does not help. The merge commit will record the
branches as merged and an attempt by the maintainer to merge
this partial merge commit will just fast-forward. So it was
a stupid idea either way.

How about not to record the merge as a merge commit, but
just resolve as much as possible, commit _only_ what was
resolved, and revert everything else. Including files merged
cleanly, as the last merge by maintainer will have to clean
merge them anyway. And of course, commit as normal:

  $ git merge --squash --no-commit e

The maintainer will have to collect the branches with resolved
conflicts, and fix up the conflicts left.

Could be less work, given good coordination of who resolves what...
--
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]