mergetool: Teach about submodules
commitff7f089ed1064b6a10e958bf405f828226262424
authorJonathon Mah <me@JonathonMah.com>
Wed, 13 Apr 2011 10:00:48 +0000 (13 03:00 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 13 Apr 2011 19:21:45 +0000 (13 12:21 -0700)
treeb3bade0c5549198e3d1f1ac9f14312527e1ed3a7
parentc3f6163b0b6e2cfae1422050c9607db1130cded0
mergetool: Teach about submodules

When the index has conflicted submodules, mergetool used to mildly
clobber the module, renaming it to mymodule.BACKUP.nnnn, then failing to
copy it non-recursively.

Recognize submodules and offer a resolution instead:

  Submodule merge conflict for 'Shared':
    {local}: submodule commit ad9f12e3e6205381bf2163a793d1e596a9e211d0
    {remote}: submodule commit f5893fb70ec5646efcd9aa643c5136753ac89253
  Use (l)ocal or (r)emote, or (a)bort?

Selecting a commit will stage it, but not update the submodule (as git
does had there been no conflict). Type changes are also supported,
should the path be a submodule on one side, and a file, symlink,
directory, or deleted on the other.

Signed-off-by: Jonathon Mah <me@JonathonMah.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-mergetool.sh
t/t7610-mergetool.sh