Code

mergetool: Provide an empty file when needed
authorDavid Aguilar <davvid@gmail.com>
Fri, 20 Jan 2012 07:47:35 +0000 (23:47 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 23 Jan 2012 19:50:22 +0000 (11:50 -0800)
Some merge tools cannot cope when $LOCAL, $BASE, or $REMOTE are missing.
$BASE can be missing when two branches independently add the same
filename.

Provide an empty file to make these tools happy.

When a delete/modify conflict occurs, $LOCAL and $REMOTE can also be
missing. We have special case code to handle such case so this change
may not affect that codepath, but try to be consistent and create an
empty file for them anyway.

Reported-by: Jason Wenger <jcwenger@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

No differences found