Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Jul 16, 2012
  1. @peff @gitster

    status: color in-progress message like other header messages

    peff authored gitster committed
    The "status" command recently learned to describe the
    in-progress operation in its long output format (e.g.,
    rebasing, am, etc). This message gets its own slot in the
    color table, even though it is not configurable. As a
    result, if the user has set color.status.header to a
    non-default value, this message will not match (and cannot
    be made to match, as there is no config option).
    It is probably more sane to just color it like the rest of
    the text (i.e., just use color.status.header). This would
    not allow users to customize the color of this message
    independently, but they cannot do that with the current code
    anyway, and if somebody wants to build customizable
    colorization later, this patch does not make it much harder
    to do so.
    Signed-off-by: Jeff King <>
    Signed-off-by: Junio C Hamano <>
Commits on Jun 14, 2012
  1. @gitster

    wt-status.*: better advices for git status added

    Lucien Kong authored gitster committed
    This patch provides new informative help messages in the display of
    'git status' (at the top) during conflicts, rebase, am, bisect or
    cherry-pick process.
    The new messages are not shown when using options such as -s or
    --porcelain. The messages about the current situation of the user are
    always displayed but the advices on what the user needs to do in order
    to resume a rebase/bisect/am/commit after resolving conflicts can be
    hidden by setting advice.statushints to 'false' in the config file.
    Thus, information about the updated advice.statushints key are added
    in Documentation/config.txt.
    Also, the test is now working with the new help
    messages. Tests about suggestions of "git rm" are also added.
    Signed-off-by: Lucien Kong <>
    Signed-off-by: Valentin Duperray <>
    Signed-off-by: Franck Jonas <>
    Signed-off-by: Thomas Nguy <>
    Signed-off-by: Huynh Khoi Nguyen Nguyen <>
    Signed-off-by: Matthieu Moy <>
    Signed-off-by: Junio C Hamano <>
Commits on May 8, 2012
  1. @peff

    status: refactor colopts handling

    peff authored
    The current code reads the config and command-line options
    into a separate "colopts" variable, and then copies the
    contents of that variable into the "struct wt_status". We
    can eliminate the extra variable and copy just write
    straight into the wt_status struct.
    This simplifies the "status" code a little bit.
    Unfortunately, it makes the "commit" code one line more
    complex; a side effect of the separate variable was that
    "commit" did not copy the colopts variable, so any
    column.status configuration had no effect.
    The result still ends up cleaner, though. In the previous
    version, it was unclear whether commit simply forgot to copy
    the colopt variable, or whether it was intentional. Now it
    explicitly turns off column options. Furthermore, if commit
    later learns to respect column.status, this will make the
    end result simpler. I punted on just adding that feature
    now, because it was sufficiently non-obvious that it should
    not go into a refactoring patch.
    Signed-off-by: Jeff King <>
  2. @peff

    Merge branch 'jk/maint-status-porcelain-z-b' into HEAD

    peff authored
    * jk/maint-status-porcelain-z-b:
      status: respect "-b" for porcelain format
      status: fix null termination with "-b"
      status: refactor null_termination option
      commit: refactor option parsing
  3. @peff

    status: respect "-b" for porcelain format

    peff authored
    There is no reason not to, as the user has to explicitly ask
    for it, so we are not breaking compatibility by doing so. We
    can do this simply by moving the "show_branch" flag into
    the wt_status struct. As a bonus, this saves us from passing
    it explicitly, simplifying the code.
    Signed-off-by: Jeff King <>
  4. @peff

    status: refactor null_termination option

    peff authored
    This option is passed separately to the wt_status printing
    functions, whereas every other formatting option is
    contained in the wt_status struct itself. Let's do the same
    here, so we can avoid passing it around through the call
    Signed-off-by: Jeff King <>
Commits on Apr 27, 2012
  1. @pclouds @gitster

    status: add --column

    pclouds authored gitster committed
    Signed-off-by: Nguyễn Thái Ngọc Duy <>
    Signed-off-by: Junio C Hamano <>
Commits on Mar 20, 2011
  1. @gitster

    Merge branch 'jn/status-translatable'

    gitster authored
    * jn/status-translatable:
      commit, status: use status_printf{,_ln,_more} helpers
      commit: refer to commit template as s->fp
      wt-status: add helpers for printing wt-status lines
