Skip to content

Commit eed8183

Browse files
committed
Merge branch 'maint-1.5.4' into maint
* 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")
2 parents a68972c + e338907 commit eed8183

File tree

7 files changed

+34
-13
lines changed

7 files changed

+34
-13
lines changed

Documentation/git-commit.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,17 @@ but can be used to amend a merge commit.
139139
as well. This is usually not what you want unless you
140140
are concluding a conflicted merge.
141141

142+
-o|--only::
143+
Make a commit only from the paths specified on the
144+
command line, disregarding any contents that have been
145+
staged so far. This is the default mode of operation of
146+
'git commit' if any paths are given on the command line,
147+
in which case this option can be omitted.
148+
If this option is specified together with '--amend', then
149+
no paths need be specified, which can be used to amend
150+
the last commit without committing changes that have
151+
already been staged.
152+
142153
-u|--untracked-files::
143154
Show all untracked files, also those in uninteresting
144155
directories, in the "Untracked files:" section of commit

Documentation/git-request-pull.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ OPTIONS
2424
URL to include in the summary.
2525

2626
<end>::
27-
Commit to send at; defaults to HEAD.
27+
Commit to end at; defaults to HEAD.
2828

2929
Author
3030
------

Documentation/git-tag.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,14 +233,14 @@ the tag object affects, for example, the ordering of tags in the
233233
gitweb interface.
234234

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

240240
An example follows.
241241

242242
------------
243-
$ GIT_AUTHOR_DATE="2006-10-02 10:31" git tag -s v1.0.1
243+
$ GIT_COMMITTER_DATE="2006-10-02 10:31" git tag -s v1.0.1
244244
------------
245245

246246

builtin-commit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static struct option builtin_commit_options[] = {
9898
OPT_BOOLEAN('a', "all", &all, "commit all changed files"),
9999
OPT_BOOLEAN('i', "include", &also, "add specified files to index for commit"),
100100
OPT_BOOLEAN(0, "interactive", &interactive, "interactively add files"),
101-
OPT_BOOLEAN('o', "only", &only, ""),
101+
OPT_BOOLEAN('o', "only", &only, "commit only specified files"),
102102
OPT_BOOLEAN('n', "no-verify", &no_verify, "bypass pre-commit hook"),
103103
OPT_BOOLEAN(0, "amend", &amend, "amend previous commit"),
104104
OPT_BOOLEAN(0, "untracked-files", &untracked_files, "show all untracked files"),

git-bisect.sh

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -151,20 +151,16 @@ bisect_state() {
151151
rev=$(git rev-parse --verify HEAD) ||
152152
die "Bad rev input: HEAD"
153153
bisect_write "$state" "$rev" ;;
154-
2,bad)
155-
rev=$(git rev-parse --verify "$2^{commit}") ||
156-
die "Bad rev input: $2"
157-
bisect_write "$state" "$rev" ;;
158-
*,good|*,skip)
154+
2,bad|*,good|*,skip)
159155
shift
160-
revs=$(git rev-parse --revs-only --no-flags "$@") &&
161-
test '' != "$revs" || die "Bad rev input: $@"
162-
for rev in $revs
156+
for rev in "$@"
163157
do
164158
rev=$(git rev-parse --verify "$rev^{commit}") ||
165-
die "Bad rev commit: $rev^{commit}"
159+
die "Bad rev input: $rev"
166160
bisect_write "$state" "$rev"
167161
done ;;
162+
*,bad)
163+
die "'git bisect bad' can take only one argument." ;;
168164
*)
169165
usage ;;
170166
esac

revision.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,6 +1083,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
10831083
continue;
10841084
}
10851085
if (!strcmp(arg, "--topo-order")) {
1086+
revs->lifo = 1;
10861087
revs->topo_order = 1;
10871088
continue;
10881089
}

t/t6030-bisect-porcelain.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,19 @@ test_expect_success 'bisect start with one bad and good' '
7171
git bisect next
7272
'
7373

74+
test_expect_success 'bisect good and bad fails if not given only revs' '
75+
git bisect reset &&
76+
git bisect start &&
77+
test_must_fail git bisect good foo $HASH1 &&
78+
test_must_fail git bisect good $HASH1 bar &&
79+
test_must_fail git bisect bad frotz &&
80+
test_must_fail git bisect bad $HASH3 $HASH4 &&
81+
test_must_fail git bisect skip bar $HASH3 &&
82+
test_must_fail git bisect skip $HASH1 foo &&
83+
git bisect good $HASH1 &&
84+
git bisect bad $HASH4
85+
'
86+
7487
test_expect_success 'bisect reset: back in the master branch' '
7588
git bisect reset &&
7689
echo "* master" > branch.expect &&

0 commit comments

Comments
 (0)