Merge branch 'tb/document-status-u-tradeoff'
authorJunio C Hamano <gitster@pobox.com>
Thu, 21 Mar 2013 21:02:10 +0000 (14:02 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 21 Mar 2013 21:02:10 +0000 (14:02 -0700)
Suggest users to look into using--untracked=no option when "git
status" takes too long.

* tb/document-status-u-tradeoff:
status: advise to consider use of -u when read_directory takes too long
git status: document trade-offs in choosing parameters to the -u option

1  2 
Documentation/config.txt
Documentation/git-status.txt
advice.c
advice.h
t/t7508-status.sh
t/t7512-status-help.sh
wt-status.c
wt-status.h
diff --combined Documentation/config.txt
index b3023b817244d5b315f8e3227eaa87fd888ecf95,a16eda5d472a837ed3ded6c4802f34c5a32f4305..975d3d18d5e5873b37ab5b29dcbb9b6cab2dbc6f
@@@ -1,14 -1,14 +1,14 @@@
  CONFIGURATION FILE
  ------------------
  
 -The git configuration file contains a number of variables that affect
 -the git command's behavior. The `.git/config` file in each repository
 +The Git configuration file contains a number of variables that affect
 +the Git commands' behavior. The `.git/config` file in each repository
  is used to store the configuration for that repository, and
  `$HOME/.gitconfig` is used to store a per-user configuration as
  fallback values for the `.git/config` file. The file `/etc/gitconfig`
  can be used to store a system-wide default configuration.
  
 -The configuration variables are used by both the git plumbing
 +The configuration variables are used by both the Git plumbing
  and the porcelains. The variables are divided into sections, wherein
  the fully qualified variable name of the variable itself is the last
  dot-separated segment and the section name is everything before the last
@@@ -140,12 -140,10 +140,12 @@@ advice.*:
        can tell Git that you do not need help by setting these to 'false':
  +
  --
 -      pushNonFastForward::
 +      pushUpdateRejected::
                Set this variable to 'false' if you want to disable
 -              'pushNonFFCurrent', 'pushNonFFDefault', and
 -              'pushNonFFMatching' simultaneously.
 +              'pushNonFFCurrent', 'pushNonFFDefault',
 +              'pushNonFFMatching', 'pushAlreadyExists',
 +              'pushFetchFirst', and 'pushNeedsForce'
 +              simultaneously.
        pushNonFFCurrent::
                Advice shown when linkgit:git-push[1] fails due to a
                non-fast-forward update to the current branch.
                'matching refs' explicitly (i.e. you used ':', or
                specified a refspec that isn't your current branch) and
                it resulted in a non-fast-forward error.
 +      pushAlreadyExists::
 +              Shown when linkgit:git-push[1] rejects an update that
 +              does not qualify for fast-forwarding (e.g., a tag.)
 +      pushFetchFirst::
 +              Shown when linkgit:git-push[1] rejects an update that
 +              tries to overwrite a remote ref that points at an
 +              object we do not have.
 +      pushNeedsForce::
 +              Shown when linkgit:git-push[1] rejects an update that
 +              tries to overwrite a remote ref that points at an
 +              object that is not a committish, or make the remote
 +              ref point at an object that is not a committish.
        statusHints::
                Show directions on how to proceed from the current
 -              state in the output of linkgit:git-status[1] and in
 +              state in the output of linkgit:git-status[1], in
                the template shown when writing commit messages in
 -              linkgit:git-commit[1].
 +              linkgit:git-commit[1], and in the help message shown
 +              by linkgit:git-checkout[1] when switching branch.
+       statusUoption::
+               Advise to consider using the `-u` option to linkgit:git-status[1]
+               when the command takes more than 2 seconds to enumerate untracked
+               files.
        commitBeforeMerge::
                Advice shown when linkgit:git-merge[1] refuses to
                merge to avoid overwriting local changes.
        resolveConflict::
 -              Advices shown by various commands when conflicts
 +              Advice shown by various commands when conflicts
                prevent the operation from being performed.
        implicitIdentity::
                Advice on how to set your identity configuration when
@@@ -219,9 -208,9 +223,9 @@@ core.ignoreCygwinFSTricks:
  
  core.ignorecase::
        If true, this option enables various workarounds to enable
 -      git to work better on filesystems that are not case sensitive,
 +      Git to work better on filesystems that are not case sensitive,
        like FAT. For example, if a directory listing finds
 -      "makefile" when git expects "Makefile", git will assume
 +      "makefile" when Git expects "Makefile", Git will assume
        it is really the same file, and continue to remember it as
        "Makefile".
  +
@@@ -230,13 -219,13 +234,13 @@@ will probe and set core.ignorecase tru
  is created.
  
  core.precomposeunicode::
 -      This option is only used by Mac OS implementation of git.
 -      When core.precomposeunicode=true, git reverts the unicode decomposition
 +      This option is only used by Mac OS implementation of Git.
 +      When core.precomposeunicode=true, Git reverts the unicode decomposition
        of filenames done by Mac OS. This is useful when sharing a repository
        between Mac OS and Linux or Windows.
 -      (Git for Windows 1.7.10 or higher is needed, or git under cygwin 1.7).
 -      When false, file names are handled fully transparent by git,
 -      which is backward compatible with older versions of git.
 +      (Git for Windows 1.7.10 or higher is needed, or Git under cygwin 1.7).
 +      When false, file names are handled fully transparent by Git,
 +      which is backward compatible with older versions of Git.
  
  core.trustctime::
        If false, the ctime differences between the index and the
        crawlers and some backup systems).
        See linkgit:git-update-index[1]. True by default.
  
 +core.checkstat::
 +      Determines which stat fields to match between the index
 +      and work tree. The user can set this to 'default' or
 +      'minimal'. Default (or explicitly 'default'), is to check
 +      all fields, including the sub-second part of mtime and ctime.
 +
  core.quotepath::
        The commands that output paths (e.g. 'ls-files',
        'diff'), when not given the `-z` option, will quote
@@@ -272,20 -255,20 +276,20 @@@ core.eol:
        conversion.
  
  core.safecrlf::
 -      If true, makes git check if converting `CRLF` is reversible when
 +      If true, makes Git check if converting `CRLF` is reversible when
        end-of-line conversion is active.  Git will verify if a command
        modifies a file in the work tree either directly or indirectly.
        For example, committing a file followed by checking out the
        same file should yield the original file in the work tree.  If
        this is not the case for the current setting of
 -      `core.autocrlf`, git will reject the file.  The variable can
 -      be set to "warn", in which case git will only warn about an
 +      `core.autocrlf`, Git will reject the file.  The variable can
 +      be set to "warn", in which case Git will only warn about an
        irreversible conversion but continue the operation.
  +
  CRLF conversion bears a slight chance of corrupting data.
 -When it is enabled, git will convert CRLF to LF during commit and LF to
 +When it is enabled, Git will convert CRLF to LF during commit and LF to
  CRLF during checkout.  A file that contains a mixture of LF and
 -CRLF before the commit cannot be recreated by git.  For text
 +CRLF before the commit cannot be recreated by Git.  For text
  files this is the right thing to do: it corrects line endings
  such that we have only LF line endings in the repository.
  But for binary files that are accidentally classified as text the
@@@ -295,7 -278,7 +299,7 @@@ If you recognize such corruption early 
  setting the conversion type explicitly in .gitattributes.  Right
  after committing you still have the original file in your work
  tree and this file is not yet corrupted.  You can explicitly tell
 -git that this file is binary and git will handle the file
 +Git that this file is binary and Git will handle the file
  appropriately.
  +
  Unfortunately, the desired effect of cleaning up text files with
@@@ -340,7 -323,7 +344,7 @@@ is created
  core.gitProxy::
        A "proxy command" to execute (as 'command host port') instead
        of establishing direct connection to the remote server when
 -      using the git protocol for fetching. If the variable value is
 +      using the Git protocol for fetching. If the variable value is
        in the "COMMAND for DOMAIN" format, the command is applied only
        on hostnames ending with the specified domain string. This variable
        may be set multiple times and is matched in the given order;
@@@ -399,7 -382,7 +403,7 @@@ Note that this variable is honored eve
  file in a ".git" subdirectory of a directory and its value differs
  from the latter directory (e.g. "/path/to/.git/config" has
  core.worktree set to "/different/path"), which is most likely a
 -misconfiguration.  Running git commands in the "/path/to" directory will
 +misconfiguration.  Running Git commands in the "/path/to" directory will
  still use "/different/path" as the root of the work tree and can cause
  confusion unless you know what you are doing (e.g. you are creating a
  read-only snapshot of the same index to a location different from the
@@@ -431,7 -414,7 +435,7 @@@ core.sharedRepository:
        several users in a group (making sure all the files and objects are
        group-writable). When 'all' (or 'world' or 'everybody'), the
        repository will be readable by all users, additionally to being
 -      group-shareable. When 'umask' (or 'false'), git will use permissions
 +      group-shareable. When 'umask' (or 'false'), Git will use permissions
        reported by umask(2). When '0xxx', where '0xxx' is an octal number,
        files in the repository will have this mode value. '0xxx' will override
        user's umask value (whereas the other options will only override
        See linkgit:git-init[1]. False by default.
  
  core.warnAmbiguousRefs::
 -      If true, git will warn you if the ref name you passed it is ambiguous
 -      and might match multiple refs in the .git/refs/ tree. True by default.
 +      If true, Git will warn you if the ref name you passed it is ambiguous
 +      and might match multiple refs in the repository. True by default.
  
  core.compression::
        An integer -1..9, indicating a default compression level.
@@@ -514,7 -497,7 +518,7 @@@ Common unit suffixes of 'k', 'm', or 'g
  
  core.excludesfile::
        In addition to '.gitignore' (per-directory) and
 -      '.git/info/exclude', git looks into this file for patterns
 +      '.git/info/exclude', Git looks into this file for patterns
        of files which are not meant to be tracked.  "`~/`" is expanded
        to the value of `$HOME` and "`~user/`" to the specified user's
        home directory. Its default value is $XDG_CONFIG_HOME/git/ignore.
@@@ -532,7 -515,7 +536,7 @@@ core.askpass:
  
  core.attributesfile::
        In addition to '.gitattributes' (per-directory) and
 -      '.git/info/attributes', git looks into this file for attributes
 +      '.git/info/attributes', Git looks into this file for attributes
        (see linkgit:gitattributes[5]). Path expansions are made the same
        way as for `core.excludesfile`. Its default value is
        $XDG_CONFIG_HOME/git/attributes. If $XDG_CONFIG_HOME is either not
@@@ -544,12 -527,6 +548,12 @@@ core.editor:
        variable when it is set, and the environment variable
        `GIT_EDITOR` is not set.  See linkgit:git-var[1].
  
 +core.commentchar::
 +      Commands such as `commit` and `tag` that lets you edit
 +      messages consider a line that begins with this character
 +      commented, and removes them after the editor returns
 +      (default '#').
 +
  sequence.editor::
        Text editor used by `git rebase -i` for editing the rebase insn file.
        The value is meant to be interpreted by the shell when it is used.
        When not configured the default commit message editor is used instead.
  
  core.pager::
 -      The command that git will use to paginate output.  Can
 +      The command that Git will use to paginate output.  Can
        be overridden with the `GIT_PAGER` environment
 -      variable.  Note that git sets the `LESS` environment
 +      variable.  Note that Git sets the `LESS` environment
        variable to `FRSX` if it is unset when it runs the
        pager.  One can change these settings by setting the
        `LESS` variable to some other value.  Alternately,
        these settings can be overridden on a project or
        global basis by setting the `core.pager` option.
 -      Setting `core.pager` has no affect on the `LESS`
 +      Setting `core.pager` has no effect on the `LESS`
        environment variable behaviour above, so if you want
 -      to override git's default settings this way, you need
 +      to override Git's default settings this way, you need
        to be explicit.  For example, to disable the S option
        in a backward compatible manner, set `core.pager`
 -      to `less -+$LESS -FRX`.  This will be passed to the
 -      shell by git, which will translate the final command to
 -      `LESS=FRSX less -+FRSX -FRX`.
 +      to `less -+S`.  This will be passed to the shell by
 +      Git, which will translate the final command to
 +      `LESS=FRSX less -+S`.
  
  core.whitespace::
        A comma separated list of common whitespace problems to
    does not trigger if the character before such a carriage-return
    is not a whitespace (not enabled by default).
  * `tabwidth=<n>` tells how many character positions a tab occupies; this
 -  is relevant for `indent-with-non-tab` and when git fixes `tab-in-indent`
 +  is relevant for `indent-with-non-tab` and when Git fixes `tab-in-indent`
    errors. The default tab width is 8. Allowed values are 1 to 63.
  
  core.fsyncobjectfiles::
@@@ -616,7 -593,7 +620,7 @@@ core.preloadindex:
  +
  This can speed up operations like 'git diff' and 'git status' especially
  on filesystems like NFS that have weak caching semantics and thus
 -relatively high IO latencies.  With this set to 'true', git will do the
 +relatively high IO latencies.  With this set to 'true', Git will do the
  index comparison to the filesystem data in parallel, allowing
  overlapping IO's.
  
@@@ -652,9 -629,9 +656,9 @@@ add.ignore-errors:
  add.ignoreErrors::
        Tells 'git add' to continue adding files when some files cannot be
        added due to indexing errors. Equivalent to the '--ignore-errors'
 -      option of linkgit:git-add[1].  Older versions of git accept only
 +      option of linkgit:git-add[1].  Older versions of Git accept only
        `add.ignore-errors`, which does not follow the usual naming
 -      convention for configuration variables.  Newer versions of git
 +      convention for configuration variables.  Newer versions of Git
        honor `add.ignoreErrors` as well.
  
  alias.*::
        after defining "alias.last = cat-file commit HEAD", the invocation
        "git last" is equivalent to "git cat-file commit HEAD". To avoid
        confusion and troubles with script usage, aliases that
 -      hide existing git commands are ignored. Arguments are split by
 +      hide existing Git commands are ignored. Arguments are split by
        spaces, the usual shell quoting and escaping is supported.
        quote pair and a backslash can be used to quote them.
  +
@@@ -709,7 -686,7 +713,7 @@@ branch.autosetupmerge:
  
  branch.autosetuprebase::
        When a new branch is created with 'git branch' or 'git checkout'
 -      that tracks another branch, this variable tells git to set
 +      that tracks another branch, this variable tells Git to set
        up pull to rebase instead of merge (see "branch.<name>.rebase").
        When `never`, rebase is never automatically set to true.
        When `local`, rebase is set to true for tracked branches of
@@@ -761,12 -738,6 +765,12 @@@ branch.<name>.rebase:
  it unless you understand the implications (see linkgit:git-rebase[1]
  for details).
  
 +branch.<name>.description::
 +      Branch description, can be edited with
 +      `git branch --edit-description`. Branch description is
 +      automatically added in the format-patch cover letter or
 +      request-pull summary.
 +
  browser.<tool>.cmd::
        Specify the command to invoke the specified browser. The
        specified command is evaluated in shell with the URLs passed
@@@ -890,7 -861,7 +894,7 @@@ color.status.<slot>:
        one of `header` (the header text of the status message),
        `added` or `updated` (files which are added but not committed),
        `changed` (files which are changed but not added in the index),
 -      `untracked` (files which are not tracked by git),
 +      `untracked` (files which are not tracked by Git),
        `branch` (the current branch), or
        `nobranch` (the color the 'no branch' warning is shown in, defaulting
        to red). The values of these variables may be specified as in
@@@ -904,7 -875,7 +908,7 @@@ color.ui:
        to `always` if you want all output not intended for machine
        consumption to use color, to `true` or `auto` if you want such
        output to use color when written to the terminal, or to `false` or
 -      `never` if you prefer git commands not to use color unless enabled
 +      `never` if you prefer Git commands not to use color unless enabled
        explicitly with some other configuration or the `--color` option.
  
  column.ui::
@@@ -945,15 -916,6 +949,15 @@@ column.tag:
        Specify whether to output tag listing in `git tag` in columns.
        See `column.ui` for details.
  
 +commit.cleanup::
 +      This setting overrides the default of the `--cleanup` option in
 +      `git commit`. See linkgit:git-commit[1] for details. Changing the
 +      default can be useful when you always want to keep lines that begin
 +      with comment character `#` in your log message, in which case you
 +      would do `git config commit.cleanup whitespace` (note that you will
 +      have to remove the help lines that begin with `#` in the commit log
 +      template yourself, if you do this).
 +
  commit.status::
        A boolean to enable/disable inclusion of status information in the
        commit message template when using an editor to prepare the commit
@@@ -1021,7 -983,7 +1025,7 @@@ fetch.fsckObjects:
        is used instead.
  
  fetch.unpackLimit::
 -      If the number of objects fetched over the git native
 +      If the number of objects fetched over the Git native
        transfer is below this
        limit, then the objects will be unpacked into loose object
        files. However if the number of received objects equals or
@@@ -1061,7 -1023,7 +1065,7 @@@ format.subjectprefix:
  
  format.signature::
        The default for format-patch is to output a signature containing
 -      the git version number. Use this variable to change that default.
 +      the Git version number. Use this variable to change that default.
        Set this variable to the empty string ("") to suppress
        signature generation.
  
@@@ -1174,7 -1136,7 +1178,7 @@@ gitcvs.logfile:
  gitcvs.usecrlfattr::
        If true, the server will look up the end-of-line conversion
        attributes for files to determine the '-k' modes to use. If
 -      the attributes force git to treat a file as text,
 +      the attributes force Git to treat a file as text,
        the '-k' mode will be left blank so CVS clients will
        treat it as text. If they suppress text conversion, the file
        will be set with '-kb' mode, which suppresses any newline munging
@@@ -1194,7 -1156,7 +1198,7 @@@ gitcvs.allbinary:
  
  gitcvs.dbname::
        Database used by git-cvsserver to cache revision information
 -      derived from the git repository. The exact meaning depends on the
 +      derived from the Git repository. The exact meaning depends on the
        used database driver, for SQLite (which is the default driver) this
        is a filename. Supports variable substitution (see
        linkgit:git-cvsserver[1] for details). May not contain semicolons (`;`).
@@@ -1392,12 -1354,6 +1396,12 @@@ help.autocorrect:
        value is 0 - the command will be just shown but not executed.
        This is the default.
  
 +help.htmlpath::
 +      Specify the path where the HTML documentation resides. File system paths
 +      and URLs are supported. HTML pages will be prefixed with this path when
 +      help is displayed in the 'web' format. This defaults to the documentation
 +      path of your Git installation.
 +
  http.proxy::
        Override the HTTP proxy, normally configured using the 'http_proxy',
        'https_proxy', and 'all_proxy' environment variables (see
  
  http.cookiefile::
        File containing previously stored cookie lines which should be used
 -      in the git http session, if they match the server. The file format
 +      in the Git http session, if they match the server. The file format
        of the file to read cookies from should be plain HTTP headers or
        the Netscape/Mozilla cookie file format (see linkgit:curl[1]).
        NOTE that the file specified with http.cookiefile is only used as
@@@ -1428,7 -1384,7 +1432,7 @@@ http.sslKey:
        variable.
  
  http.sslCertPasswordProtected::
 -      Enable git's password prompt for the SSL certificate.  Otherwise
 +      Enable Git's password prompt for the SSL certificate.  Otherwise
        OpenSSL will prompt the user, possibly many times, if the
        certificate or private key is encrypted.  Can be overridden by the
        'GIT_SSL_CERT_PASSWORD_PROTECTED' environment variable.
@@@ -1475,7 -1431,7 +1479,7 @@@ http.noEPSV:
  
  http.useragent::
        The HTTP USER_AGENT string presented to an HTTP server.  The default
 -      value represents the version of the client git such as git/1.7.1.
 +      value represents the version of the client Git such as git/1.7.1.
        This option allows you to override this value to a more common value
        such as Mozilla/4.0.  This may be necessary, for instance, if
        connecting through a firewall that restricts HTTP connections to a set
        Can be overridden by the 'GIT_HTTP_USER_AGENT' environment variable.
  
  i18n.commitEncoding::
 -      Character encoding the commit messages are stored in; git itself
 +      Character encoding the commit messages are stored in; Git itself
        does not care per se, but this information is necessary e.g. when
        importing commits from emails or in the gitk graphical history
        browser (and possibly at other places in the future or in other
@@@ -1556,10 -1512,6 +1560,10 @@@ log.showroot:
        Tools like linkgit:git-log[1] or linkgit:git-whatchanged[1], which
        normally hide the root commit will now show it. True by default.
  
 +log.mailmap::
 +      If true, makes linkgit:git-log[1], linkgit:git-show[1], and
 +      linkgit:git-whatchanged[1] assume `--use-mailmap`.
 +
  mailmap.file::
        The location of an augmenting mailmap file. The default
        mailmap, located in the root of the repository, is loaded
        subdirectory, or somewhere outside of the repository itself.
        See linkgit:git-shortlog[1] and linkgit:git-blame[1].
  
 +mailmap.blob::
 +      Like `mailmap.file`, but consider the value as a reference to a
 +      blob in the repository. If both `mailmap.file` and
 +      `mailmap.blob` are given, both are parsed, with entries from
 +      `mailmap.file` taking precedence. In a bare repository, this
 +      defaults to `HEAD:.mailmap`. In a non-bare repository, it
 +      defaults to empty.
 +
  man.viewer::
        Specify the programs that may be used to display help in the
        'man' format. See linkgit:git-help[1].
@@@ -1621,7 -1565,7 +1625,7 @@@ mergetool.keepBackup:
        `true` (i.e. keep the backup files).
  
  mergetool.keepTemporaries::
 -      When invoking a custom merge tool, git uses a set of temporary
 +      When invoking a custom merge tool, Git uses a set of temporary
        files to pass to the tool. If the tool returns an error and this
        variable is set to `true`, then these temporary files will be
        preserved, otherwise they will be removed after the tool has
@@@ -1649,7 -1593,7 +1653,7 @@@ displayed
  
  notes.rewrite.<command>::
        When rewriting commits with <command> (currently `amend` or
 -      `rebase`) and this variable is set to `true`, git
 +      `rebase`) and this variable is set to `true`, Git
        automatically copies your notes from the original to the
        rewritten commit.  Defaults to `true`, but see
        "notes.rewriteRef" below.
@@@ -1729,7 -1673,7 +1733,7 @@@ pack.threads:
        warning. This is meant to reduce packing time on multiprocessor
        machines. The required amount of memory for the delta search window
        is however multiplied by the number of threads.
 -      Specifying 0 will cause git to auto-detect the number of CPU's
 +      Specifying 0 will cause Git to auto-detect the number of CPU's
        and set the number of threads accordingly.
  
  pack.indexVersion::
        and this config option ignored whenever the corresponding pack is
        larger than 2 GB.
  +
 -If you have an old git that does not understand the version 2 `*.idx` file,
 +If you have an old Git that does not understand the version 2 `*.idx` file,
  cloning or fetching over a non native protocol (e.g. "http" and "rsync")
  that will copy both `*.pack` file and corresponding `*.idx` file from the
  other side may give you a repository that cannot be accessed with your
 -older version of git. If the `*.pack` file is smaller than 2 GB, however,
 +older version of Git. If the `*.pack` file is smaller than 2 GB, however,
  you can use linkgit:git-index-pack[1] on the *.pack file to regenerate
  the `*.idx` file.
  
@@@ -1760,7 -1704,7 +1764,7 @@@ pack.packSizeLimit:
  
  pager.<cmd>::
        If the value is boolean, turns on or off pagination of the
 -      output of a particular git subcommand when writing to a tty.
 +      output of a particular Git subcommand when writing to a tty.
        Otherwise, turns on pagination for the subcommand using the
        pager specified by the value of `pager.<cmd>`.  If `--paginate`
        or `--no-pager` is specified on the command line, it takes
@@@ -1795,7 -1739,7 +1799,7 @@@ pull.twohead:
        The default merge strategy to use when pulling a single branch.
  
  push.default::
 -      Defines the action git push should take if no refspec is given
 +      Defines the action `git push` should take if no refspec is given
        on the command line, no refspec is configured in the remote, and
        no refspec is implied by any of the options given on the command
        line. Possible values are:
    +
    This is currently the default, but Git 2.0 will change the default
    to `simple`.
 -* `upstream` - push the current branch to its upstream branch.
 +* `upstream` - push the current branch to its upstream branch
 +  (`tracking` is a deprecated synonym for this).
    With this, `git push` will update the same remote ref as the one which
    is merged by `git pull`, making `push` and `pull` symmetrical.
    See "branch.<name>.merge" for how to configure the upstream branch.
@@@ -1881,15 -1824,6 +1885,15 @@@ receive.denyNonFastForwards:
        even if that push is forced. This configuration variable is
        set when initializing a shared repository.
  
 +receive.hiderefs::
 +      String(s) `receive-pack` uses to decide which refs to omit
 +      from its initial advertisement.  Use more than one
 +      definitions to specify multiple prefix strings. A ref that
 +      are under the hierarchies listed on the value of this
 +      variable is excluded, and is hidden when responding to `git
 +      push`, and an attempt to update or delete a hidden ref by
 +      `git push` is rejected.
 +
  receive.updateserverinfo::
        If set to true, git-receive-pack will run git-update-server-info
        after receiving data from git-push and updating refs.
@@@ -1945,7 -1879,7 +1949,7 @@@ remote.<name>.tagopt:
        linkgit:git-fetch[1].
  
  remote.<name>.vcs::
 -      Setting this to a value <vcs> will cause git to interact with
 +      Setting this to a value <vcs> will cause Git to interact with
        the remote with the git-remote-<vcs> helper.
  
  remotes.<group>::
  repack.usedeltabaseoffset::
        By default, linkgit:git-repack[1] creates packs that use
        delta-base offset. If you need to share your repository with
 -      git older than version 1.4.4, either directly or via a dumb
 +      Git older than version 1.4.4, either directly or via a dumb
        protocol such as http, then you need to set this option to
 -      "false" and repack. Access from old git versions over the
 +      "false" and repack. Access from old Git versions over the
        native protocol are unaffected by this option.
  
  rerere.autoupdate::
@@@ -2026,7 -1960,7 +2030,7 @@@ showbranch.default:
  status.relativePaths::
        By default, linkgit:git-status[1] shows paths relative to the
        current directory. Setting this variable to `false` shows paths
 -      relative to the repository root (this was the default for git
 +      relative to the repository root (this was the default for Git
        prior to v1.5.4).
  
  status.showUntrackedFiles::
@@@ -2064,12 -1998,6 +2068,12 @@@ submodule.<name>.update:
        URL and other values found in the `.gitmodules` file.  See
        linkgit:git-submodule[1] and linkgit:gitmodules[5] for details.
  
 +submodule.<name>.branch::
 +      The remote branch name for a submodule, used by `git submodule
 +      update --remote`.  Set this option to override the value found in
 +      the `.gitmodules` file.  See linkgit:git-submodule[1] and
 +      linkgit:gitmodules[5] for details.
 +
  submodule.<name>.fetchRecurseSubmodules::
        This option can be used to control recursive fetching of this
        submodule. It can be overridden by using the --[no-]recurse-submodules
@@@ -2102,32 -2030,18 +2106,32 @@@ transfer.fsckObjects:
        not set, the value of this variable is used instead.
        Defaults to false.
  
 +transfer.hiderefs::
 +      This variable can be used to set both `receive.hiderefs`
 +      and `uploadpack.hiderefs` at the same time to the same
 +      values.  See entries for these other variables.
 +
  transfer.unpackLimit::
        When `fetch.unpackLimit` or `receive.unpackLimit` are
        not set, the value of this variable is used instead.
        The default value is 100.
  
 +uploadpack.hiderefs::
 +      String(s) `upload-pack` uses to decide which refs to omit
 +      from its initial advertisement.  Use more than one
 +      definitions to specify multiple prefix strings. A ref that
 +      are under the hierarchies listed on the value of this
 +      variable is excluded, and is hidden from `git ls-remote`,
 +      `git fetch`, etc.  An attempt to fetch a hidden ref by `git
 +      fetch` will fail.
 +
  url.<base>.insteadOf::
        Any URL that starts with this value will be rewritten to
        start, instead, with <base>. In cases where some site serves a
        large number of repositories, and serves them with multiple
        access methods, and some users need to use different access
        methods, this feature allows people to specify any of the
 -      equivalent URLs and have git automatically rewrite the URL to
 +      equivalent URLs and have Git automatically rewrite the URL to
        the best alternative for the particular user, even for a
        never-before-seen repository on the site.  When more than one
        insteadOf strings match a given URL, the longest match is used.
@@@ -2138,11 -2052,11 +2142,11 @@@ url.<base>.pushInsteadOf:
        resulting URL will be pushed to. In cases where some site serves
        a large number of repositories, and serves them with multiple
        access methods, some of which do not allow push, this feature
 -      allows people to specify a pull-only URL and have git
 +      allows people to specify a pull-only URL and have Git
        automatically use an appropriate URL to push, even for a
        never-before-seen repository on the site.  When more than one
        pushInsteadOf strings match a given URL, the longest match is
 -      used.  If a remote has an explicit pushurl, git will ignore this
 +      used.  If a remote has an explicit pushurl, Git will ignore this
        setting for that remote.
  
  user.email::
index 0412c4017d07814804ab9e9adcbf2a8d0de0304f,00d59510123c8aa3747ec68cc2877072ed87e8e9..9046df98a03fe11a203f06d79be0128309a201c5
@@@ -16,7 -16,7 +16,7 @@@ DESCRIPTIO
  Displays paths that have differences between the index file and the
  current HEAD commit, paths that have differences between the working
  tree and the index file, and paths in the working tree that are not
 -tracked by git (and are not ignored by linkgit:gitignore[5]). The first
 +tracked by Git (and are not ignored by linkgit:gitignore[5]). The first
  are what you _would_ commit by running `git commit`; the second and
  third are what you _could_ commit by running 'git add' before running
  `git commit`.
@@@ -35,26 -35,29 +35,32 @@@ OPTION
  --porcelain::
        Give the output in an easy-to-parse format for scripts.
        This is similar to the short output, but will remain stable
 -      across git versions and regardless of user configuration. See
 +      across Git versions and regardless of user configuration. See
        below for details.
  
 +--long::
 +      Give the output in the long-format. This is the default.
 +
  -u[<mode>]::
  --untracked-files[=<mode>]::
        Show untracked files.
  +
  The mode parameter is optional (defaults to 'all'), and is used to
- specify the handling of untracked files; when -u is not used, the
- default is 'normal', i.e. show untracked files and directories.
+ specify the handling of untracked files.
  +
  The possible options are:
  +
-       - 'no'     - Show no untracked files
-       - 'normal' - Shows untracked files and directories
+       - 'no'     - Show no untracked files.
+       - 'normal' - Shows untracked files and directories.
        - 'all'    - Also shows individual files in untracked directories.
  +
+ When `-u` option is not used, untracked files and directories are
+ shown (i.e. the same as specifying `normal`), to help you avoid
+ forgetting to add newly created files.  Because it takes extra work
+ to find untracked files in the filesystem, this mode may take some
+ time in a large working tree.  You can use `no` to have `git status`
+ return more quickly without showing untracked files.
+ +
  The default can be changed using the status.showUntrackedFiles
  configuration variable documented in linkgit:git-config[1].
  
@@@ -96,7 -99,7 +102,7 @@@ The default, long format, is designed t
  verbose and descriptive.  Its contents and format are subject to change
  at any time.
  
 -The paths mentioned in the output, unlike many other git commands, are
 +The paths mentioned in the output, unlike many other Git commands, are
  made relative to the current directory if you are working in a
  subdirectory (this is on purpose, to help cutting and pasting). See
  the status.relativePaths config option below.
@@@ -168,7 -171,7 +174,7 @@@ Porcelain Forma
  ~~~~~~~~~~~~~~~~
  
  The porcelain format is similar to the short format, but is guaranteed
 -not to change in a backwards-incompatible way between git versions or
 +not to change in a backwards-incompatible way between Git versions or
  based on user configuration. This makes it ideal for parsing by scripts.
  The description of the short format above also describes the porcelain
  format, with a few exceptions:
diff --combined advice.c
index 780f58da0f5b508eaa278c98dd15bdf6f919c468,015011fe0dff7b01c42e13d3e53ceb1178cecfc9..3bc86260b8a2a809a379c91627f919ef0a529aa1
+++ b/advice.c
@@@ -1,13 -1,11 +1,14 @@@
  #include "cache.h"
  
 -int advice_push_nonfastforward = 1;
 +int advice_push_update_rejected = 1;
  int advice_push_non_ff_current = 1;
  int advice_push_non_ff_default = 1;
  int advice_push_non_ff_matching = 1;
 +int advice_push_already_exists = 1;
 +int advice_push_fetch_first = 1;
 +int advice_push_needs_force = 1;
  int advice_status_hints = 1;
+ int advice_status_u_option = 1;
  int advice_commit_before_merge = 1;
  int advice_resolve_conflict = 1;
  int advice_implicit_identity = 1;
@@@ -17,21 -15,16 +18,22 @@@ static struct 
        const char *name;
        int *preference;
  } advice_config[] = {
 -      { "pushnonfastforward", &advice_push_nonfastforward },
 +      { "pushupdaterejected", &advice_push_update_rejected },
        { "pushnonffcurrent", &advice_push_non_ff_current },
        { "pushnonffdefault", &advice_push_non_ff_default },
        { "pushnonffmatching", &advice_push_non_ff_matching },
 +      { "pushalreadyexists", &advice_push_already_exists },
 +      { "pushfetchfirst", &advice_push_fetch_first },
 +      { "pushneedsforce", &advice_push_needs_force },
        { "statushints", &advice_status_hints },
+       { "statusuoption", &advice_status_u_option },
        { "commitbeforemerge", &advice_commit_before_merge },
        { "resolveconflict", &advice_resolve_conflict },
        { "implicitidentity", &advice_implicit_identity },
        { "detachedhead", &advice_detached_head },
 +
 +      /* make this an alias for backward compatibility */
 +      { "pushnonfastforward", &advice_push_update_rejected }
  };
  
  void advise(const char *advice, ...)
diff --combined advice.h
index fad36df467f065bf7ff7a82d9d447ee4ac5cecb9,e3e665dc1806561d300120b9994260d80f8f84c2..af0c983c686b9ca5be2e8631562e60bd19656c22
+++ b/advice.h
@@@ -3,14 -3,12 +3,15 @@@
  
  #include "git-compat-util.h"
  
 -extern int advice_push_nonfastforward;
 +extern int advice_push_update_rejected;
  extern int advice_push_non_ff_current;
  extern int advice_push_non_ff_default;
  extern int advice_push_non_ff_matching;
 +extern int advice_push_already_exists;
 +extern int advice_push_fetch_first;
 +extern int advice_push_needs_force;
  extern int advice_status_hints;
+ extern int advice_status_u_option;
  extern int advice_commit_before_merge;
  extern int advice_resolve_conflict;
  extern int advice_implicit_identity;
diff --combined t/t7508-status.sh
index a79c032ffd941a68e737b844ea5b28fffe58686c,15e063a0fab64e9d3cbb0991c7d11288f5baecc0..aecb4d1e5fdc1e966aad07ee1f1e7af834388bb2
@@@ -8,6 -8,7 +8,7 @@@ test_description='git status
  . ./test-lib.sh
  
  test_expect_success 'status -h in broken repository' '
+       git config --global advice.statusuoption false &&
        mkdir broken &&
        test_when_finished "rm -fr broken" &&
        (
@@@ -1253,56 -1254,6 +1254,56 @@@ test_expect_success ".git/config ignore
        git config -f .gitmodules  --remove-section submodule.subname
  '
  
 +cat > expect << EOF
 +; On branch master
 +; Changes to be committed:
 +;   (use "git reset HEAD <file>..." to unstage)
 +;
 +;     modified:   sm
 +;
 +; Changes not staged for commit:
 +;   (use "git add <file>..." to update what will be committed)
 +;   (use "git checkout -- <file>..." to discard changes in working directory)
 +;
 +;     modified:   dir1/modified
 +;     modified:   sm (new commits)
 +;
 +; Submodule changes to be committed:
 +;
 +; * sm $head...$new_head (1):
 +;   > Add bar
 +;
 +; Submodules changed but not updated:
 +;
 +; * sm $new_head...$head2 (1):
 +;   > 2nd commit
 +;
 +; Untracked files:
 +;   (use "git add <file>..." to include in what will be committed)
 +;
 +;     .gitmodules
 +;     dir1/untracked
 +;     dir2/modified
 +;     dir2/untracked
 +;     expect
 +;     output
 +;     untracked
 +EOF
 +
 +test_expect_success "status (core.commentchar with submodule summary)" '
 +      test_when_finished "git config --unset core.commentchar" &&
 +      git config core.commentchar ";" &&
 +      git status >output &&
 +      test_i18ncmp expect output
 +'
 +
 +test_expect_success "status (core.commentchar with two chars with submodule summary)" '
 +      test_when_finished "git config --unset core.commentchar" &&
 +      git config core.commentchar ";;" &&
 +      git status >output &&
 +      test_i18ncmp expect output
 +'
 +
  cat > expect << EOF
  # On branch master
  # Changes not staged for commit:
diff --combined t/t7512-status-help.sh
index d2da89a5f572134c55c690b1439ffde66ecdd6cb,2d53e03f492fedc6e5223b9bafda6e5a4253a85a..9d4610629d725c22b9de5187abf71b2b8544292d
@@@ -5,7 -5,7 +5,7 @@@
  #                  Grenoble INP Ensimag
  #
  
 -test_description='git status advices'
 +test_description='git status advice'
  
  . ./test-lib.sh
  
@@@ -14,6 -14,7 +14,7 @@@
  set_fake_editor
  
  test_expect_success 'prepare for conflicts' '
+       git config --global advice.statusuoption false &&
        test_commit init main.txt init &&
        git branch conflicts &&
        test_commit on_master main.txt on_master &&
@@@ -73,11 -74,10 +74,11 @@@ test_expect_success 'prepare for rebas
  
  test_expect_success 'status when rebase in progress before resolving conflicts' '
        test_when_finished "git rebase --abort" &&
 +      ONTO=$(git rev-parse --short HEAD^^) &&
        test_must_fail git rebase HEAD^ --onto HEAD^^ &&
 -      cat >expected <<-\EOF &&
 +      cat >expected <<-EOF &&
        # Not currently on any branch.
 -      # You are currently rebasing.
 +      # You are currently rebasing branch '\''rebase_conflicts'\'' on '\''$ONTO'\''.
        #   (fix conflicts and then run "git rebase --continue")
        #   (use "git rebase --skip" to skip this patch)
        #   (use "git rebase --abort" to check out the original branch)
  test_expect_success 'status when rebase in progress before rebase --continue' '
        git reset --hard rebase_conflicts &&
        test_when_finished "git rebase --abort" &&
 +      ONTO=$(git rev-parse --short HEAD^^) &&
        test_must_fail git rebase HEAD^ --onto HEAD^^ &&
        echo three >main.txt &&
        git add main.txt &&
 -      cat >expected <<-\EOF &&
 +      cat >expected <<-EOF &&
        # Not currently on any branch.
 -      # You are currently rebasing.
 +      # You are currently rebasing branch '\''rebase_conflicts'\'' on '\''$ONTO'\''.
        #   (all conflicts fixed: run "git rebase --continue")
        #
        # Changes to be committed:
@@@ -132,11 -131,10 +133,11 @@@ test_expect_success 'prepare for rebase
  
  test_expect_success 'status during rebase -i when conflicts unresolved' '
        test_when_finished "git rebase --abort" &&
 +      ONTO=$(git rev-parse --short rebase_i_conflicts) &&
        test_must_fail git rebase -i rebase_i_conflicts &&
 -      cat >expected <<-\EOF &&
 +      cat >expected <<-EOF &&
        # Not currently on any branch.
 -      # You are currently rebasing.
 +      # You are currently rebasing branch '\''rebase_i_conflicts_second'\'' on '\''$ONTO'\''.
        #   (fix conflicts and then run "git rebase --continue")
        #   (use "git rebase --skip" to skip this patch)
        #   (use "git rebase --abort" to check out the original branch)
  test_expect_success 'status during rebase -i after resolving conflicts' '
        git reset --hard rebase_i_conflicts_second &&
        test_when_finished "git rebase --abort" &&
 +      ONTO=$(git rev-parse --short rebase_i_conflicts) &&
        test_must_fail git rebase -i rebase_i_conflicts &&
        git add main.txt &&
 -      cat >expected <<-\EOF &&
 +      cat >expected <<-EOF &&
        # Not currently on any branch.
 -      # You are currently rebasing.
 +      # You are currently rebasing branch '\''rebase_i_conflicts_second'\'' on '\''$ONTO'\''.
        #   (all conflicts fixed: run "git rebase --continue")
        #
        # Changes to be committed:
@@@ -186,11 -183,10 +187,11 @@@ test_expect_success 'status when rebasi
        FAKE_LINES="1 edit 2" &&
        export FAKE_LINES &&
        test_when_finished "git rebase --abort" &&
 +      ONTO=$(git rev-parse --short HEAD~2) &&
        git rebase -i HEAD~2 &&
 -      cat >expected <<-\EOF &&
 +      cat >expected <<-EOF &&
        # Not currently on any branch.
 -      # You are currently editing a commit during a rebase.
 +      # You are currently editing a commit while rebasing branch '\''rebase_i_edit'\'' on '\''$ONTO'\''.
        #   (use "git commit --amend" to amend the current commit)
        #   (use "git rebase --continue" once you are satisfied with your changes)
        #
@@@ -211,12 -207,11 +212,12 @@@ test_expect_success 'status when splitt
        FAKE_LINES="1 edit 2 3" &&
        export FAKE_LINES &&
        test_when_finished "git rebase --abort" &&
 +      ONTO=$(git rev-parse --short HEAD~3) &&
        git rebase -i HEAD~3 &&
        git reset HEAD^ &&
 -      cat >expected <<-\EOF &&
 +      cat >expected <<-EOF &&
        # Not currently on any branch.
 -      # You are currently splitting a commit during a rebase.
 +      # You are currently splitting a commit while rebasing branch '\''split_commit'\'' on '\''$ONTO'\''.
        #   (Once your working directory is clean, run "git rebase --continue")
        #
        # Changes not staged for commit:
@@@ -242,12 -237,11 +243,12 @@@ test_expect_success 'status after editi
        FAKE_LINES="1 2 edit 3" &&
        export FAKE_LINES &&
        test_when_finished "git rebase --abort" &&
 +      ONTO=$(git rev-parse --short HEAD~3) &&
        git rebase -i HEAD~3 &&
        git commit --amend -m "foo" &&
 -      cat >expected <<-\EOF &&
 +      cat >expected <<-EOF &&
        # Not currently on any branch.
 -      # You are currently editing a commit during a rebase.
 +      # You are currently editing a commit while rebasing branch '\''amend_last'\'' on '\''$ONTO'\''.
        #   (use "git commit --amend" to amend the current commit)
        #   (use "git rebase --continue" once you are satisfied with your changes)
        #
@@@ -272,12 -266,11 +273,12 @@@ test_expect_success 'status: (continue 
        FAKE_LINES="edit 1 edit 2 3" &&
        export FAKE_LINES &&
        test_when_finished "git rebase --abort" &&
 +      ONTO=$(git rev-parse --short HEAD~3) &&
        git rebase -i HEAD~3 &&
        git rebase --continue &&
 -      cat >expected <<-\EOF &&
 +      cat >expected <<-EOF &&
        # Not currently on any branch.
 -      # You are currently editing a commit during a rebase.
 +      # You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
        #   (use "git commit --amend" to amend the current commit)
        #   (use "git rebase --continue" once you are satisfied with your changes)
        #
@@@ -293,13 -286,12 +294,13 @@@ test_expect_success 'status: (continue 
        FAKE_LINES="edit 1 edit 2 3" &&
        export FAKE_LINES &&
        test_when_finished "git rebase --abort" &&
 +      ONTO=$(git rev-parse --short HEAD~3) &&
        git rebase -i HEAD~3 &&
        git rebase --continue &&
        git reset HEAD^ &&
 -      cat >expected <<-\EOF &&
 +      cat >expected <<-EOF &&
        # Not currently on any branch.
 -      # You are currently splitting a commit during a rebase.
 +      # You are currently splitting a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
        #   (Once your working directory is clean, run "git rebase --continue")
        #
        # Changes not staged for commit:
@@@ -320,13 -312,12 +321,13 @@@ test_expect_success 'status: (continue 
        FAKE_LINES="edit 1 edit 2 3" &&
        export FAKE_LINES &&
        test_when_finished "git rebase --abort" &&
 +      ONTO=$(git rev-parse --short HEAD~3) &&
        git rebase -i HEAD~3 &&
        git rebase --continue &&
        git commit --amend -m "foo" &&
 -      cat >expected <<-\EOF &&
 +      cat >expected <<-EOF &&
        # Not currently on any branch.
 -      # You are currently editing a commit during a rebase.
 +      # You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
        #   (use "git commit --amend" to amend the current commit)
        #   (use "git rebase --continue" once you are satisfied with your changes)
        #
@@@ -342,13 -333,12 +343,13 @@@ test_expect_success 'status: (amend fir
        FAKE_LINES="edit 1 edit 2 3" &&
        export FAKE_LINES &&
        test_when_finished "git rebase --abort" &&
 +      ONTO=$(git rev-parse --short HEAD~3) &&
        git rebase -i HEAD~3 &&
        git commit --amend -m "a" &&
        git rebase --continue &&
 -      cat >expected <<-\EOF &&
 +      cat >expected <<-EOF &&
        # Not currently on any branch.
 -      # You are currently editing a commit during a rebase.
 +      # You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
        #   (use "git commit --amend" to amend the current commit)
        #   (use "git rebase --continue" once you are satisfied with your changes)
        #
@@@ -364,14 -354,13 +365,14 @@@ test_expect_success 'status: (amend fir
        FAKE_LINES="edit 1 edit 2 3" &&
        export FAKE_LINES &&
        test_when_finished "git rebase --abort" &&
 +      ONTO=$(git rev-parse --short HEAD~3) &&
        git rebase -i HEAD~3 &&
        git commit --amend -m "b" &&
        git rebase --continue &&
        git reset HEAD^ &&
 -      cat >expected <<-\EOF &&
 +      cat >expected <<-EOF &&
        # Not currently on any branch.
 -      # You are currently splitting a commit during a rebase.
 +      # You are currently splitting a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
        #   (Once your working directory is clean, run "git rebase --continue")
        #
        # Changes not staged for commit:
@@@ -392,14 -381,13 +393,14 @@@ test_expect_success 'status: (amend fir
        FAKE_LINES="edit 1 edit 2 3" &&
        export FAKE_LINES &&
        test_when_finished "git rebase --abort" &&
 +      ONTO=$(git rev-parse --short HEAD~3) &&
        git rebase -i HEAD~3 &&
        git commit --amend -m "c" &&
        git rebase --continue &&
        git commit --amend -m "d" &&
 -      cat >expected <<-\EOF &&
 +      cat >expected <<-EOF &&
        # Not currently on any branch.
 -      # You are currently editing a commit during a rebase.
 +      # You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
        #   (use "git commit --amend" to amend the current commit)
        #   (use "git rebase --continue" once you are satisfied with your changes)
        #
@@@ -415,15 -403,14 +416,15 @@@ test_expect_success 'status: (split fir
        FAKE_LINES="edit 1 edit 2 3" &&
        export FAKE_LINES &&
        test_when_finished "git rebase --abort" &&
 +      ONTO=$(git rev-parse --short HEAD~3) &&
        git rebase -i HEAD~3 &&
        git reset HEAD^ &&
        git add main.txt &&
        git commit -m "e" &&
        git rebase --continue &&
 -      cat >expected <<-\EOF &&
 +      cat >expected <<-EOF &&
        # Not currently on any branch.
 -      # You are currently editing a commit during a rebase.
 +      # You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
        #   (use "git commit --amend" to amend the current commit)
        #   (use "git rebase --continue" once you are satisfied with your changes)
        #
@@@ -439,16 -426,15 +440,16 @@@ test_expect_success 'status: (split fir
        FAKE_LINES="edit 1 edit 2 3" &&
        export FAKE_LINES &&
        test_when_finished "git rebase --abort" &&
 +      ONTO=$(git rev-parse --short HEAD~3) &&
        git rebase -i HEAD~3 &&
        git reset HEAD^ &&
        git add main.txt &&
        git commit --amend -m "f" &&
        git rebase --continue &&
        git reset HEAD^ &&
 -      cat >expected <<-\EOF &&
 +      cat >expected <<-EOF &&
        # Not currently on any branch.
 -      # You are currently splitting a commit during a rebase.
 +      # You are currently splitting a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
        #   (Once your working directory is clean, run "git rebase --continue")
        #
        # Changes not staged for commit:
@@@ -469,16 -455,15 +470,16 @@@ test_expect_success 'status: (split fir
        FAKE_LINES="edit 1 edit 2 3" &&
        export FAKE_LINES &&
        test_when_finished "git rebase --abort" &&
 +      ONTO=$(git rev-parse --short HEAD~3) &&
        git rebase -i HEAD~3 &&
        git reset HEAD^ &&
        git add main.txt &&
        git commit --amend -m "g" &&
        git rebase --continue &&
        git commit --amend -m "h" &&
 -      cat >expected <<-\EOF &&
 +      cat >expected <<-EOF &&
        # Not currently on any branch.
 -      # You are currently editing a commit during a rebase.
 +      # You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
        #   (use "git commit --amend" to amend the current commit)
        #   (use "git rebase --continue" once you are satisfied with your changes)
        #
@@@ -574,7 -559,7 +575,7 @@@ test_expect_success 'status when bisect
        git bisect good one_bisect &&
        cat >expected <<-\EOF &&
        # Not currently on any branch.
 -      # You are currently bisecting.
 +      # You are currently bisecting branch '\''bisect'\''.
        #   (use "git bisect reset" to get back to the original branch)
        #
        nothing to commit (use -u to show untracked files)
@@@ -593,11 -578,10 +594,11 @@@ test_expect_success 'status when rebas
        test_commit two_statushints main.txt two &&
        test_commit three_statushints main.txt three &&
        test_when_finished "git rebase --abort" &&
 +      ONTO=$(git rev-parse --short HEAD^^) &&
        test_must_fail git rebase HEAD^ --onto HEAD^^ &&
 -      cat >expected <<-\EOF &&
 +      cat >expected <<-EOF &&
        # Not currently on any branch.
 -      # You are currently rebasing.
 +      # You are currently rebasing branch '\''statushints_disabled'\'' on '\''$ONTO'\''.
        #
        # Unmerged paths:
        #       both modified:      main.txt
diff --combined wt-status.c
index ef405d03d928c34fe90e27b188bb7a942e3f834c,53c2222a4f7e20ea54ce17abab88e2b0eefb97d9..7bb3f63f06d359f3f44277742ad1db522ffa283f
@@@ -45,7 -45,7 +45,7 @@@ static void status_vprintf(struct wt_st
  
        strbuf_vaddf(&sb, fmt, ap);
        if (!sb.len) {
 -              strbuf_addch(&sb, '#');
 +              strbuf_addch(&sb, comment_line_char);
                if (!trail)
                        strbuf_addch(&sb, ' ');
                color_print_strbuf(s->fp, color, &sb);
@@@ -59,7 -59,7 +59,7 @@@
  
                strbuf_reset(&linebuf);
                if (at_bol) {
 -                      strbuf_addch(&linebuf, '#');
 +                      strbuf_addch(&linebuf, comment_line_char);
                        if (*line != '\n' && *line != '\t')
                                strbuf_addch(&linebuf, ' ');
                }
@@@ -496,9 -496,14 +496,14 @@@ static void wt_status_collect_untracked
  {
        int i;
        struct dir_struct dir;
+       struct timeval t_begin;
  
        if (!s->show_untracked_files)
                return;
+       if (advice_status_u_option)
+               gettimeofday(&t_begin, NULL);
        memset(&dir, 0, sizeof(dir));
        if (s->show_untracked_files != SHOW_ALL_UNTRACKED_FILES)
                dir.flags |=
  
        if (s->show_ignored_files) {
                dir.nr = 0;
 -              dir.flags = DIR_SHOW_IGNORED | DIR_SHOW_OTHER_DIRECTORIES;
 +              dir.flags = DIR_SHOW_IGNORED;
 +              if (s->show_untracked_files != SHOW_ALL_UNTRACKED_FILES)
 +                      dir.flags |= DIR_SHOW_OTHER_DIRECTORIES;
                fill_directory(&dir, s->pathspec);
                for (i = 0; i < dir.nr; i++) {
                        struct dir_entry *ent = dir.entries[i];
        }
  
        free(dir.entries);
+       if (advice_status_u_option) {
+               struct timeval t_end;
+               gettimeofday(&t_end, NULL);
+               s->untracked_in_ms =
+                       (uint64_t)t_end.tv_sec * 1000 + t_end.tv_usec / 1000 -
+                       ((uint64_t)t_begin.tv_sec * 1000 + t_begin.tv_usec / 1000);
+       }
  }
  
  void wt_status_collect(struct wt_status *s)
@@@ -762,10 -773,8 +775,10 @@@ static void wt_status_print_tracking(st
  
        for (cp = sb.buf; (ep = strchr(cp, '\n')) != NULL; cp = ep + 1)
                color_fprintf_ln(s->fp, color(WT_STATUS_HEADER, s),
 -                               "# %.*s", (int)(ep - cp), cp);
 -      color_fprintf_ln(s->fp, color(WT_STATUS_HEADER, s), "#");
 +                               "%c %.*s", comment_line_char,
 +                               (int)(ep - cp), cp);
 +      color_fprintf_ln(s->fp, color(WT_STATUS_HEADER, s), "%c",
 +                       comment_line_char);
  }
  
  static int has_unmerged(struct wt_status *s)
@@@ -874,14 -883,7 +887,14 @@@ static void show_rebase_in_progress(str
        struct stat st;
  
        if (has_unmerged(s)) {
 -              status_printf_ln(s, color, _("You are currently rebasing."));
 +              if (state->branch)
 +                      status_printf_ln(s, color,
 +                                       _("You are currently rebasing branch '%s' on '%s'."),
 +                                       state->branch,
 +                                       state->onto);
 +              else
 +                      status_printf_ln(s, color,
 +                                       _("You are currently rebasing."));
                if (advice_status_hints) {
                        status_printf_ln(s, color,
                                _("  (fix conflicts and then run \"git rebase --continue\")"));
                                _("  (use \"git rebase --abort\" to check out the original branch)"));
                }
        } else if (state->rebase_in_progress || !stat(git_path("MERGE_MSG"), &st)) {
 -              status_printf_ln(s, color, _("You are currently rebasing."));
 +              if (state->branch)
 +                      status_printf_ln(s, color,
 +                                       _("You are currently rebasing branch '%s' on '%s'."),
 +                                       state->branch,
 +                                       state->onto);
 +              else
 +                      status_printf_ln(s, color,
 +                                       _("You are currently rebasing."));
                if (advice_status_hints)
                        status_printf_ln(s, color,
                                _("  (all conflicts fixed: run \"git rebase --continue\")"));
        } else if (split_commit_in_progress(s)) {
 -              status_printf_ln(s, color, _("You are currently splitting a commit during a rebase."));
 +              if (state->branch)
 +                      status_printf_ln(s, color,
 +                                       _("You are currently splitting a commit while rebasing branch '%s' on '%s'."),
 +                                       state->branch,
 +                                       state->onto);
 +              else
 +                      status_printf_ln(s, color,
 +                                       _("You are currently splitting a commit during a rebase."));
                if (advice_status_hints)
                        status_printf_ln(s, color,
                                _("  (Once your working directory is clean, run \"git rebase --continue\")"));
        } else {
 -              status_printf_ln(s, color, _("You are currently editing a commit during a rebase."));
 +              if (state->branch)
 +                      status_printf_ln(s, color,
 +                                       _("You are currently editing a commit while rebasing branch '%s' on '%s'."),
 +                                       state->branch,
 +                                       state->onto);
 +              else
 +                      status_printf_ln(s, color,
 +                                       _("You are currently editing a commit during a rebase."));
                if (advice_status_hints && !s->amend) {
                        status_printf_ln(s, color,
                                _("  (use \"git commit --amend\" to amend the current commit)"));
@@@ -953,57 -934,16 +966,57 @@@ static void show_bisect_in_progress(str
                                struct wt_status_state *state,
                                const char *color)
  {
 -      status_printf_ln(s, color, _("You are currently bisecting."));
 +      if (state->branch)
 +              status_printf_ln(s, color,
 +                               _("You are currently bisecting branch '%s'."),
 +                               state->branch);
 +      else
 +              status_printf_ln(s, color,
 +                               _("You are currently bisecting."));
        if (advice_status_hints)
                status_printf_ln(s, color,
                        _("  (use \"git bisect reset\" to get back to the original branch)"));
        wt_status_print_trailer(s);
  }
  
 +/*
 + * Extract branch information from rebase/bisect
 + */
 +static void read_and_strip_branch(struct strbuf *sb,
 +                                const char **branch,
 +                                const char *path)
 +{
 +      unsigned char sha1[20];
 +
 +      strbuf_reset(sb);
 +      if (strbuf_read_file(sb, git_path("%s", path), 0) <= 0)
 +              return;
 +
 +      while (sb->len && sb->buf[sb->len - 1] == '\n')
 +              strbuf_setlen(sb, sb->len - 1);
 +      if (!sb->len)
 +              return;
 +      if (!prefixcmp(sb->buf, "refs/heads/"))
 +              *branch = sb->buf + strlen("refs/heads/");
 +      else if (!prefixcmp(sb->buf, "refs/"))
 +              *branch = sb->buf;
 +      else if (!get_sha1_hex(sb->buf, sha1)) {
 +              const char *abbrev;
 +              abbrev = find_unique_abbrev(sha1, DEFAULT_ABBREV);
 +              strbuf_reset(sb);
 +              strbuf_addstr(sb, abbrev);
 +              *branch = sb->buf;
 +      } else if (!strcmp(sb->buf, "detached HEAD")) /* rebase */
 +              ;
 +      else                    /* bisect */
 +              *branch = sb->buf;
 +}
 +
  static void wt_status_print_state(struct wt_status *s)
  {
        const char *state_color = color(WT_STATUS_HEADER, s);
 +      struct strbuf branch = STRBUF_INIT;
 +      struct strbuf onto = STRBUF_INIT;
        struct wt_status_state state;
        struct stat st;
  
                                state.am_empty_patch = 1;
                } else {
                        state.rebase_in_progress = 1;
 +                      read_and_strip_branch(&branch, &state.branch,
 +                                            "rebase-apply/head-name");
 +                      read_and_strip_branch(&onto, &state.onto,
 +                                            "rebase-apply/onto");
                }
        } else if (!stat(git_path("rebase-merge"), &st)) {
                if (!stat(git_path("rebase-merge/interactive"), &st))
                        state.rebase_interactive_in_progress = 1;
                else
                        state.rebase_in_progress = 1;
 +              read_and_strip_branch(&branch, &state.branch,
 +                                    "rebase-merge/head-name");
 +              read_and_strip_branch(&onto, &state.onto,
 +                                    "rebase-merge/onto");
        } else if (!stat(git_path("CHERRY_PICK_HEAD"), &st)) {
                state.cherry_pick_in_progress = 1;
        }
 -      if (!stat(git_path("BISECT_LOG"), &st))
 +      if (!stat(git_path("BISECT_LOG"), &st)) {
                state.bisect_in_progress = 1;
 +              read_and_strip_branch(&branch, &state.branch,
 +                                    "BISECT_START");
 +      }
  
        if (state.merge_in_progress)
                show_merge_in_progress(s, &state, state_color);
                show_cherry_pick_in_progress(s, &state, state_color);
        if (state.bisect_in_progress)
                show_bisect_in_progress(s, &state, state_color);
 +      strbuf_release(&branch);
 +      strbuf_release(&onto);
  }
  
  void wt_status_print(struct wt_status *s)
                wt_status_print_other(s, &s->untracked, _("Untracked files"), "add");
                if (s->show_ignored_files)
                        wt_status_print_other(s, &s->ignored, _("Ignored files"), "add -f");
+               if (advice_status_u_option && 2000 < s->untracked_in_ms) {
+                       status_printf_ln(s, GIT_COLOR_NORMAL, "");
+                       status_printf_ln(s, GIT_COLOR_NORMAL,
+                                _("It took %.2f seconds to enumerate untracked files."
+                                  "  'status -uno'"),
+                                s->untracked_in_ms / 1000.0);
+                       status_printf_ln(s, GIT_COLOR_NORMAL,
+                                _("may speed it up, but you have to be careful not"
+                                  " to forget to add"));
+                       status_printf_ln(s, GIT_COLOR_NORMAL,
+                                _("new files yourself (see 'git help status')."));
+               }
        } else if (s->commitable)
                status_printf_ln(s, GIT_COLOR_NORMAL, _("Untracked files not listed%s"),
                        advice_status_hints
diff --combined wt-status.h
index 81e1dcf84dbfbea76657d3b4c65e3e63890396e9,09420d038016c1affd663ecd4b6501635de753a2..74208c06fd08b49041489c869d3c5f16804493da
@@@ -69,6 -69,7 +69,7 @@@ struct wt_status 
        struct string_list change;
        struct string_list untracked;
        struct string_list ignored;
+       uint32_t untracked_in_ms;
  };
  
  struct wt_status_state {
@@@ -79,8 -80,6 +80,8 @@@
        int rebase_interactive_in_progress;
        int cherry_pick_in_progress;
        int bisect_in_progress;
 +      const char *branch;
 +      const char *onto;
  };
  
  void wt_status_prepare(struct wt_status *s);