mirror of
https://github.com/git/git.git
synced 2024-11-24 18:33:43 +08:00
54fd3243da
In the scripted version of the interactive rebase, there was no internal representation of the todo list; it was re-read before every command. That allowed the hack that an `exec` command could append (or even completely rewrite) the todo list. This hack was broken by the partial conversion of the interactive rebase to C, and this patch reinstates it. We also add a small test to verify that this fix does not regress in the future. Signed-off-by: Stephen Hicks <sdh@google.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 lines
305 B
Bash
Executable File
15 lines
305 B
Bash
Executable File
#!/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_done
|