Skip to content

Commit 21d0bc2

Browse files
Nanako Shiraishigitster
authored andcommitted
git-bisect: call the found commit "*the* first bad commit"
Signed-off-by: Nanako Shiraishi <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1d2a7e0 commit 21d0bc2

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

bisect.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ int bisect_next_all(const char *prefix)
991991

992992
if (!hashcmp(bisect_rev, current_bad_sha1)) {
993993
exit_if_skipped_commits(tried, current_bad_sha1);
994-
printf("%s is first bad commit\n", bisect_rev_hex);
994+
printf("%s is the first bad commit\n", bisect_rev_hex);
995995
show_diff_tree(prefix, revs.commits->item);
996996
/* This means the bisection process succeeded. */
997997
exit(10);

git-bisect.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ bisect_run () {
405405
exit $res
406406
fi
407407

408-
if grep "is first bad commit" "$GIT_DIR/BISECT_RUN" > /dev/null; then
408+
if grep "is the first bad commit" "$GIT_DIR/BISECT_RUN" > /dev/null; then
409409
echo "bisect run success"
410410
exit 0;
411411
fi

t/t6030-bisect-porcelain.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ test_expect_success 'bisect skip: successfull result' '
175175
git bisect start $HASH4 $HASH1 &&
176176
git bisect skip &&
177177
git bisect bad > my_bisect_log.txt &&
178-
grep "$HASH2 is first bad commit" my_bisect_log.txt &&
178+
grep "$HASH2 is the first bad commit" my_bisect_log.txt &&
179179
git bisect reset
180180
'
181181

@@ -261,7 +261,7 @@ test_expect_success \
261261
git bisect good $HASH1 &&
262262
git bisect bad $HASH4 &&
263263
git bisect run ./test_script.sh > my_bisect_log.txt &&
264-
grep "$HASH3 is first bad commit" my_bisect_log.txt &&
264+
grep "$HASH3 is the first bad commit" my_bisect_log.txt &&
265265
git bisect reset'
266266

267267
# We want to automatically find the commit that
@@ -274,7 +274,7 @@ test_expect_success \
274274
chmod +x test_script.sh &&
275275
git bisect start $HASH4 $HASH1 &&
276276
git bisect run ./test_script.sh > my_bisect_log.txt &&
277-
grep "$HASH4 is first bad commit" my_bisect_log.txt &&
277+
grep "$HASH4 is the first bad commit" my_bisect_log.txt &&
278278
git bisect reset'
279279

280280
# $HASH1 is good, $HASH5 is bad, we skip $HASH3
@@ -287,14 +287,14 @@ test_expect_success 'bisect skip: add line and then a new test' '
287287
git bisect start $HASH5 $HASH1 &&
288288
git bisect skip &&
289289
git bisect good > my_bisect_log.txt &&
290-
grep "$HASH5 is first bad commit" my_bisect_log.txt &&
290+
grep "$HASH5 is the first bad commit" my_bisect_log.txt &&
291291
git bisect log > log_to_replay.txt &&
292292
git bisect reset
293293
'
294294

295295
test_expect_success 'bisect skip and bisect replay' '
296296
git bisect replay log_to_replay.txt > my_bisect_log.txt &&
297-
grep "$HASH5 is first bad commit" my_bisect_log.txt &&
297+
grep "$HASH5 is the first bad commit" my_bisect_log.txt &&
298298
git bisect reset
299299
'
300300

@@ -335,7 +335,7 @@ test_expect_success 'bisect run & skip: find first bad' '
335335
chmod +x test_script.sh &&
336336
git bisect start $HASH7 $HASH1 &&
337337
git bisect run ./test_script.sh > my_bisect_log.txt &&
338-
grep "$HASH6 is first bad commit" my_bisect_log.txt
338+
grep "$HASH6 is the first bad commit" my_bisect_log.txt
339339
'
340340

341341
test_expect_success 'bisect skip only one range' '
@@ -385,7 +385,7 @@ test_expect_success 'bisect does not create a "bisect" branch' '
385385
rev_hash6=$(git rev-parse --verify HEAD) &&
386386
test "$rev_hash6" = "$HASH6" &&
387387
git bisect good > my_bisect_log.txt &&
388-
grep "$HASH7 is first bad commit" my_bisect_log.txt &&
388+
grep "$HASH7 is the first bad commit" my_bisect_log.txt &&
389389
git bisect reset &&
390390
rev_hash6=$(git rev-parse --verify bisect) &&
391391
test "$rev_hash6" = "$HASH6" &&
@@ -534,7 +534,7 @@ test_expect_success 'restricting bisection on one dir' '
534534
para1=$(git rev-parse --verify HEAD) &&
535535
test "$para1" = "$PARA_HASH1" &&
536536
git bisect bad > my_bisect_log.txt &&
537-
grep "$PARA_HASH1 is first bad commit" my_bisect_log.txt
537+
grep "$PARA_HASH1 is the first bad commit" my_bisect_log.txt
538538
'
539539

540540
test_expect_success 'restricting bisection on one dir and a file' '
@@ -552,7 +552,7 @@ test_expect_success 'restricting bisection on one dir and a file' '
552552
para1=$(git rev-parse --verify HEAD) &&
553553
test "$para1" = "$PARA_HASH1" &&
554554
git bisect good > my_bisect_log.txt &&
555-
grep "$PARA_HASH4 is first bad commit" my_bisect_log.txt
555+
grep "$PARA_HASH4 is the first bad commit" my_bisect_log.txt
556556
'
557557

558558
test_expect_success 'skipping away from skipped commit' '

0 commit comments

Comments
 (0)