Code

Make tests pass with recent git (1.7.0 and up).
authorAvery Pennarun <apenwarr@gmail.com>
Sat, 6 Feb 2010 20:05:17 +0000 (15:05 -0500)
committerAvery Pennarun <apenwarr@gmail.com>
Sat, 6 Feb 2010 20:06:45 +0000 (15:06 -0500)
It seems that in older versions, --message="" was interpreted as "use the
default commit message" instead of "use an empty commit message", and
git-subtree was depending on this behaviour.  Now we don't, so tests pass
again.

git-subtree.sh

index 11cda9ea82b39c8e0a89bea3d5b6d25664743617..009c0db9bc3c92607d942f5fe858eeee0603b039 100755 (executable)
@@ -603,7 +603,11 @@ cmd_merge()
                rev="$new"
        fi
        
-       git merge -s subtree --message="$message" $rev
+       if [ -n "$message" ]; then
+               git merge -s subtree --message="$message" $rev
+       else
+               git merge -s subtree $rev
+       fi
 }
 
 cmd_pull()