summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 33ff583)
raw | patch | inline | side by side (parent: 33ff583)
author | Avery Pennarun <apenwarr@gmail.com> | |
Fri, 24 Apr 2009 21:42:33 +0000 (17:42 -0400) | ||
committer | Avery Pennarun <apenwarr@gmail.com> | |
Fri, 24 Apr 2009 21:42:33 +0000 (17:42 -0400) |
Otherwise we can't keep track of parent relationships. Argh.
This change makes it "work", but we get a bunch of empty commits.
This change makes it "work", but we get a bunch of empty commits.
git-subtree.sh | patch | blob | history |
diff --git a/git-subtree.sh b/git-subtree.sh
index 7e1707ae2afadacc6706731423ab28f06aa9f9d6..1e1237f52006db612a4e69d1565672456bc07854 100755 (executable)
--- a/git-subtree.sh
+++ b/git-subtree.sh
cache_setup || exit $?
if [ -n "$onto" ]; then
- echo "Reading history for $onto..."
+ echo "Reading history for --onto=$onto..."
git rev-list $onto |
while read rev; do
# the 'onto' history is already just the subdir, so
# any parent we find there can be used verbatim
+ debug " cache: $rev"
cache_set $rev $rev
done
fi
unrevs="$(find_existing_splits "$dir" "$revs")"
- git rev-list --reverse --parents $revs $unrevs -- "$dir" |
+ debug "git rev-list --reverse $revs $unrevs"
+ git rev-list --reverse --parents $revs $unrevsx |
while read rev parents; do
- exists=$(cache_get $rev)
- newparents=$(cache_get $parents)
debug
- debug "Processing commit: $rev / $newparents"
-
+ debug "Processing commit: $rev"
+ exists=$(cache_get $rev)
if [ -n "$exists" ]; then
debug " prior: $exists"
continue
fi
+ debug " parents: $parents"
+ newparents=$(cache_get $parents)
+ debug " newparents: $newparents"
git ls-tree $rev -- "$dir" |
while read mode type tree name; do