Merge branch 'maint'
authorJunio C Hamano <gitster@pobox.com>
Sun, 17 May 2009 06:08:49 +0000 (23:08 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 17 May 2009 06:08:49 +0000 (23:08 -0700)
* maint:
completion: add missing options to show-branch and show
dir.c: clean up handling of 'path' parameter in read_directory_recursive()
Fix type-punning issues

1  2 
contrib/completion/git-completion.bash
index b6bcd5cc26eb2cb9cb08d1e9535c3c6e91e16644,a0c5794828a6ed00a3608d9ec22046478da83e96..f8d4cb2c7d6afd2d4f35572148de06ad3e542647
@@@ -1334,35 -1334,6 +1334,35 @@@ _git_send_email (
        COMPREPLY=()
  }
  
 +__git_config_get_set_variables ()
 +{
 +      local prevword word config_file= c=$COMP_CWORD
 +      while [ $c -gt 1 ]; do
 +              word="${COMP_WORDS[c]}"
 +              case "$word" in
 +              --global|--system|--file=*)
 +                      config_file="$word"
 +                      break
 +                      ;;
 +              -f|--file)
 +                      config_file="$word $prevword"
 +                      break
 +                      ;;
 +              esac
 +              prevword=$word
 +              c=$((--c))
 +      done
 +
 +      for i in $(git --git-dir="$(__gitdir)" config $config_file --list \
 +                      2>/dev/null); do
 +              case "$i" in
 +              *.*)
 +                      echo "${i/=*/}"
 +                      ;;
 +              esac
 +      done
 +}
 +
  _git_config ()
  {
        local cur="${COMP_WORDS[COMP_CWORD]}"
                __gitcomp "$__git_send_email_suppresscc_options"
                return
                ;;
 +      --get|--get-all|--unset|--unset-all)
 +              __gitcomp "$(__git_config_get_set_variables)"
 +              return
 +              ;;
        *.*)
                COMPREPLY=()
                return
@@@ -1837,7 -1804,7 +1837,7 @@@ _git_show (
                return
                ;;
        --*)
-               __gitcomp "--pretty= --format=
+               __gitcomp "--pretty= --format= --abbrev-commit --oneline
                        $__git_diff_common_options
                        "
                return
@@@ -1854,7 -1821,7 +1854,7 @@@ _git_show_branch (
                __gitcomp "
                        --all --remotes --topo-order --current --more=
                        --list --independent --merge-base --no-name
-                       --sha1-name --topics --reflog
+                       --sha1-name --sparse --topics --reflog
                        "
                return
                ;;