@@ -189,7 +189,6 @@ test_expect_success 'implicit interactive rebase does not invoke sequence editor
189
189
190
190
test_expect_success ' no changes are a nop' '
191
191
git checkout branch2 &&
192
- set_fake_editor &&
193
192
git rebase -i F &&
194
193
test "$(git symbolic-ref -q HEAD)" = "refs/heads/branch2" &&
195
194
test $(git rev-parse I) = $(git rev-parse HEAD)
@@ -199,7 +198,6 @@ test_expect_success 'test the [branch] option' '
199
198
git checkout -b dead-end &&
200
199
git rm file6 &&
201
200
git commit -m "stop here" &&
202
- set_fake_editor &&
203
201
git rebase -i F branch2 &&
204
202
test "$(git symbolic-ref -q HEAD)" = "refs/heads/branch2" &&
205
203
test $(git rev-parse I) = $(git rev-parse branch2) &&
@@ -208,7 +206,6 @@ test_expect_success 'test the [branch] option' '
208
206
209
207
test_expect_success ' test --onto <branch>' '
210
208
git checkout -b test-onto branch2 &&
211
- set_fake_editor &&
212
209
git rebase -i --onto branch1 F &&
213
210
test "$(git symbolic-ref -q HEAD)" = "refs/heads/test-onto" &&
214
211
test $(git rev-parse HEAD^) = $(git rev-parse branch1) &&
@@ -218,7 +215,6 @@ test_expect_success 'test --onto <branch>' '
218
215
test_expect_success ' rebase on top of a non-conflicting commit' '
219
216
git checkout branch1 &&
220
217
git tag original-branch1 &&
221
- set_fake_editor &&
222
218
git rebase -i branch2 &&
223
219
test file6 = $(git diff --name-only original-branch1) &&
224
220
test "$(git symbolic-ref -q HEAD)" = "refs/heads/branch1" &&
@@ -264,7 +260,6 @@ test_expect_success 'stop on conflicting pick' '
264
260
>>>>>>> 5d18e54... G
265
261
EOF
266
262
git tag new-branch1 &&
267
- set_fake_editor &&
268
263
test_must_fail git rebase -i master &&
269
264
test "$(git rev-parse HEAD~3)" = "$(git rev-parse master)" &&
270
265
test_cmp expect .git/rebase-merge/patch &&
@@ -293,7 +288,6 @@ test_expect_success 'abort' '
293
288
test_expect_success ' abort with error when new base cannot be checked out' '
294
289
git rm --cached file1 &&
295
290
git commit -m "remove file in base" &&
296
- set_fake_editor &&
297
291
test_must_fail git rebase -i master > output 2>&1 &&
298
292
test_i18ngrep "The following untracked working tree files would be overwritten by checkout:" \
299
293
output &&
@@ -308,7 +302,6 @@ test_expect_success 'retain authorship' '
308
302
test_tick &&
309
303
GIT_AUTHOR_NAME="Twerp Snog" git commit -m "different author" &&
310
304
git tag twerp &&
311
- set_fake_editor &&
312
305
git rebase -i --onto master HEAD^ &&
313
306
git show HEAD | grep "^Author: Twerp Snog"
314
307
'
@@ -326,7 +319,6 @@ test_expect_success 'retain authorship w/ conflicts' '
326
319
test_commit b conflict b conflict-b &&
327
320
GIT_AUTHOR_NAME=$oGIT_AUTHOR_NAME &&
328
321
329
- set_fake_editor &&
330
322
test_must_fail git rebase -i conflict-a &&
331
323
echo resolved >conflict &&
332
324
git add conflict &&
@@ -357,7 +349,6 @@ test_expect_success 'retain authorship when squashing' '
357
349
358
350
test_expect_success REBASE_P ' -p handles "no changes" gracefully' '
359
351
HEAD=$(git rev-parse HEAD) &&
360
- set_fake_editor &&
361
352
git rebase -i -p HEAD^ &&
362
353
git update-index --refresh &&
363
354
git diff-files --quiet &&
@@ -404,7 +395,6 @@ test_expect_success REBASE_P 'preserve merges with -p' '
404
395
git commit -m M file1 &&
405
396
git checkout -b to-be-rebased &&
406
397
test_tick &&
407
- set_fake_editor &&
408
398
git rebase -i -p --onto branch1 master &&
409
399
git update-index --refresh &&
410
400
git diff-files --quiet &&
@@ -450,7 +440,6 @@ test_expect_success '--continue tries to commit' '
450
440
test_expect_success ' verbose flag is heeded, even after --continue' '
451
441
git reset --hard master@{1} &&
452
442
test_tick &&
453
- set_fake_editor &&
454
443
test_must_fail git rebase -v -i --onto new-branch1 HEAD^ &&
455
444
echo resolved > file1 &&
456
445
git add file1 &&
@@ -750,7 +739,6 @@ test_expect_success 'do "noop" when there is nothing to cherry-pick' '
750
739
GIT_EDITOR=: git commit --amend \
751
740
--author="Somebody else <[email protected] >" &&
752
741
test $(git rev-parse branch3) != $(git rev-parse branch4) &&
753
- set_fake_editor &&
754
742
git rebase -i branch3 &&
755
743
test $(git rev-parse branch3) = $(git rev-parse branch4)
756
744
@@ -775,7 +763,6 @@ test_expect_success 'submodule rebase setup' '
775
763
git commit -a -m "submodule second"
776
764
) &&
777
765
test_tick &&
778
- set_fake_editor &&
779
766
git commit -a -m "Three changes submodule"
780
767
'
781
768
@@ -800,7 +787,6 @@ test_expect_success 'submodule conflict setup' '
800
787
'
801
788
802
789
test_expect_success ' rebase -i continue with only submodule staged' '
803
- set_fake_editor &&
804
790
test_must_fail git rebase -i submodule-base &&
805
791
git add sub &&
806
792
git rebase --continue &&
@@ -810,7 +796,6 @@ test_expect_success 'rebase -i continue with only submodule staged' '
810
796
test_expect_success ' rebase -i continue with unstaged submodule' '
811
797
git checkout submodule-topic &&
812
798
git reset --hard &&
813
- set_fake_editor &&
814
799
test_must_fail git rebase -i submodule-base &&
815
800
git reset &&
816
801
git rebase --continue &&
@@ -823,7 +808,6 @@ test_expect_success 'avoid unnecessary reset' '
823
808
test-tool chmtime =123456789 file3 &&
824
809
git update-index --refresh &&
825
810
HEAD=$(git rev-parse HEAD) &&
826
- set_fake_editor &&
827
811
git rebase -i HEAD~4 &&
828
812
test $HEAD = $(git rev-parse HEAD) &&
829
813
MTIME=$(test-tool chmtime --get file3) &&
@@ -858,7 +842,6 @@ test_expect_success 'rebase -i can copy notes' '
858
842
test_commit n2 &&
859
843
test_commit n3 &&
860
844
git notes add -m"a note" n3 &&
861
- set_fake_editor &&
862
845
git rebase -i --onto n1 n2 &&
863
846
test "a note" = "$(git notes show HEAD)"
864
847
'
@@ -896,7 +879,6 @@ test_tick # Ensure that the rebased commits get a different timestamp.
896
879
test_expect_success ' always cherry-pick with --no-ff' '
897
880
git checkout no-ff-branch &&
898
881
git tag original-no-ff-branch &&
899
- set_fake_editor &&
900
882
git rebase -i --no-ff A &&
901
883
for p in 0 1 2
902
884
do
@@ -1044,7 +1026,6 @@ test_expect_success 'rebase --exec works without -i ' '
1044
1026
1045
1027
test_expect_success ' rebase -i --exec without <CMD>' '
1046
1028
git reset --hard execute &&
1047
- set_fake_editor &&
1048
1029
test_must_fail git rebase -i --exec 2>actual &&
1049
1030
test_i18ngrep "requires a value" actual &&
1050
1031
git checkout master
@@ -1180,7 +1161,6 @@ test_expect_success 'rebase --edit-todo can be used to modify todo' '
1180
1161
test_expect_success ' rebase -i produces readable reflog' '
1181
1162
git reset --hard &&
1182
1163
git branch -f branch-reflog-test H &&
1183
- set_fake_editor &&
1184
1164
git rebase -i --onto I F branch-reflog-test &&
1185
1165
cat >expect <<-\EOF &&
1186
1166
rebase -i (finish): returning to refs/heads/branch-reflog-test
@@ -1603,4 +1583,9 @@ test_expect_success 'valid author header when author contains single quote' '
1603
1583
test_cmp expected actual
1604
1584
'
1605
1585
1586
+ # This must be the last test in this file
1587
+ test_expect_success ' $EDITOR and friends are unchanged' '
1588
+ test_editor_unchanged
1589
+ '
1590
+
1606
1591
test_done
0 commit comments