Commits on Mar 8, 2011
  1. @jrn @gitster

    wt-status: add helpers for printing wt-status lines

    jrn authored gitster committed
    Introduce status_printf{,_ln,_more} wrapper functions around
    color_vfprintf() which take care of adding "#" to the beginning of
    status lines automatically.  The semantics:
     - status_printf() is just like color_fprintf() but it adds a "# "
       at the beginning of each line of output;
     - status_printf_ln() is a convenience function that additionally
       adds "\n" at the end;
     - status_printf_more() is a variant of status_printf() used to
       continue lines that have already started.  It suppresses the "#" at
       the beginning of the first line.
    Helped-by: Junio C Hamano <>
    Signed-off-by: Jonathan Nieder <>
    Signed-off-by: Junio C Hamano <>
Commits on Feb 22, 2011
  1. @jaysoffian @gitster

    Teach commit about CHERRY_PICK_HEAD

    jaysoffian authored gitster committed
    Previously the user was advised to use commit -c CHERRY_PICK_HEAD after
    a conflicting cherry-pick. While this would preserve the original
    commit's authorship, it would sadly discard cherry-pick's carefully
    crafted MERGE_MSG (which contains the list of conflicts as well as the
    original commit-id in the case of cherry-pick -x).
    On the other hand, if a bare 'commit' were performed, it would preserve
    the MERGE_MSG while resetting the authorship.
    In other words, there was no way to simultaneously take the authorship
    from CHERRY_PICK_HEAD and the commit message from MERGE_MSG.
    This change fixes that situation. A bare 'commit' will now take the
    authorship from CHERRY_PICK_HEAD and the commit message from MERGE_MSG.
    If the user wishes to reset authorship, that must now be done explicitly
    via --reset-author.
    A side-benefit of passing commit authorship along this way is that we
    can eliminate redundant authorship parsing code from revert.c.
    (Also removed an unused include from revert.c)
    Signed-off-by: Jay Soffian <>
    Signed-off-by: Junio C Hamano <>
Commits on Nov 30, 2010
  1. @Aga303 @gitster

    status: show branchname with a configurable color

    Aga303 authored gitster committed
    You can tell "git status" to paint the name of the current branch in its
    output (the line that says "On branch ...") by setting the configuration
    variable color.status.branch; it is by default turned off.
    Signed-off-by: Aleksi Aalto <>
    Signed-off-by: Junio C Hamano <>
Commits on Jun 30, 2010
  1. @gitster

    Merge branch 'jl/status-ignore-submodules'

    gitster authored
    * jl/status-ignore-submodules:
      Add the option "--ignore-submodules" to "git status"
      git submodule: ignore dirty submodules for summary and status
Commits on Jun 25, 2010
  1. @jlehmann @gitster

    Add the option "--ignore-submodules" to "git status"

    jlehmann authored gitster committed
    In some use cases it is not desirable that "git status" considers
    submodules that only contain untracked content as dirty. This may happen
    e.g. when the submodule is not under the developers control and not all
    build generated files have been added to .gitignore by the upstream
    developers. Using the "untracked" parameter for the "--ignore-submodules"
    option disables checking for untracked content and lets git diff report
    them as changed only when they have new commits or modified content.
    Sometimes it is not wanted to have submodules show up as changed when they
    just contain changes to their work tree (this was the behavior before
    1.7.0). An example for that are scripts which just want to check for
    submodule commits while ignoring any changes to the work tree. Also users
    having large submodules known not to change might want to use this option,
    as the - sometimes substantial - time it takes to scan the submodule work
    tree(s) is saved when using the "dirty" parameter.
    And if you want to ignore any changes to submodules, you can now do that
    by using this option without parameters or with "all" (when the config
    option status.submodulesummary is set, using "all" will also suppress the
    output of the submodule summary).
    A new function handle_ignore_submodules_arg() is introduced to parse this
    option new to "git status" in a single location, as "git diff" already
    knew it.
    Signed-off-by: Jens Lehmann <>
    Signed-off-by: Junio C Hamano <>
Commits on Jun 21, 2010
  1. @gitster

    Merge branch 'gv/portable'

    gitster authored
    * gv/portable:
      test-lib: use DIFF definition from GIT-BUILD-OPTIONS
      build: propagate $DIFF to scripts
      Makefile: Tru64 portability fix
      Makefile: HP-UX 10.20 portability fixes
      Makefile: HPUX11 portability fixes
      Makefile: SunOS 5.6 portability fix
      inline declaration does not work on AIX
      Allow disabling "inline"
      Some platforms lack socklen_t type
      Make NO_{INET_NTOP,INET_PTON} configured independently
      Makefile: some platforms do not have hstrerror anywhere
      git-compat-util.h: some platforms with mmap() lack MAP_FAILED definition
      test_cmp: do not use "diff -u" on platforms that lack one
      fixup: do not unconditionally disable "diff -u"
      tests: use "test_cmp", not "diff", when verifying the result
      Do not use "diff" found on PATH while building and installing
      enums: omit trailing comma for portability
      Makefile: -lpthread may still be necessary when libc has only pthread stubs
      Rewrite dynamic structure initializations to runtime assignment
      Makefile: pass CPPFLAGS through to fllow customization
