Subject: Re: mergetool feature request - select remote or local

From: Caleb Cushing <[email-masked]>
Date: Wed, 14 May 2008 21:25:33 -0400

On Wednesday 14 May 2008 01:47:09 pm you wrote:
> I never understood why people are using git and not ftp when they say the
> other side is always right, but I see this comes up every once in a while,
> so it would probably be a good thing to support.

well in my case I'm not particularly sure why fast forward didn't just merge 
them. Seems like I had resolved these changes in master previously. this 
problem is most annoying when I am resolving the same issues across multiple 
branches.

> The above "(l)local" and "(m)anual" look inconsistent, and the wording
> should be more like "local, remote or merge".

local,remote, merge is fine and I used the (m) for example because of how it 
asked me to handle a file existing locally (with mods?) but had been deleted 
in MERGE_HEAD?

> > also in the event of having 20 files with this issue it would be nice to
> > have an option after first starting mergetool for remote all or local
> > all.
>
> This makes me wonder if you are better off not using mergetool in such a
> situation.  Instead, perhaps
>
>         $ git ls-files -u --no-stage | xargs git checkout MERGE_HEAD

perhaps... I'm not this familiar with git yet.

> might be a better option?  The attached is a completely untested
> weather-baloon patch.
>
> If this turns out to be a better approach, perhaps we would further want
> to tweak things to make:
>
>         $ git checkout --unmerged MERGE_HEAD [--] [<pathspec>...]
>
> to work (if you want "local", you would use "HEAD" instead of
> "MERGE_HEAD").

> Looks easy enough.  Caleb, does this approach fit the situation you
> described better?

um.. is that just a resolution for an merge all (local or remote).

I'm gonna be honest when I say I'm an amateur developer (although I've 
considered myself a pretty good admin for a few years) and relatively new to 
git. So I'm getting a bit lost, but it sounds reasonable. It wouldn't affect 
any files that had been successfully fast forwarded right?

unfortunately I'm not sure how easy testing will be, as this problem doesn't 
arise with every merge, but has arisen often enough to be a pita.
-- 
Caleb Cushing

my blog http://xenoterracide.blogspot.com