From 2c71b7c46d1ff887fb276a9d42346678a2948a00 Mon Sep 17 00:00:00 2001 From: Avery Pennarun Date: Fri, 24 Apr 2009 17:42:33 -0400 Subject: [PATCH] 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. --- git-subtree.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/git-subtree.sh b/git-subtree.sh index 7e1707ae2..1e1237f52 100755 --- a/git-subtree.sh +++ b/git-subtree.sh @@ -173,28 +173,31 @@ cmd_split() 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 -- 2.26.2