Code

Merge branch 'maint'
authorJunio C Hamano <gitster@pobox.com>
Sat, 12 Apr 2008 06:56:09 +0000 (23:56 -0700)
committerJunio 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")

1  2 
builtin-commit.c
git-bisect.sh

diff --combined builtin-commit.c
index e3adfdf6d4959d0f7ef96517c03f34039416fe52,05dfc6973aadf4d8a0250f839409c58e0d9cd77d..bcb7aaaa93bb11bfb965fe67a644e2dd46c21c1b
@@@ -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 a1343f61db89766134d90cc2e483e6afbe91d4f0,6644b10e362103faafc232a88ca96c80aabd88d8..ff904e60d96591db7fefb41679e995d9e33a2f5a
@@@ -1,9 -1,7 +1,9 @@@
  #!/bin/sh
  
 -USAGE='[start|bad|good|skip|next|reset|visualize|replay|log|run]'
 -LONG_USAGE='git bisect start [<bad> [<good>...]] [--] [<pathspec>...]
 +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 [<bad> [<good>...]] [--] [<pathspec>...]
          reset bisect state and start bisection.
  git bisect bad [<rev>]
          mark <rev> a known-bad revision.
@@@ -22,9 -20,7 +22,9 @@@ git bisect replay <logfile
  git bisect log
          show bisect log.
  git bisect run <cmd>...
 -        use <cmd>... to automatically bisect.'
 +        use <cmd>... 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)