@@ -73,10 +73,11 @@ test_expect_success 'prepare for rebase conflicts' '
73
73
74
74
test_expect_success ' status when rebase in progress before resolving conflicts' '
75
75
test_when_finished "git rebase --abort" &&
76
+ ONTO=$(git rev-parse --short HEAD^^) &&
76
77
test_must_fail git rebase HEAD^ --onto HEAD^^ &&
77
- cat >expected <<-\ EOF &&
78
+ cat >expected <<-EOF &&
78
79
# Not currently on any branch.
79
- # You are currently rebasing.
80
+ # You are currently rebasing branch ' \' ' rebase_conflicts ' \' ' on ' \' ' $ONTO ' \' ' .
80
81
# (fix conflicts and then run "git rebase --continue")
81
82
# (use "git rebase --skip" to skip this patch)
82
83
# (use "git rebase --abort" to check out the original branch)
@@ -97,12 +98,13 @@ test_expect_success 'status when rebase in progress before resolving conflicts'
97
98
test_expect_success ' status when rebase in progress before rebase --continue' '
98
99
git reset --hard rebase_conflicts &&
99
100
test_when_finished "git rebase --abort" &&
101
+ ONTO=$(git rev-parse --short HEAD^^) &&
100
102
test_must_fail git rebase HEAD^ --onto HEAD^^ &&
101
103
echo three >main.txt &&
102
104
git add main.txt &&
103
- cat >expected <<-\ EOF &&
105
+ cat >expected <<-EOF &&
104
106
# Not currently on any branch.
105
- # You are currently rebasing.
107
+ # You are currently rebasing branch ' \' ' rebase_conflicts ' \' ' on ' \' ' $ONTO ' \' ' .
106
108
# (all conflicts fixed: run "git rebase --continue")
107
109
#
108
110
# Changes to be committed:
@@ -130,10 +132,11 @@ test_expect_success 'prepare for rebase_i_conflicts' '
130
132
131
133
test_expect_success ' status during rebase -i when conflicts unresolved' '
132
134
test_when_finished "git rebase --abort" &&
135
+ ONTO=$(git rev-parse --short rebase_i_conflicts) &&
133
136
test_must_fail git rebase -i rebase_i_conflicts &&
134
- cat >expected <<-\ EOF &&
137
+ cat >expected <<-EOF &&
135
138
# Not currently on any branch.
136
- # You are currently rebasing.
139
+ # You are currently rebasing branch ' \' ' rebase_i_conflicts_second ' \' ' on ' \' ' $ONTO ' \' ' .
137
140
# (fix conflicts and then run "git rebase --continue")
138
141
# (use "git rebase --skip" to skip this patch)
139
142
# (use "git rebase --abort" to check out the original branch)
@@ -154,11 +157,12 @@ test_expect_success 'status during rebase -i when conflicts unresolved' '
154
157
test_expect_success ' status during rebase -i after resolving conflicts' '
155
158
git reset --hard rebase_i_conflicts_second &&
156
159
test_when_finished "git rebase --abort" &&
160
+ ONTO=$(git rev-parse --short rebase_i_conflicts) &&
157
161
test_must_fail git rebase -i rebase_i_conflicts &&
158
162
git add main.txt &&
159
- cat >expected <<-\ EOF &&
163
+ cat >expected <<-EOF &&
160
164
# Not currently on any branch.
161
- # You are currently rebasing.
165
+ # You are currently rebasing branch ' \' ' rebase_i_conflicts_second ' \' ' on ' \' ' $ONTO ' \' ' .
162
166
# (all conflicts fixed: run "git rebase --continue")
163
167
#
164
168
# Changes to be committed:
@@ -182,10 +186,11 @@ test_expect_success 'status when rebasing -i in edit mode' '
182
186
FAKE_LINES="1 edit 2" &&
183
187
export FAKE_LINES &&
184
188
test_when_finished "git rebase --abort" &&
189
+ ONTO=$(git rev-parse --short HEAD~2) &&
185
190
git rebase -i HEAD~2 &&
186
- cat >expected <<-\ EOF &&
191
+ cat >expected <<-EOF &&
187
192
# Not currently on any branch.
188
- # You are currently editing a commit during a rebase .
193
+ # You are currently editing a commit while rebasing branch ' \' ' rebase_i_edit ' \' ' on ' \' ' $ONTO ' \' ' .
189
194
# (use "git commit --amend" to amend the current commit)
190
195
# (use "git rebase --continue" once you are satisfied with your changes)
191
196
#
@@ -206,11 +211,12 @@ test_expect_success 'status when splitting a commit' '
206
211
FAKE_LINES="1 edit 2 3" &&
207
212
export FAKE_LINES &&
208
213
test_when_finished "git rebase --abort" &&
214
+ ONTO=$(git rev-parse --short HEAD~3) &&
209
215
git rebase -i HEAD~3 &&
210
216
git reset HEAD^ &&
211
- cat >expected <<-\ EOF &&
217
+ cat >expected <<-EOF &&
212
218
# Not currently on any branch.
213
- # You are currently splitting a commit during a rebase .
219
+ # You are currently splitting a commit while rebasing branch ' \' ' split_commit ' \' ' on ' \' ' $ONTO ' \' ' .
214
220
# (Once your working directory is clean, run "git rebase --continue")
215
221
#
216
222
# Changes not staged for commit:
@@ -236,11 +242,12 @@ test_expect_success 'status after editing the last commit with --amend during a
236
242
FAKE_LINES="1 2 edit 3" &&
237
243
export FAKE_LINES &&
238
244
test_when_finished "git rebase --abort" &&
245
+ ONTO=$(git rev-parse --short HEAD~3) &&
239
246
git rebase -i HEAD~3 &&
240
247
git commit --amend -m "foo" &&
241
- cat >expected <<-\ EOF &&
248
+ cat >expected <<-EOF &&
242
249
# Not currently on any branch.
243
- # You are currently editing a commit during a rebase .
250
+ # You are currently editing a commit while rebasing branch ' \' ' amend_last ' \' ' on ' \' ' $ONTO ' \' ' .
244
251
# (use "git commit --amend" to amend the current commit)
245
252
# (use "git rebase --continue" once you are satisfied with your changes)
246
253
#
@@ -265,11 +272,12 @@ test_expect_success 'status: (continue first edit) second edit' '
265
272
FAKE_LINES="edit 1 edit 2 3" &&
266
273
export FAKE_LINES &&
267
274
test_when_finished "git rebase --abort" &&
275
+ ONTO=$(git rev-parse --short HEAD~3) &&
268
276
git rebase -i HEAD~3 &&
269
277
git rebase --continue &&
270
- cat >expected <<-\ EOF &&
278
+ cat >expected <<-EOF &&
271
279
# Not currently on any branch.
272
- # You are currently editing a commit during a rebase .
280
+ # You are currently editing a commit while rebasing branch ' \' ' several_edits ' \' ' on ' \' ' $ONTO ' \' ' .
273
281
# (use "git commit --amend" to amend the current commit)
274
282
# (use "git rebase --continue" once you are satisfied with your changes)
275
283
#
@@ -285,12 +293,13 @@ test_expect_success 'status: (continue first edit) second edit and split' '
285
293
FAKE_LINES="edit 1 edit 2 3" &&
286
294
export FAKE_LINES &&
287
295
test_when_finished "git rebase --abort" &&
296
+ ONTO=$(git rev-parse --short HEAD~3) &&
288
297
git rebase -i HEAD~3 &&
289
298
git rebase --continue &&
290
299
git reset HEAD^ &&
291
- cat >expected <<-\ EOF &&
300
+ cat >expected <<-EOF &&
292
301
# Not currently on any branch.
293
- # You are currently splitting a commit during a rebase .
302
+ # You are currently splitting a commit while rebasing branch ' \' ' several_edits ' \' ' on ' \' ' $ONTO ' \' ' .
294
303
# (Once your working directory is clean, run "git rebase --continue")
295
304
#
296
305
# Changes not staged for commit:
@@ -311,12 +320,13 @@ test_expect_success 'status: (continue first edit) second edit and amend' '
311
320
FAKE_LINES="edit 1 edit 2 3" &&
312
321
export FAKE_LINES &&
313
322
test_when_finished "git rebase --abort" &&
323
+ ONTO=$(git rev-parse --short HEAD~3) &&
314
324
git rebase -i HEAD~3 &&
315
325
git rebase --continue &&
316
326
git commit --amend -m "foo" &&
317
- cat >expected <<-\ EOF &&
327
+ cat >expected <<-EOF &&
318
328
# Not currently on any branch.
319
- # You are currently editing a commit during a rebase .
329
+ # You are currently editing a commit while rebasing branch ' \' ' several_edits ' \' ' on ' \' ' $ONTO ' \' ' .
320
330
# (use "git commit --amend" to amend the current commit)
321
331
# (use "git rebase --continue" once you are satisfied with your changes)
322
332
#
@@ -332,12 +342,13 @@ test_expect_success 'status: (amend first edit) second edit' '
332
342
FAKE_LINES="edit 1 edit 2 3" &&
333
343
export FAKE_LINES &&
334
344
test_when_finished "git rebase --abort" &&
345
+ ONTO=$(git rev-parse --short HEAD~3) &&
335
346
git rebase -i HEAD~3 &&
336
347
git commit --amend -m "a" &&
337
348
git rebase --continue &&
338
- cat >expected <<-\ EOF &&
349
+ cat >expected <<-EOF &&
339
350
# Not currently on any branch.
340
- # You are currently editing a commit during a rebase .
351
+ # You are currently editing a commit while rebasing branch ' \' ' several_edits ' \' ' on ' \' ' $ONTO ' \' ' .
341
352
# (use "git commit --amend" to amend the current commit)
342
353
# (use "git rebase --continue" once you are satisfied with your changes)
343
354
#
@@ -353,13 +364,14 @@ test_expect_success 'status: (amend first edit) second edit and split' '
353
364
FAKE_LINES="edit 1 edit 2 3" &&
354
365
export FAKE_LINES &&
355
366
test_when_finished "git rebase --abort" &&
367
+ ONTO=$(git rev-parse --short HEAD~3) &&
356
368
git rebase -i HEAD~3 &&
357
369
git commit --amend -m "b" &&
358
370
git rebase --continue &&
359
371
git reset HEAD^ &&
360
- cat >expected <<-\ EOF &&
372
+ cat >expected <<-EOF &&
361
373
# Not currently on any branch.
362
- # You are currently splitting a commit during a rebase .
374
+ # You are currently splitting a commit while rebasing branch ' \' ' several_edits ' \' ' on ' \' ' $ONTO ' \' ' .
363
375
# (Once your working directory is clean, run "git rebase --continue")
364
376
#
365
377
# Changes not staged for commit:
@@ -380,13 +392,14 @@ test_expect_success 'status: (amend first edit) second edit and amend' '
380
392
FAKE_LINES="edit 1 edit 2 3" &&
381
393
export FAKE_LINES &&
382
394
test_when_finished "git rebase --abort" &&
395
+ ONTO=$(git rev-parse --short HEAD~3) &&
383
396
git rebase -i HEAD~3 &&
384
397
git commit --amend -m "c" &&
385
398
git rebase --continue &&
386
399
git commit --amend -m "d" &&
387
- cat >expected <<-\ EOF &&
400
+ cat >expected <<-EOF &&
388
401
# Not currently on any branch.
389
- # You are currently editing a commit during a rebase .
402
+ # You are currently editing a commit while rebasing branch ' \' ' several_edits ' \' ' on ' \' ' $ONTO ' \' ' .
390
403
# (use "git commit --amend" to amend the current commit)
391
404
# (use "git rebase --continue" once you are satisfied with your changes)
392
405
#
@@ -402,14 +415,15 @@ test_expect_success 'status: (split first edit) second edit' '
402
415
FAKE_LINES="edit 1 edit 2 3" &&
403
416
export FAKE_LINES &&
404
417
test_when_finished "git rebase --abort" &&
418
+ ONTO=$(git rev-parse --short HEAD~3) &&
405
419
git rebase -i HEAD~3 &&
406
420
git reset HEAD^ &&
407
421
git add main.txt &&
408
422
git commit -m "e" &&
409
423
git rebase --continue &&
410
- cat >expected <<-\ EOF &&
424
+ cat >expected <<-EOF &&
411
425
# Not currently on any branch.
412
- # You are currently editing a commit during a rebase .
426
+ # You are currently editing a commit while rebasing branch ' \' ' several_edits ' \' ' on ' \' ' $ONTO ' \' ' .
413
427
# (use "git commit --amend" to amend the current commit)
414
428
# (use "git rebase --continue" once you are satisfied with your changes)
415
429
#
@@ -425,15 +439,16 @@ test_expect_success 'status: (split first edit) second edit and split' '
425
439
FAKE_LINES="edit 1 edit 2 3" &&
426
440
export FAKE_LINES &&
427
441
test_when_finished "git rebase --abort" &&
442
+ ONTO=$(git rev-parse --short HEAD~3) &&
428
443
git rebase -i HEAD~3 &&
429
444
git reset HEAD^ &&
430
445
git add main.txt &&
431
446
git commit --amend -m "f" &&
432
447
git rebase --continue &&
433
448
git reset HEAD^ &&
434
- cat >expected <<-\ EOF &&
449
+ cat >expected <<-EOF &&
435
450
# Not currently on any branch.
436
- # You are currently splitting a commit during a rebase .
451
+ # You are currently splitting a commit while rebasing branch ' \' ' several_edits ' \' ' on ' \' ' $ONTO ' \' ' .
437
452
# (Once your working directory is clean, run "git rebase --continue")
438
453
#
439
454
# Changes not staged for commit:
@@ -454,15 +469,16 @@ test_expect_success 'status: (split first edit) second edit and amend' '
454
469
FAKE_LINES="edit 1 edit 2 3" &&
455
470
export FAKE_LINES &&
456
471
test_when_finished "git rebase --abort" &&
472
+ ONTO=$(git rev-parse --short HEAD~3) &&
457
473
git rebase -i HEAD~3 &&
458
474
git reset HEAD^ &&
459
475
git add main.txt &&
460
476
git commit --amend -m "g" &&
461
477
git rebase --continue &&
462
478
git commit --amend -m "h" &&
463
- cat >expected <<-\ EOF &&
479
+ cat >expected <<-EOF &&
464
480
# Not currently on any branch.
465
- # You are currently editing a commit during a rebase .
481
+ # You are currently editing a commit while rebasing branch ' \' ' several_edits ' \' ' on ' \' ' $ONTO ' \' ' .
466
482
# (use "git commit --amend" to amend the current commit)
467
483
# (use "git rebase --continue" once you are satisfied with your changes)
468
484
#
@@ -558,7 +574,7 @@ test_expect_success 'status when bisecting' '
558
574
git bisect good one_bisect &&
559
575
cat >expected <<-\EOF &&
560
576
# Not currently on any branch.
561
- # You are currently bisecting.
577
+ # You are currently bisecting branch ' \' ' bisect ' \' ' .
562
578
# (use "git bisect reset" to get back to the original branch)
563
579
#
564
580
nothing to commit (use -u to show untracked files)
@@ -577,10 +593,11 @@ test_expect_success 'status when rebase conflicts with statushints disabled' '
577
593
test_commit two_statushints main.txt two &&
578
594
test_commit three_statushints main.txt three &&
579
595
test_when_finished "git rebase --abort" &&
596
+ ONTO=$(git rev-parse --short HEAD^^) &&
580
597
test_must_fail git rebase HEAD^ --onto HEAD^^ &&
581
- cat >expected <<-\ EOF &&
598
+ cat >expected <<-EOF &&
582
599
# Not currently on any branch.
583
- # You are currently rebasing.
600
+ # You are currently rebasing branch ' \' ' statushints_disabled ' \' ' on ' \' ' $ONTO ' \' ' .
584
601
#
585
602
# Unmerged paths:
586
603
# both modified: main.txt
0 commit comments