Code

Merge branch 'maint-1.6.0' into maint-1.6.1
authorJunio C Hamano <gitster@pobox.com>
Mon, 30 Mar 2009 20:23:53 +0000 (13:23 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 30 Mar 2009 20:23:53 +0000 (13:23 -0700)
* maint-1.6.0:
  Fix bash completion in path with spaces
  bash completion: only show 'log --merge' if merging
  git-tag(1): add hint about commit messages
  Documentation: update graph api example.

1  2 
Documentation/git-tag.txt
contrib/completion/git-completion.bash

index e44f54302500172257fd9ea394f45707779cbac8,1f34948167cf9aba7055f92c75afb0d9a76f744d..3546acffb5197ac2ed1a542607fc244bc31b3ae3
@@@ -63,6 -63,7 +63,7 @@@ OPTION
        are printed when using -l.
        The default is not to print any annotation lines.
        If no number is given to `-n`, only the first line is printed.
+       If the tag is not annotated, the commit message is displayed instead.
  
  -l <pattern>::
        List tags with names that match the given pattern (or all if no pattern is given).
@@@ -70,7 -71,7 +71,7 @@@
  
  -m <msg>::
        Use the given tag message (instead of prompting).
 -      If multiple `-m` options are given, there values are
 +      If multiple `-m` options are given, their values are
        concatenated as separate paragraphs.
        Implies `-a` if none of `-a`, `-s`, or `-u <key-id>`
        is given.
@@@ -207,7 -208,7 +208,7 @@@ determines who are interested in whose 
  
  A one-shot pull is a sign that a commit history is now crossing
  the boundary between one circle of people (e.g. "people who are
 -primarily interested in networking part of the kernel") who may
 +primarily interested in the networking part of the kernel") who may
  have their own set of tags (e.g. "this is the third release
  candidate from the networking group to be proposed for general
  consumption with 2.6.21 release") to another circle of people
index e00454983ee16624910e40fec9ddb12849110b1b,8fc01fb4971d80a92712aaf5306fce59ece564be..3889cfb5aa20c93e6945784e48924dff3d73c391
@@@ -154,8 -154,11 +154,8 @@@ __git_heads (
  {
        local cmd i is_hash=y dir="$(__gitdir "$1")"
        if [ -d "$dir" ]; then
 -              for i in $(git --git-dir="$dir" \
 -                      for-each-ref --format='%(refname)' \
 -                      refs/heads ); do
 -                      echo "${i#refs/heads/}"
 -              done
 +              git --git-dir="$dir" for-each-ref --format='%(refname:short)' \
 +                      refs/heads
                return
        fi
        for i in $(git ls-remote "$1" 2>/dev/null); do
@@@ -172,8 -175,11 +172,8 @@@ __git_tags (
  {
        local cmd i is_hash=y dir="$(__gitdir "$1")"
        if [ -d "$dir" ]; then
 -              for i in $(git --git-dir="$dir" \
 -                      for-each-ref --format='%(refname)' \
 -                      refs/tags ); do
 -                      echo "${i#refs/tags/}"
 -              done
 +              git --git-dir="$dir" for-each-ref --format='%(refname:short)' \
 +                      refs/tags
                return
        fi
        for i in $(git ls-remote "$1" 2>/dev/null); do
  
  __git_refs ()
  {
 -      local cmd i is_hash=y dir="$(__gitdir "$1")"
 +      local i is_hash=y dir="$(__gitdir "$1")"
 +      local cur="${COMP_WORDS[COMP_CWORD]}" format refs
        if [ -d "$dir" ]; then
 -              if [ -e "$dir/HEAD" ]; then echo HEAD; fi
 -              for i in $(git --git-dir="$dir" \
 -                      for-each-ref --format='%(refname)' \
 -                      refs/tags refs/heads refs/remotes); do
 -                      case "$i" in
 -                              refs/tags/*)    echo "${i#refs/tags/}" ;;
 -                              refs/heads/*)   echo "${i#refs/heads/}" ;;
 -                              refs/remotes/*) echo "${i#refs/remotes/}" ;;
 -                              *)              echo "$i" ;;
 -                      esac
 -              done
 +              case "$cur" in
 +              refs|refs/*)
 +                      format="refname"
 +                      refs="${cur%/*}"
 +                      ;;
 +              *)
 +                      if [ -e "$dir/HEAD" ]; then echo HEAD; fi
 +                      format="refname:short"
 +                      refs="refs/tags refs/heads refs/remotes"
 +                      ;;
 +              esac
 +              git --git-dir="$dir" for-each-ref --format="%($format)" \
 +                      $refs
                return
        fi
        for i in $(git ls-remote "$dir" 2>/dev/null); do
@@@ -878,7 -881,6 +878,7 @@@ _git_help (
                attributes cli core-tutorial cvs-migration
                diffcore gitk glossary hooks ignore modules
                repository-layout tutorial tutorial-2
 +              workflows
                "
  }
  
@@@ -935,6 -937,11 +935,11 @@@ _git_log (
        __git_has_doubledash && return
  
        local cur="${COMP_WORDS[COMP_CWORD]}"
+       local g="$(git rev-parse --git-dir 2>/dev/null)"
+       local merge=""
+       if [ -f "$g/MERGE_HEAD" ]; then
+               merge="--merge"
+       fi
        case "$cur" in
        --pretty=*)
                __gitcomp "
                        --decorate --diff-filter=
                        --color-words --walk-reflogs
                        --parents --children --full-history
-                       --merge
+                       $merge
                        "
                return
                ;;
@@@ -1110,8 -1117,7 +1115,8 @@@ _git_send_email (
                        --no-suppress-from --no-thread --quiet
                        --signed-off-by-cc --smtp-pass --smtp-server
                        --smtp-server-port --smtp-ssl --smtp-user --subject
 -                      --suppress-cc --suppress-from --thread --to"
 +                      --suppress-cc --suppress-from --thread --to
 +                      --validate --no-validate"
                return
                ;;
        esac
@@@ -1155,7 -1161,7 +1160,7 @@@ _git_config (
                ;;
        color.*.*)
                __gitcomp "
 -                      black red green yellow blue magenta cyan white
 +                      normal black red green yellow blue magenta cyan white
                        bold dim ul blink reverse
                        "
                return
        branch.*.*)
                local pfx="${cur%.*}."
                cur="${cur##*.}"
 -              __gitcomp "remote merge" "$pfx" "$cur"
 +              __gitcomp "remote merge mergeoptions" "$pfx" "$cur"
                return
                ;;
        branch.*)
                local pfx="${cur%.*}."
                cur="${cur##*.}"
                __gitcomp "
 -                      url fetch push skipDefaultUpdate
 +                      url proxy fetch push mirror skipDefaultUpdate
                        receivepack uploadpack tagopt
                        " "$pfx" "$cur"
                return
        esac
        __gitcomp "
                apply.whitespace
 -              core.fileMode
 -              core.gitProxy
 -              core.ignoreStat
 -              core.preferSymlinkRefs
 -              core.logAllRefUpdates
 -              core.loosecompression
 -              core.repositoryFormatVersion
 -              core.sharedRepository
 -              core.warnAmbiguousRefs
 -              core.compression
 -              core.packedGitWindowSize
 -              core.packedGitLimit
 +              branch.autosetupmerge
 +              branch.autosetuprebase
                clean.requireForce
                color.branch
                color.branch.current
                color.branch.local
 -              color.branch.remote
                color.branch.plain
 +              color.branch.remote
                color.diff
 -              color.diff.plain
 -              color.diff.meta
 +              color.diff.commit
                color.diff.frag
 -              color.diff.old
 +              color.diff.meta
                color.diff.new
 -              color.diff.commit
 +              color.diff.old
 +              color.diff.plain
                color.diff.whitespace
 +              color.interactive
 +              color.interactive.header
 +              color.interactive.help
 +              color.interactive.prompt
                color.pager
                color.status
 -              color.status.header
                color.status.added
                color.status.changed
 +              color.status.header
 +              color.status.nobranch
                color.status.untracked
 +              color.status.updated
 +              color.ui
 +              commit.template
 +              core.autocrlf
 +              core.bare
 +              core.compression
 +              core.deltaBaseCacheLimit
 +              core.editor
 +              core.excludesfile
 +              core.fileMode
 +              core.fsyncobjectfiles
 +              core.gitProxy
 +              core.ignoreCygwinFSTricks
 +              core.ignoreStat
 +              core.logAllRefUpdates
 +              core.loosecompression
 +              core.packedGitLimit
 +              core.packedGitWindowSize
 +              core.pager
 +              core.preferSymlinkRefs
 +              core.preloadindex
 +              core.quotepath
 +              core.repositoryFormatVersion
 +              core.safecrlf
 +              core.sharedRepository
 +              core.symlinks
 +              core.trustctime
 +              core.warnAmbiguousRefs
 +              core.whitespace
 +              core.worktree
 +              diff.autorefreshindex
 +              diff.external
 +              diff.mnemonicprefix
                diff.renameLimit
 +              diff.renameLimit.
                diff.renames
                fetch.unpackLimit
                format.headers
 -              format.subjectprefix
 -              gitcvs.enabled
 -              gitcvs.logfile
 -              gitcvs.allbinary
 -              gitcvs.dbname gitcvs.dbdriver gitcvs.dbuser gitcvs.dbpass
 -              gitcvs.dbtablenameprefix
 +              format.numbered
 +              format.pretty
 +              format.suffix
 +              gc.aggressiveWindow
 +              gc.auto
 +              gc.autopacklimit
                gc.packrefs
 +              gc.pruneexpire
                gc.reflogexpire
                gc.reflogexpireunreachable
                gc.rerereresolved
                gc.rerereunresolved
 -              http.sslVerify
 -              http.sslCert
 -              http.sslKey
 -              http.sslCAInfo
 -              http.sslCAPath
 -              http.maxRequests
 +              gitcvs.allbinary
 +              gitcvs.dbTableNamePrefix
 +              gitcvs.dbdriver
 +              gitcvs.dbname
 +              gitcvs.dbpass
 +              gitcvs.dbuser
 +              gitcvs.enabled
 +              gitcvs.logfile
 +              gitcvs.usecrlfattr
 +              gui.blamehistoryctx
 +              gui.commitmsgwidth
 +              gui.copyblamethreshold
 +              gui.diffcontext
 +              gui.encoding
 +              gui.fastcopyblame
 +              gui.matchtrackingbranch
 +              gui.newbranchtemplate
 +              gui.pruneduringfetch
 +              gui.spellingdictionary
 +              gui.trustmtime
 +              help.autocorrect
 +              help.browser
 +              help.format
                http.lowSpeedLimit
                http.lowSpeedTime
 +              http.maxRequests
                http.noEPSV
 +              http.proxy
 +              http.sslCAInfo
 +              http.sslCAPath
 +              http.sslCert
 +              http.sslKey
 +              http.sslVerify
                i18n.commitEncoding
                i18n.logOutputEncoding
 +              instaweb.browser
 +              instaweb.httpd
 +              instaweb.local
 +              instaweb.modulepath
 +              instaweb.port
 +              log.date
                log.showroot
 +              man.viewer
 +              merge.conflictstyle
 +              merge.log
 +              merge.renameLimit
 +              merge.stat
                merge.tool
 -              merge.summary
                merge.verbosity
 -              pack.window
 -              pack.depth
 -              pack.windowMemory
 +              mergetool.keepBackup
                pack.compression
 -              pack.deltaCacheSize
                pack.deltaCacheLimit
 +              pack.deltaCacheSize
 +              pack.depth
 +              pack.indexVersion
 +              pack.packSizeLimit
 +              pack.threads
 +              pack.window
 +              pack.windowMemory
                pull.octopus
                pull.twohead
 -              repack.useDeltaBaseOffset
 +              receive.denyCurrentBranch
 +              receive.denyDeletes
 +              receive.denyNonFastForwards
 +              receive.fsckObjects
 +              receive.unpackLimit
 +              repack.usedeltabaseoffset
 +              rerere.autoupdate
 +              rerere.enabled
                showbranch.default
 +              status.relativePaths
 +              status.showUntrackedFiles
                tar.umask
                transfer.unpackLimit
 -              receive.unpackLimit
 -              receive.denyNonFastForwards
 -              user.name
                user.email
 +              user.name
                user.signingkey
 +              web.browser
                branch. remote.
        "
  }
@@@ -1527,7 -1457,7 +1532,7 @@@ _git_submodule (
  {
        __git_has_doubledash && return
  
 -      local subcommands="add status init update"
 +      local subcommands="add status init update summary foreach sync"
        if [ -z "$(__git_find_subcommand "$subcommands")" ]; then
                local cur="${COMP_WORDS[COMP_CWORD]}"
                case "$cur" in
@@@ -1751,7 -1681,7 +1756,7 @@@ _gitk (
        local cur="${COMP_WORDS[COMP_CWORD]}"
        local g="$(git rev-parse --git-dir 2>/dev/null)"
        local merge=""
-       if [ -f $g/MERGE_HEAD ]; then
+       if [ -f "$g/MERGE_HEAD" ]; then
                merge="--merge"
        fi
        case "$cur" in