git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Aguilar <davvid@gmail.com>
To: Jan Smets <jan@smets.cx>
Cc: git@vger.kernel.org
Subject: Re: using git-difftool -d when cherry-picking
Date: Fri, 29 Apr 2016 18:19:30 -0700	[thread overview]
Message-ID: <20160430011930.GA26977@gmail.com> (raw)
In-Reply-To: <CAH9ve7x3GSVX1M3yuAY1VmM-WoFX36o-vihFQ3Jw-_SZ4Bh_og@mail.gmail.com>

On Wed, Apr 27, 2016 at 11:12:25AM +0200, Jan Smets wrote:
> Hi
> 
> Please consider following example
> 
> #!/bin/bash
> rm -rf /tmp/gittest
> mkdir /tmp/gittest
> cd /tmp/gittest
> 
> git init
> 
> echo $RANDOM > testfile
> git add testfile
> git commit -m test -a
> 
> git branch X
> git checkout X
> echo $RANDOM > testfile
> git add testfile
> git commit -m test -a
> 
> git checkout master
> echo $RANDOM > testfile
> git add testfile
> git commit -m test -a
> 
> git cherry-pick X
> git diff --raw
> git difftool -d
> 
> 
> This emulates a merge conflict when using git-cerry-pick.
> 
> $ git diff --raw
> :000000 100644 0000000... 0000000... U  testfile
> :100644 100644 a04e026... 0000000... M  testfile
> 
> When executing git difftool with the -d option :
> 
> /usr/lib/git-core/git-difftool line 260: File exists
> 
> A possible solution is to build an unique list in @working_tree
> 
> The purpose is to edit/resolve the conflict in the difftool.


That could be useful.  git-mergetool is intended to be used when
merge conflicts exist, but it sounds like you may have already
found a possible solution by making @working_tree unique.  Have
you tested that to see if it skirts around the issue?

If you have a patch I'd be happy to help review and test it.
-- 
David

  reply	other threads:[~2016-04-30  1:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-27  9:12 using git-difftool -d when cherry-picking Jan Smets
2016-04-30  1:19 ` David Aguilar [this message]
2016-04-30 10:50   ` Jan Smets

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160430011930.GA26977@gmail.com \
    --to=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jan@smets.cx \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).