Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* maint:
  git-log: allow --decorate[=short|full]
  Minor improvement to the write-tree documentation
  git-bisect: call the found commit "*the* first bad commit"
  • Loading branch information
Junio C Hamano committed Aug 26, 2009
2 parents 31f0bce + d8526a4 commit 68ea474
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
3 changes: 2 additions & 1 deletion Documentation/git-write-tree.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ SYNOPSIS

DESCRIPTION
-----------
Creates a tree object using the current index.
Creates a tree object using the current index. The name of the new
tree object is printed to standard output.

The index must be in a fully merged state.

Expand Down
2 changes: 1 addition & 1 deletion bisect.c
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ int bisect_next_all(const char *prefix)

if (!hashcmp(bisect_rev, current_bad_sha1)) {
exit_if_skipped_commits(tried, current_bad_sha1);
printf("%s is first bad commit\n", bisect_rev_hex);
printf("%s is the first bad commit\n", bisect_rev_hex);
show_diff_tree(prefix, revs.commits->item);
/* This means the bisection process succeeded. */
exit(10);
Expand Down
2 changes: 1 addition & 1 deletion git-bisect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ bisect_run () {
exit $res
fi

if grep "is first bad commit" "$GIT_DIR/BISECT_RUN" > /dev/null; then
if grep "is the first bad commit" "$GIT_DIR/BISECT_RUN" > /dev/null; then
echo "bisect run success"
exit 0;
fi
Expand Down
18 changes: 9 additions & 9 deletions t/t6030-bisect-porcelain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ test_expect_success 'bisect skip: successfull result' '
git bisect start $HASH4 $HASH1 &&
git bisect skip &&
git bisect bad > my_bisect_log.txt &&
grep "$HASH2 is first bad commit" my_bisect_log.txt &&
grep "$HASH2 is the first bad commit" my_bisect_log.txt &&
git bisect reset
'

Expand Down Expand Up @@ -261,7 +261,7 @@ test_expect_success \
git bisect good $HASH1 &&
git bisect bad $HASH4 &&
git bisect run ./test_script.sh > my_bisect_log.txt &&
grep "$HASH3 is first bad commit" my_bisect_log.txt &&
grep "$HASH3 is the first bad commit" my_bisect_log.txt &&
git bisect reset'

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

# $HASH1 is good, $HASH5 is bad, we skip $HASH3
Expand All @@ -287,14 +287,14 @@ test_expect_success 'bisect skip: add line and then a new test' '
git bisect start $HASH5 $HASH1 &&
git bisect skip &&
git bisect good > my_bisect_log.txt &&
grep "$HASH5 is first bad commit" my_bisect_log.txt &&
grep "$HASH5 is the first bad commit" my_bisect_log.txt &&
git bisect log > log_to_replay.txt &&
git bisect reset
'

test_expect_success 'bisect skip and bisect replay' '
git bisect replay log_to_replay.txt > my_bisect_log.txt &&
grep "$HASH5 is first bad commit" my_bisect_log.txt &&
grep "$HASH5 is the first bad commit" my_bisect_log.txt &&
git bisect reset
'

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

test_expect_success 'bisect skip only one range' '
Expand Down Expand Up @@ -385,7 +385,7 @@ test_expect_success 'bisect does not create a "bisect" branch' '
rev_hash6=$(git rev-parse --verify HEAD) &&
test "$rev_hash6" = "$HASH6" &&
git bisect good > my_bisect_log.txt &&
grep "$HASH7 is first bad commit" my_bisect_log.txt &&
grep "$HASH7 is the first bad commit" my_bisect_log.txt &&
git bisect reset &&
rev_hash6=$(git rev-parse --verify bisect) &&
test "$rev_hash6" = "$HASH6" &&
Expand Down Expand Up @@ -534,7 +534,7 @@ test_expect_success 'restricting bisection on one dir' '
para1=$(git rev-parse --verify HEAD) &&
test "$para1" = "$PARA_HASH1" &&
git bisect bad > my_bisect_log.txt &&
grep "$PARA_HASH1 is first bad commit" my_bisect_log.txt
grep "$PARA_HASH1 is the first bad commit" my_bisect_log.txt
'

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

test_expect_success 'skipping away from skipped commit' '
Expand Down

0 comments on commit 68ea474

Please sign in to comment.