diff options
author | Vincent Ambo <tazjin@google.com> | 2020-05-25T23·06+0100 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-05-25T23·06+0100 |
commit | 93ba78d6f4632ef1c5228965e3edc8c0faf88c1e (patch) | |
tree | 85730c182a9f5f492ade8e8ccdb1c2356f9900bd /third_party/git/t/lib-rebase.sh | |
parent | 6f8fbf4aa4b1654ab27d4829e114538761817de0 (diff) |
revert(3p/git): Revert merge of git upstream at v2.26.2 r/852
This causes cgit to serve error pages, which is undesirable. This reverts commit 5229c9b232de5bfa959ad6ebbb4c8192ac513352, reversing changes made to f2b211131f2347342dde63975b09cf603149f1a3.
Diffstat (limited to 'third_party/git/t/lib-rebase.sh')
-rw-r--r-- | third_party/git/t/lib-rebase.sh | 37 |
1 files changed, 4 insertions, 33 deletions
diff --git a/third_party/git/t/lib-rebase.sh b/third_party/git/t/lib-rebase.sh index b72c051f4761..7ea30e50068b 100644 --- a/third_party/git/t/lib-rebase.sh +++ b/third_party/git/t/lib-rebase.sh @@ -44,10 +44,10 @@ set_fake_editor () { rm -f "$1" echo 'rebase -i script before editing:' cat "$1".tmp - action=\& + action=pick for line in $FAKE_LINES; do case $line in - pick|p|squash|s|fixup|f|edit|e|reword|r|drop|d|label|l|reset|r|merge|m) + pick|p|squash|s|fixup|f|edit|e|reword|r|drop|d) action="$line";; exec_*|x_*|break|b) echo "$line" | sed 's/_/ /g' >> "$1";; @@ -58,12 +58,11 @@ set_fake_editor () { bad) action="badcmd";; fakesha) - test \& != "$action" || action=pick echo "$action XXXXXXX False commit" >> "$1" action=pick;; *) - sed -n "${line}s/^[a-z][a-z]*/$action/p" < "$1".tmp >> "$1" - action=\&;; + sed -n "${line}s/^pick/$action/p" < "$1".tmp >> "$1" + action=pick;; esac done echo 'rebase -i script after editing:' @@ -119,31 +118,3 @@ make_empty () { git commit --allow-empty -m "$1" && git tag "$1" } - -# Call this (inside test_expect_success) at the end of a test file to -# check that no tests have changed editor related environment -# variables or config settings -test_editor_unchanged () { - # We're only interested in exported variables hence 'sh -c' - sh -c 'cat >actual <<-EOF - EDITOR=$EDITOR - FAKE_COMMIT_AMEND=$FAKE_COMMIT_AMEND - FAKE_COMMIT_MESSAGE=$FAKE_COMMIT_MESSAGE - FAKE_LINES=$FAKE_LINES - GIT_EDITOR=$GIT_EDITOR - GIT_SEQUENCE_EDITOR=$GIT_SEQUENCE_EDITOR - core.editor=$(git config core.editor) - sequence.editor=$(git config sequence.editor) - EOF' - cat >expect <<-\EOF - EDITOR=: - FAKE_COMMIT_AMEND= - FAKE_COMMIT_MESSAGE= - FAKE_LINES= - GIT_EDITOR= - GIT_SEQUENCE_EDITOR= - core.editor= - sequence.editor= - EOF - test_cmp expect actual -} |