Squashed 'third_party/git/' content from commit cb71568594
git-subtree-dir: third_party/git git-subtree-split: cb715685942260375e1eb8153b0768a376e4ece7
This commit is contained in:
commit
1b593e1ea4
3629 changed files with 1139935 additions and 0 deletions
36
t/t3429-rebase-edit-todo.sh
Executable file
36
t/t3429-rebase-edit-todo.sh
Executable file
|
|
@ -0,0 +1,36 @@
|
|||
#!/bin/sh
|
||||
|
||||
test_description='rebase should reread the todo file if an exec modifies it'
|
||||
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_success 'rebase exec modifies rebase-todo' '
|
||||
test_commit initial &&
|
||||
todo=.git/rebase-merge/git-rebase-todo &&
|
||||
git rebase HEAD -x "echo exec touch F >>$todo" &&
|
||||
test -e F
|
||||
'
|
||||
|
||||
test_expect_success SHA1 'loose object cache vs re-reading todo list' '
|
||||
GIT_REBASE_TODO=.git/rebase-merge/git-rebase-todo &&
|
||||
export GIT_REBASE_TODO &&
|
||||
write_script append-todo.sh <<-\EOS &&
|
||||
# For values 5 and 6, this yields SHA-1s with the same first two digits
|
||||
echo "pick $(git rev-parse --short \
|
||||
$(printf "%s\\n" \
|
||||
"tree $EMPTY_TREE" \
|
||||
"author A U Thor <author@example.org> $1 +0000" \
|
||||
"committer A U Thor <author@example.org> $1 +0000" \
|
||||
"" \
|
||||
"$1" |
|
||||
git hash-object -t commit -w --stdin))" >>$GIT_REBASE_TODO
|
||||
|
||||
shift
|
||||
test -z "$*" ||
|
||||
echo "exec $0 $*" >>$GIT_REBASE_TODO
|
||||
EOS
|
||||
|
||||
git rebase HEAD -x "./append-todo.sh 5 6"
|
||||
'
|
||||
|
||||
test_done
|
||||
Loading…
Add table
Add a link
Reference in a new issue