diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-08-03 11:01:22 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-08-03 11:01:22 -0700 |
commit | 3a760cad7952ce5d17ff77a8f376aaa35299dfa7 (patch) | |
tree | 42b5f7541479c4a798d90f2ffdf361edff5ffc66 /t/lib-rebase.sh | |
parent | Merge branch 'jc/commit-slab' (diff) | |
parent | git rebase -i: add static check for commands and SHA-1 (diff) | |
download | tgif-3a760cad7952ce5d17ff77a8f376aaa35299dfa7.tar.xz |
Merge branch 'gr/rebase-i-drop-warn'
Add "drop commit-object-name subject" command as another way to
skip replaying of a commit in "rebase -i", and then punish those
who do not use it (and instead just remove the lines) by throwing
a warning.
* gr/rebase-i-drop-warn:
git rebase -i: add static check for commands and SHA-1
git rebase -i: warn about removed commits
git-rebase -i: add command "drop" to remove a commit
Diffstat (limited to 't/lib-rebase.sh')
-rw-r--r-- | t/lib-rebase.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh index 6bd252212a..9a96e1566d 100644 --- a/t/lib-rebase.sh +++ b/t/lib-rebase.sh @@ -14,7 +14,7 @@ # specified line. # # "<cmd> <lineno>" -- add a line with the specified command -# ("squash", "fixup", "edit", or "reword") and the SHA1 taken +# ("squash", "fixup", "edit", "reword" or "drop") and the SHA1 taken # from the specified line. # # "exec_cmd_with_args" -- add an "exec cmd with args" line. @@ -46,7 +46,7 @@ set_fake_editor () { action=pick for line in $FAKE_LINES; do case $line in - squash|fixup|edit|reword) + squash|fixup|edit|reword|drop) action="$line";; exec*) echo "$line" | sed 's/_/ /g' >> "$1";; @@ -54,6 +54,11 @@ set_fake_editor () { echo '# comment' >> "$1";; ">") echo >> "$1";; + bad) + action="badcmd";; + fakesha) + echo "$action XXXXXXX False commit" >> "$1" + action=pick;; *) sed -n "${line}s/^pick/$action/p" < "$1".tmp >> "$1" action=pick;; |