3 test_description='rebase should reread the todo file if an exec modifies it'
7 test_expect_success 'rebase exec modifies rebase-todo' '
9 todo=.git/rebase-merge/git-rebase-todo &&
10 git rebase HEAD -x "echo exec touch F >>$todo" &&
14 test_expect_success SHA1 'loose object cache vs re-reading todo list' '
15 GIT_REBASE_TODO=.git/rebase-merge/git-rebase-todo &&
16 export GIT_REBASE_TODO &&
17 write_script append-todo.sh <<-\EOS &&
18 # For values 5 and 6, this yields SHA-1s with the same first two digits
19 echo "pick $(git rev-parse --short \
22 "author A U Thor <author@example.org> $1 +0000" \
23 "committer A U Thor <author@example.org> $1 +0000" \
26 git hash-object -t commit -w --stdin))" >>$GIT_REBASE_TODO
30 echo "exec $0 $*" >>$GIT_REBASE_TODO
33 git rebase HEAD -x "./append-todo.sh 5 6"