author | Junio C Hamano <gitster@pobox.com> | |
Sat, 12 Apr 2008 06:56:09 +0000 (23:56 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 12 Apr 2008 06:56:09 +0000 (23:56 -0700) |
* maint:
bisect: fix bad rev checking in "git bisect good"
revision.c: make --date-order overriddable
git-submodule: Avoid 'fatal: cannot describe' message
Force the medium pretty format on calls to git log
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")
bisect: fix bad rev checking in "git bisect good"
revision.c: make --date-order overriddable
git-submodule: Avoid 'fatal: cannot describe' message
Force the medium pretty format on calls to git log
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")
index b4ae61ff46f4b7ff9e71e9e91a999fdc8fc17560..4bb51cc06ec5e1f47b748b14353e49a0acfdc775 100644 (file)
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
index 270df9b185a53977665c2143bdffa6f3c275d326..9a14c04e39bd6c5c41de988f7dd9d18477e92c85 100644 (file)
URL to include in the summary.
<end>::
- Commit to send at; defaults to HEAD.
+ Commit to end at; defaults to HEAD.
Author
------
index 4b6fd90eafbcb9834a4b3bf733fef28b3f895fde..9712392f7946366129056ed8a0b7b8fab83c0ed5 100644 (file)
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
------------
diff --git a/builtin-commit.c b/builtin-commit.c
index e3adfdf6d4959d0f7ef96517c03f34039416fe52..bcb7aaaa93bb11bfb965fe67a644e2dd46c21c1b 100644 (file)
--- a/builtin-commit.c
+++ b/builtin-commit.c
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"),
diff --git a/git-bisect.sh b/git-bisect.sh
index a1343f61db89766134d90cc2e483e6afbe91d4f0..ff904e60d96591db7fefb41679e995d9e33a2f5a 100755 (executable)
--- a/git-bisect.sh
+++ b/git-bisect.sh
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
diff --git a/git-submodule.sh b/git-submodule.sh
index 56ec3536e0c40190329b9867b46e36753f30efb2..7674346c8d9525b0d8928f48354bdbe0af8b8e23 100755 (executable)
--- a/git-submodule.sh
+++ b/git-submodule.sh
cd "$1" && {
git describe "$2" 2>/dev/null ||
git describe --tags "$2" 2>/dev/null ||
- git describe --contains --tags "$2"
+ git describe --contains --tags --always "$2"
}
) )
test -z "$revname" || revname=" ($revname)"
diff --git a/git-svn.perl b/git-svn.perl
index 81afb5cfcd67731a6f8c76a032408a8f048cc1c4..b864b54a4440537900cab47e71ee93bd01d72d28 100755 (executable)
--- a/git-svn.perl
+++ b/git-svn.perl
sub working_head_info {
my ($head, $refs) = @_;
- my @args = ('log', '--no-color', '--first-parent');
+ my @args = ('log', '--no-color', '--first-parent', '--pretty=medium');
my ($fh, $ctx) = command_output_pipe(@args, $head);
my $hash;
my %max;
diff --git a/revision.c b/revision.c
index 196fedc9d1297617b74f058f570beb2f5168c3d6..ffbed3fbf22c22b8862c49bdddd10cab201f86a2 100644 (file)
--- a/revision.c
+++ b/revision.c
@@ -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;
}
index f471c1526f34fa87227ac23b458299063b408ff1..32d6118183c20e90aca115f8feda9e3c72f94eaf 100755 (executable)
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 &&