Commits on Jun 3, 2010
  1. @knittl @gitster

    Show branch information in short output of git status

    knittl authored gitster committed
    This patch adds a first line in the output of `git status -s` when given
    the option `-b` or `--branch`, showing which branch the user is
    currently on, and in case of tracking branches the number of commits on
    each branch.
    Signed-off-by: Daniel Knittl-Frank <>
    Signed-off-by: Junio C Hamano <>
Commits on May 31, 2010
  1. @gitster

    enums: omit trailing comma for portability

    Gary V. Vaughan authored gitster committed
    Without this patch at least IBM VisualAge C 5.0 (I have 5.0.2) on AIX
    5.1 fails to compile git.
    enum style is inconsistent already, with some enums declared on one
    line, some over 3 lines with the enum values all on the middle line,
    sometimes with 1 enum value per line... and independently of that the
    trailing comma is sometimes present and other times absent, often
    mixing with/without trailing comma styles in a single file, and
    sometimes in consecutive enum declarations.
    Clearly, omitting the comma is the more portable style, and this patch
    changes all enum declarations to use the portable omitted dangling
    comma style consistently.
    Signed-off-by: Gary V. Vaughan <>
    Signed-off-by: Junio C Hamano <>
Commits on Apr 10, 2010
  1. @gitster

    wt-status: collect ignored files

    gitster authored
    Signed-off-by: Junio C Hamano <>
  2. @gitster

    wt-status: remove unused workdir_untracked member

    gitster authored
    Signed-off-by: Junio C Hamano <>
Commits on Mar 8, 2010
  1. @jlehmann @gitster

    git status: Show detailed dirty status of submodules in long format

    jlehmann authored gitster committed
    Since 1.7.0 there are three reasons a submodule is considered modified
    against the work tree: It contains new commits, modified content or
    untracked content. Lets show all reasons in the long format of git status,
    so the user can better asses the nature of the modification. This change
    does not affect the short and porcelain formats.
    Two new members are added to "struct wt_status_change_data" to store the
    information gathered by run_diff_files(). wt-status.c uses the new flag
    DIFF_OPT_DIRTY_SUBMODULES to tell diff-lib.c it wants to get detailed
    dirty information about submodules.
    A hint line for submodules is printed in the dirty header when dirty
    submodules are present.
    Signed-off-by: Jens Lehmann <>
    Signed-off-by: Junio C Hamano <>
Commits on Dec 12, 2009
  1. @gitster

    status/commit: do not suggest "reset HEAD <path>" while merging

    gitster authored
    Suggesting "'reset HEAD <path>' to unstage" is dead wrong if we are about
    to record a merge commit.  For either an unmerged path (i.e. with
    unresolved conflicts), or an updated path, it would result in discarding
    what the other branch did.
    Note that we do not do anything special in a case where we are amending a
    merge.  The user is making an evil merge starting from an already
    committed merge, and running "reset HEAD <path>" is the right way to get
    rid of the local edit that has been added to the index.
    Once "reset --unresolve <path>" becomes available, we might want to
    suggest it for a merged path that has unresolve information, but until
    then, just remove the incorrect advice.
    We might also want to suggest "checkout --conflict <path>" to revert the
    file in the work tree to the state of failed automerge for an unmerged
    path, but we never did that, and this commit does not change that.
    Signed-off-by: Junio C Hamano <>
Commits on Dec 7, 2009
  1. @peff @gitster

    status: disable color for porcelain format

    peff authored gitster committed
    The porcelain format is identical to the shortstatus format,
    except that it should not respect any user configuration,
    including color.
    Signed-off-by: Jeff King <>
    Signed-off-by: Junio C Hamano <>
Commits on Dec 5, 2009
  1. @mjg @gitster

    builtin-commit: refactor short-status code into wt-status.c

    mjg authored gitster committed
    Currently, builtin-commit.c contains most code producing the
    short-status output, whereas wt-status.c contains most of the code for
    the long format.
    Refactor so that most of the long and short format producing code
    resides in wt-status.c and is named analogously.
    Signed-off-by: Michael J Gruber <>
    Signed-off-by: Junio C Hamano <>
Commits on Aug 22, 2009
  1. @gitster

    git stat: the beginning of "status that is not a dry-run of commit"

    gitster authored
    Tentatively add "git stat" as a new command.
    This is not "preview of commit with the same arguments"; the path parameters
    are not paths to be added to the pristine index (aka "--only" option), but
    are taken as pathspecs to limit the output.  Later in 1.7.0 release, it will
    take over "git status".
    Signed-off-by: Junio C Hamano <>
