Skip to content

Commit

Permalink
Merge branch 'maint-1.5.4' into maint
Browse files Browse the repository at this point in the history
* maint-1.5.4:
  bisect: fix bad rev checking in "git bisect good"
  revision.c: make --date-order overriddable
  Fix section about backdating tags in the git-tag docs
  Document option --only of git commit
  Documentation/git-request-pull: Fixed a typo ("send" -> "end")
  • Loading branch information
Junio C Hamano committed Apr 12, 2008
2 parents a68972c + e338907 commit eed8183
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 13 deletions.
11 changes: 11 additions & 0 deletions Documentation/git-commit.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,17 @@ but can be used to amend a merge commit.
as well. This is usually not what you want unless you
are concluding a conflicted merge.

-o|--only::
Make a commit only from the paths specified on the
command line, disregarding any contents that have been
staged so far. This is the default mode of operation of
'git commit' if any paths are given on the command line,
in which case this option can be omitted.
If this option is specified together with '--amend', then
no paths need be specified, which can be used to amend
the last commit without committing changes that have
already been staged.

-u|--untracked-files::
Show all untracked files, also those in uninteresting
directories, in the "Untracked files:" section of commit
Expand Down
2 changes: 1 addition & 1 deletion Documentation/git-request-pull.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ OPTIONS
URL to include in the summary.

<end>::
Commit to send at; defaults to HEAD.
Commit to end at; defaults to HEAD.

Author
------
Expand Down
4 changes: 2 additions & 2 deletions Documentation/git-tag.txt
Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,14 @@ the tag object affects, for example, the ordering of tags in the
gitweb interface.

To set the date used in future tag objects, set the environment
variable GIT_AUTHOR_DATE to one or more of the date and time. The
variable GIT_COMMITTER_DATE to one or more of the date and time. The
date and time can be specified in a number of ways; the most common
is "YYYY-MM-DD HH:MM".

An example follows.

------------
$ GIT_AUTHOR_DATE="2006-10-02 10:31" git tag -s v1.0.1
$ GIT_COMMITTER_DATE="2006-10-02 10:31" git tag -s v1.0.1
------------


Expand Down
2 changes: 1 addition & 1 deletion builtin-commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ static struct option builtin_commit_options[] = {
OPT_BOOLEAN('a', "all", &all, "commit all changed files"),
OPT_BOOLEAN('i', "include", &also, "add specified files to index for commit"),
OPT_BOOLEAN(0, "interactive", &interactive, "interactively add files"),
OPT_BOOLEAN('o', "only", &only, ""),
OPT_BOOLEAN('o', "only", &only, "commit only specified files"),
OPT_BOOLEAN('n', "no-verify", &no_verify, "bypass pre-commit hook"),
OPT_BOOLEAN(0, "amend", &amend, "amend previous commit"),
OPT_BOOLEAN(0, "untracked-files", &untracked_files, "show all untracked files"),
Expand Down
14 changes: 5 additions & 9 deletions git-bisect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,20 +151,16 @@ bisect_state() {
rev=$(git rev-parse --verify HEAD) ||
die "Bad rev input: HEAD"
bisect_write "$state" "$rev" ;;
2,bad)
rev=$(git rev-parse --verify "$2^{commit}") ||
die "Bad rev input: $2"
bisect_write "$state" "$rev" ;;
*,good|*,skip)
2,bad|*,good|*,skip)
shift
revs=$(git rev-parse --revs-only --no-flags "$@") &&
test '' != "$revs" || die "Bad rev input: $@"
for rev in $revs
for rev in "$@"
do
rev=$(git rev-parse --verify "$rev^{commit}") ||
die "Bad rev commit: $rev^{commit}"
die "Bad rev input: $rev"
bisect_write "$state" "$rev"
done ;;
*,bad)
die "'git bisect bad' can take only one argument." ;;
*)
usage ;;
esac
Expand Down
1 change: 1 addition & 0 deletions revision.c
Original file line number Diff line number Diff line change
Expand Up @@ -1083,6 +1083,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
continue;
}
if (!strcmp(arg, "--topo-order")) {
revs->lifo = 1;
revs->topo_order = 1;
continue;
}
Expand Down
13 changes: 13 additions & 0 deletions t/t6030-bisect-porcelain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,19 @@ test_expect_success 'bisect start with one bad and good' '
git bisect next
'

test_expect_success 'bisect good and bad fails if not given only revs' '
git bisect reset &&
git bisect start &&
test_must_fail git bisect good foo $HASH1 &&
test_must_fail git bisect good $HASH1 bar &&
test_must_fail git bisect bad frotz &&
test_must_fail git bisect bad $HASH3 $HASH4 &&
test_must_fail git bisect skip bar $HASH3 &&
test_must_fail git bisect skip $HASH1 foo &&
git bisect good $HASH1 &&
git bisect bad $HASH4
'

test_expect_success 'bisect reset: back in the master branch' '
git bisect reset &&
echo "* master" > branch.expect &&
Expand Down

0 comments on commit eed8183

Please sign in to comment.