All of lore.kernel.org
 help / color / mirror / Atom feed
* Interesting behavior in git mergetool with no BASE revision
@ 2012-01-18 23:05 Jason Wenger
  2012-01-20  6:43 ` David Aguilar
  0 siblings, 1 reply; 17+ messages in thread
From: Jason Wenger @ 2012-01-18 23:05 UTC (permalink / raw)
  To: git

Doing a git merge on 1.7.4.3, on a case where both branches have a
file created, and the base does not.  Per git-mergetool:

"the configured command line will be invoked with $BASE set to the
name of a temporary file containing the common base for the merge, if
available;"

So testing in this case, I set my mergetool cmd as "echo $MERGED
$LOCAL $REMOTE $BASE", and I get the following:

cio/.cproject ./cio/.cproject.LOCAL.9029.cproject
./cio/.cproject.REMOTE.9029.cproject
./cio/.cproject.BASE.9029.cproject

ls -a cio shows the following files:

.cproject
.cproject.LOCAL.9325.cproject
.cproject.BACKUP.9325.cproject
.cproject.REMOTE.9325.cproject

So the lack of base file makes sense -- There is no base to start
from.  However, $BASE evaluates to ./cio/.cproject.BASE.9029.cproject,
which is a nonexistent file.  This makes my actual mergetool upset to
no end.  Intuitively from documents, I would expect $BASE to evaluate
to an empty string in this case.

Is this intended behavior?

--Jason C. Wenger

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2012-01-20 18:28 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-18 23:05 Interesting behavior in git mergetool with no BASE revision Jason Wenger
2012-01-20  6:43 ` David Aguilar
2012-01-20  6:46   ` [PATCH] mergetool: Provide an empty file when no base exists David Aguilar
2012-01-20  6:57     ` David Aguilar
2012-01-20  7:00     ` Junio C Hamano
2012-01-20  7:07       ` David Aguilar
2012-01-20  7:10       ` David Aguilar
2012-01-20  7:22         ` Junio C Hamano
2012-01-20  7:26           ` David Aguilar
2012-01-20  7:37             ` Junio C Hamano
2012-01-20  7:39               ` Junio C Hamano
2012-01-20  7:47               ` [PATCH v3] mergetool: Provide an empty file when needed David Aguilar
2012-01-20  7:53                 ` David Aguilar
2012-01-20 14:03                   ` Jason Wenger
2012-01-20 18:28                     ` Junio C Hamano
2012-01-20  7:37           ` David Aguilar
2012-01-20  7:14       ` [PATCH v2] mergetool: Provide an empty file when no base exists David Aguilar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.