git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: mergetool feature request - select remote or local

From
Caleb Cushing <xenoterracide@gmail.com>
Date
May 15, 2008, 01:25 UTC
Message-ID
<200805142125.40027.xenoterracide@gmail.com>
In-Reply-To
<7vzlqsok0y.fsf@gitster.siamese.dyndns.org>
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?

Show 8 quoted lines
> > 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.
Show 10 quoted lines
> 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
Previous: Junio C Hamano
Message 5 of 5 in “mergetool feature request - select remote or local”
  1. Caleb CushingMay 14, 2008
  2. Junio C HamanoMay 14, 2008
  3. Daniel BarkalowMay 14, 2008
  4. Junio C HamanoMay 14, 2008
  5. Caleb CushingMay 15, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.