3 # Given the output of git-rev-list, this reconstructs the DAG of the history
6 tac |
while read rev parents
; do
10 tree
=$
(git write-tree
)
11 parents
="$(for parent in $parents
13 echo -n "-p $
(git rev-parse sp-
$parent) "
15 commit
=$
(echo "$rev $i" | git commit-tree
$tree $parents)
16 git tag sp-
$rev $commit