From: Junio C Hamano Date: Sat, 12 Apr 2008 06:56:09 +0000 (-0700) Subject: Merge branch 'maint' X-Git-Tag: v1.5.6-rc0~150 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/4cdda2b895dfb6ba084e3952cbf4274a6a2e0338?ds=inline;hp=-c Merge branch 'maint' * 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") --- 4cdda2b895dfb6ba084e3952cbf4274a6a2e0338 diff --combined builtin-commit.c index e3adfdf6d4,05dfc6973a..bcb7aaaa93 --- a/builtin-commit.c +++ b/builtin-commit.c @@@ -98,7 -98,7 +98,7 @@@ static struct option builtin_commit_opt 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"), @@@ -745,8 -745,10 +745,8 @@@ static int parse_and_validate_options(i die("No paths with --include/--only does not make sense."); if (argc == 0 && only && amend) only_include_assumed = "Clever... amending the last one with dirty index."; - if (argc > 0 && !also && !only) { + if (argc > 0 && !also && !only) only_include_assumed = "Explicit paths specified without -i nor -o; assuming --only paths..."; - also = 0; - } if (!cleanup_arg || !strcmp(cleanup_arg, "default")) cleanup_mode = use_editor ? CLEANUP_ALL : CLEANUP_SPACE; else if (!strcmp(cleanup_arg, "verbatim")) diff --combined git-bisect.sh index a1343f61db,6644b10e36..ff904e60d9 --- a/git-bisect.sh +++ b/git-bisect.sh @@@ -1,9 -1,7 +1,9 @@@ #!/bin/sh -USAGE='[start|bad|good|skip|next|reset|visualize|replay|log|run]' -LONG_USAGE='git bisect start [ [...]] [--] [...] +USAGE='[help|start|bad|good|skip|next|reset|visualize|replay|log|run]' +LONG_USAGE='git bisect help + print this long help message. +git bisect start [ [...]] [--] [...] reset bisect state and start bisection. git bisect bad [] mark a known-bad revision. @@@ -22,9 -20,7 +22,9 @@@ git bisect replay ... - use ... to automatically bisect.' + use ... to automatically bisect. + +Please use "git help bisect" to get the full man page.' OPTIONS_SPEC= . git-sh-setup @@@ -155,20 -151,16 +155,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 @@@ -469,8 -461,6 +465,8 @@@ case "$#" i cmd="$1" shift case "$cmd" in + help) + git bisect -h ;; start) bisect_start "$@" ;; bad|good|skip)