OSDN Git Service

Merge branch 'maint'
authorJunio C Hamano <gitster@pobox.com>
Sun, 2 May 2010 03:23:10 +0000 (20:23 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 2 May 2010 03:23:10 +0000 (20:23 -0700)
* maint:
  index-pack: fix trivial typo in usage string
  git-submodule.sh: properly initialize shell variables

1  2 
builtin/index-pack.c
git-submodule.sh

diff --combined builtin/index-pack.c
@@@ -11,7 -11,7 +11,7 @@@
  #include "exec_cmd.h"
  
  static const char index_pack_usage[] =
- "git index-pack [-v] [-o <index-file>] [{ ---keep | --keep=<msg> }] [--strict] { <pack-file> | --stdin [--fix-thin] [<pack-file>] }";
+ "git index-pack [-v] [-o <index-file>] [{ --keep | --keep=<msg> }] [--strict] { <pack-file> | --stdin [--fix-thin] [<pack-file>] }";
  
  struct object_entry
  {
diff --combined git-submodule.sh
@@@ -21,6 -21,8 +21,8 @@@ command
  branch=
  reference=
  cached=
+ recursive=
+ init=
  files=
  nofetch=
  update=
@@@ -553,17 -555,12 +555,17 @@@ cmd_summary() 
  
        test $summary_limit = 0 && return
  
 -      if rev=$(git rev-parse -q --verify "$1^0")
 +      if rev=$(git rev-parse -q --verify --default HEAD ${1+"$1"})
        then
                head=$rev
 -              shift
 +              test $# = 0 || shift
 +      elif test -z "$1" -o "$1" = "HEAD"
 +      then
 +              # before the first commit: compare with an empty tree
 +              head=$(git hash-object -w -t tree --stdin </dev/null)
 +              test -z "$1" || shift
        else
 -              head=HEAD
 +              head="HEAD"
        fi
  
        if [ -n "$files" ]