Commits on Aug 10, 2009
  1. @gitster

    wt-status: collect untracked files in a separate "collect" phase

    gitster authored
    In a way similar to updated and locally modified files are collected.
    Signed-off-by: Junio C Hamano <>
  2. @gitster

    Make git_status_config() file scope static to builtin-commit.c

    gitster authored
    Signed-off-by: Junio C Hamano <>
  3. @gitster

    wt-status: move wt_status_colors[] into wt_status structure

    gitster authored
    The benefit of this one alone is somewhat iffy, but for completeness this
    moves the wt_status_colors[] color palette to the wt_status structure to
    complete the libification started by the previous commit.
    Signed-off-by: Junio C Hamano <>
  4. @gitster

    wt-status: move many global settings to wt_status structure

    gitster authored
    Turn four global variables (wt_status_use_color, show_tracked_files,
    wt_status_relative_paths, and wt_status_submodule_summary) into fields of
    wt_status structure.  They can also lose "wt_status_" prefix.
    Get rid of "untracked" field that was used only to keep track of otherwise
    available information redundantly.
    Signed-off-by: Junio C Hamano <>
Commits on Aug 7, 2009
  1. @gitster

    status: show worktree status of conflicted paths separately

    gitster authored
    When a path is unmerged in the index, we used to always say "unmerged" in
    the "Changed but not updated" section, even when the path was deleted in
    the work tree.
    Remove unmerged entries from the "Updated" section, and create a new
    section "Unmerged paths".  Describe how the different stages conflict
    in more detail in this new section.
    Note that with the current 3-way merge policy (with or without recursive),
    certain combinations of index stages should never happen.  For example,
    having only stage #2 means that a path that did not exist in the common
    ancestor was added by us while the other branch did not do anything to it,
    which would have autoresolved to take our addition.  The code nevertheless
    prepares for the possibility that future merge policies may leave a path
    in such a state.
    Signed-off-by: Junio C Hamano <>
Commits on Aug 6, 2009
  1. @gitster

    wt-status.c: rework the way changes to the index and work tree are su…

    gitster authored
    Introduce a new infrastructure to find and summarize changes in a single
    string list, and rewrite wt_status_print_{updated,changed} functions using
    The goal of this change is to give more information on conflicted paths in
    the status output.
    Signed-off-by: Junio C Hamano <>
Commits on Jun 9, 2008
  1. @gitster

    Add argument 'no' commit/status option -u|--untracked-files

    Marius Storm-Olsen authored gitster committed
    This new argument teaches Git to not look for any untracked files,
    saving cycles on slow file systems, or large repos.
    Signed-off-by: Marius Storm-Olsen <>
  2. @gitster

    Add an optional <mode> argument to commit/status -u|--untracked-files…

    Marius Storm-Olsen authored gitster committed
    … option
    This lets you specify how you want untracked files to be listed.
    The possible options are:
        normal - Show untracked files and directories
        all    - Show all untracked files
    The 'all' mode is used, if the mode is not specified.
    Signed-off-by: Marius Storm-Olsen <>
Commits on May 25, 2008
  1. @gitster

    Merge branch 'js/config-cb'

    gitster authored
    * js/config-cb:
      Provide git_config with a callback-data parameter
Commits on May 23, 2008
  1. @edendevelopment @gitster

    Updated status to show 'Not currently on any branch' in red

    edendevelopment authored gitster committed
    This provides additional warning to users when attempting to
    commit to a detached HEAD. It is configurable in color.status.nobranch.
    Signed-off-by: Chris Parsons <>
    Acked-by: Jeff King <>
    Signed-off-by: Junio C Hamano <>
Commits on May 14, 2008
  1. @dscho @gitster

    Provide git_config with a callback-data parameter

    dscho authored gitster committed
    git_config() only had a function parameter, but no callback data
    parameter.  This assumes that all callback functions only modify
    global variables.
    With this patch, every callback gets a void * parameter, and it is hoped
    that this will help the libification effort.
    Signed-off-by: Johannes Schindelin <>
    Signed-off-by: Junio C Hamano <>
Commits on May 11, 2008
  1. @gitster

    wt-status.h: declare global variables as extern

    Johannes Sixt authored gitster committed
    There are linkers out there that complain if a global non-static variable
    is defined multiple times.
    Signed-off-by: Johannes Sixt <>
    Signed-off-by: Junio C Hamano <>
Something went wrong with that request. Please try again.