fix for subtree split not finding proper base for new commits
authorJakub Suder <jakub.suder@gmail.com>
Sat, 9 Jan 2010 22:01:39 +0000 (23:01 +0100)
committerJakub Suder <jakub.suder@gmail.com>
Sun, 10 Jan 2010 12:09:26 +0000 (13:09 +0100)
git-subtree.sh

index 09992e39d5897698daaf6c6db2ef0b23460a58b1..cdf7b0992b4743ed4b848a3c19ce45cfe7d0c238 100755 (executable)
@@ -538,7 +538,10 @@ cmd_split()
                
                # ugly.  is there no better way to tell if this is a subtree
                # vs. a mainline commit?  Does it matter?
-               [ -z $tree ] && continue
+               if [ -z $tree ]; then
+                       cache_set $rev $rev
+                       continue
+               fi
 
                newrev=$(copy_or_skip "$rev" "$tree" "$newparents") || exit $?
                debug "  newrev is: $newrev"