Steffen Prohaska, Sat, Jun 23, 2007 21:27:57 +0200: > +for commit in $(git-rev-list --reverse $from..$to) > +do > + echo "rewriting commit $commit..." > + git-diff-tree -r $commit | grep ^: | cut -b 9-15,57-97,100- | > + while read mode sha path > + do > + echo " $mode $sha $path" > + git-update-index --add --cacheinfo $mode $sha $path > + done Why not just read-tree for every commit? It is not like you're modifying the repository in any way, just changing parenthood. That'd solve the problem with deletions. So it should be enough to read-tree the repo state for each and every source commit into the index (and you can just use a temporary index file for that, see GIT_INDEX_FILE). Than just commit the index. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html