@matheusbsbs / matheus-bagliano / commits / 2c71b7c46d
Fork 0

Hmm... can't actually filter rev-list on the subdir name.

Otherwise we can't keep track of parent relationships. Argh. This change makes it "work", but we get a bunch of empty commits.

Avery Pennarun committed Apr 24, 2009 at 17:42 UTC 2c71b7c46d1ff887fb276a9d42346678a2948a00
1 file changed +9 -6
git-subtree.sh
+9 -6
@@ -173,28 +173,31 @@ cmd_split()
173 cache_setup || exit $?
174
175 if [ -n "$onto" ]; then
176 - echo "Reading history for $onto..."
176 + echo "Reading history for --onto=$onto..."
177 git rev-list $onto |
178 while read rev; do
179 # the 'onto' history is already just the subdir, so
180 # any parent we find there can be used verbatim
181 + debug " cache: $rev"
182 cache_set $rev $rev
183 done
184 fi
185
186 unrevs="$(find_existing_splits "$dir" "$revs")"
187
187 - git rev-list --reverse --parents $revs $unrevs -- "$dir" |
188 + debug "git rev-list --reverse $revs $unrevs"
189 + git rev-list --reverse --parents $revs $unrevsx |
190 while read rev parents; do
189 - exists=$(cache_get $rev)
190 - newparents=$(cache_get $parents)
191 debug
192 - debug "Processing commit: $rev / $newparents"
193 -
192 + debug "Processing commit: $rev"
193 + exists=$(cache_get $rev)
194 if [ -n "$exists" ]; then
195 debug " prior: $exists"
196 continue
197 fi
198 + debug " parents: $parents"
199 + newparents=$(cache_get $parents)
200 + debug " newparents: $newparents"
201
202 git ls-tree $rev -- "$dir" |
203 while read mode type tree name; do