Code

Simplify merges even more aggressively.
authorAvery Pennarun <apenwarr@gmail.com>
Sun, 26 Apr 2009 21:44:18 +0000 (17:44 -0400)
committerAvery Pennarun <apenwarr@gmail.com>
Sun, 26 Apr 2009 21:44:18 +0000 (17:44 -0400)
If any one of the parents is the same as the current one, then clearly the
other parent branch isn't important, so throw it away entirely.

Can't remember why I didn't do this before, but if I rediscover it, it
definitely needs a unit test.

git-subtree.sh

index 90e22ad8be3952e5ef77492cb46a8850b61c10c6..e2e47f82ac9c86035d9ed9ab84a24e8bc7c7626e 100755 (executable)
@@ -286,7 +286,7 @@ copy_or_skip()
                fi
        done
        
-       if [ -n "$identical" -a -z "$nonidentical" ]; then
+       if [ -n "$identical" ]; then
                echo $identical
        else
                copy_commit $rev $tree "$p" || exit $?