If you want to automate this you can tweak git-merge-one-file
(it's in libexec/git-core
wherever you've got git installed) and run the merge manually.
git merge --no-commit --no-ff -s ours $topic # set up parents
git read-tree -um $(git merge-base @ $topic) @ $topic # handle really trivial cases
git merge-index -o $tweaked_git_merge_one_file -a # everything else, do my way
and the tweak is pretty easy, treat the $1$1.
case, where your branch didn't do anything but the other branch deleted it, as for the .$2.
case where you added it and the other branch didn't do anything. so
-"$1.." | "$1.$1" | "$1$1.")
+"$1.." | "$1.$1" )
and
-".$2.")
+".$2." | "$1$1." )
since in both cases the local copy of the file is correct as-is, the only thing to do is mark the index entry as (correctly) merged.