aboutsummaryrefslogtreecommitdiff
path: root/t/lib-rebase.sh
diff options
context:
space:
mode:
authorMatthieu Moy <Matthieu.Moy@imag.fr>2010-08-10 17:17:51 +0200
committerJunio C Hamano <gitster@pobox.com>2010-08-11 10:21:34 -0700
commitcd035b1cef39811fd3116aa07d99395960ec947a (patch)
tree6f7a28433e7ac08f97333912a4ef74857d627a48 /t/lib-rebase.sh
parent64fdc08dac6694d1e754580e7acb82dfa4988bb9 (diff)
downloadgit-cd035b1cef39811fd3116aa07d99395960ec947a.tar.gz
git-cd035b1cef39811fd3116aa07d99395960ec947a.tar.xz
rebase -i: add exec command to launch a shell command
The typical usage pattern would be to run a test (or simply a compilation command) at given points in history. The shell command is ran (from the worktree root), and the rebase is stopped when the command fails, to give the user an opportunity to fix the problem before continuing with "git rebase --continue". This needs a little rework of skip_unnecessary_picks, which wasn't robust enough to deal with lines like exec >"file name with many spaces" in the todolist. The new version extracts command, sha1 and rest from each line, but outputs the line itself verbatim to avoid changing the whitespace layout. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/lib-rebase.sh')
-rw-r--r--t/lib-rebase.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh
index 6aefe2759..6ccf79709 100644
--- a/t/lib-rebase.sh
+++ b/t/lib-rebase.sh
@@ -47,6 +47,8 @@ for line in $FAKE_LINES; do
case $line in
squash|fixup|edit|reword)
action="$line";;
+ exec*)
+ echo "$line" | sed 's/_/ /g' >> "$1";;
"#")
echo '# comment' >> "$1";;
">")