diff options
author | Matthieu Moy <Matthieu.Moy@imag.fr> | 2010-08-10 17:17:51 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-08-11 10:21:34 -0700 |
commit | cd035b1cef39811fd3116aa07d99395960ec947a (patch) | |
tree | 6f7a28433e7ac08f97333912a4ef74857d627a48 /t/lib-rebase.sh | |
parent | 64fdc08dac6694d1e754580e7acb82dfa4988bb9 (diff) | |
download | git-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.sh | 2 |
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";; ">") |