Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Mar 31, 2014
  1. Junio C Hamano

    Merge branch 'mm/status-porcelain-format-i18n-fix'

    gitster authored
    * mm/status-porcelain-format-i18n-fix:
      status: disable translation when --porcelain is used
Commits on Mar 26, 2014
  1. Matthieu Moy Junio C Hamano

    status: disable translation when --porcelain is used

    moy authored gitster committed
    "git status --branch --porcelain" displays the status of the branch
    (ahead, behind, gone), and used gettext to translate the string.
    
    Use hardcoded strings when --porcelain is used, but keep the gettext
    translation for "git status --short" which is essentially the same, but
    meant to be read by a human.
    
    Reported-by: Anarky <ghostanarky@gmail.com>
    Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Feb 18, 2014
  1. Nguyễn Thái Ngọc Duy Junio C Hamano

    wt-status.c: move cut-line print code out to wt_status_add_cut_line

    pclouds authored gitster committed
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Dec 5, 2013
  1. Jens Lehmann Junio C Hamano

    commit -v: strip diffs and submodule shortlogs from the commit message

    jlehmann authored gitster committed
    When using the '-v' option of "git commit" the diff added to the commit
    message temporarily for editing is stripped off after the user exited the
    editor by searching for "\ndiff --git " and truncating the commmit message
    there if it is found.
    
    But this approach has two problems:
    
    - when the commit message itself contains a line starting with
      "diff --git" it will be truncated there prematurely; and
    
    - when the "diff.submodule" setting is set to "log", the diff may
      start with "Submodule <hash1>..<hash2>", which will be left in
      the commit message while it shouldn't.
    
    Fix that by introducing a special scissor separator line starting with the
    comment character ('#' or the core.commentChar config if set) followed by
    two lines describing what it is for. The scissor line - which will not be
    translated - is used to reliably detect the start of the diff so it can be
    chopped off from the commit message, no matter what the user enters there.
    
    Turn a known test failure fixed by this change into a successful test;
    also add one for a diff starting with a submodule log and another one for
    proper handling of the comment char.
    
    Reported-by: Ari Pollak <ari@debian.org>
    Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Oct 11, 2013
  1. jrn

    status: show commit sha1 in "You are currently cherry-picking" message

    Ralf Thielow authored jrn committed
    Especially helpful when cherry-picking multiple commits.
    
    Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
    Acked-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Commits on Sep 20, 2013
  1. Junio C Hamano

    Merge branch 'mm/commit-template-squelch-advice-messages'

    gitster authored
    From the commit log template, remove irrelevant "advice" messages
    that are shared with "git status" output.
    
    * mm/commit-template-squelch-advice-messages:
      commit: disable status hints when writing to COMMIT_EDITMSG
      wt-status: turn advice_status_hints into a field of wt_status
      commit: factor status configuration is a helper function
  2. Junio C Hamano

    Merge branch 'mm/status-without-comment-char'

    gitster authored
    "git status" now omits the prefix to make its output a comment in a
    commit log editor, which is not necessary for human consumption.
    
    We may want to tighten the output to omit unnecessary trailing blank
    lines, but that does not have to be in the scope of this series.
    
    * mm/status-without-comment-char:
      t7508: avoid non-portable sed expression
      status: add missing blank line after list of "other" files
      tests: don't set status.displayCommentPrefix file-wide
      status: disable display of '#' comment prefix by default
      submodule summary: ignore --for-status option
      wt-status: use argv_array API
      builtin/stripspace.c: fix broken indentation
Commits on Sep 12, 2013
  1. Matthieu Moy Junio C Hamano

    wt-status: turn advice_status_hints into a field of wt_status

    moy authored gitster committed
    No behavior change in this patch, but this makes the display of status
    hints more flexible as they can be enabled or disabled for individual
    calls to commit.c:run_status().
    
    Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Sep 9, 2013
  1. Junio C Hamano

    Merge branch 'jl/submodule-mv'

    gitster authored
    "git mv A B" when moving a submodule A does "the right thing",
    inclusing relocating its working tree and adjusting the paths in
    the .gitmodules file.
    
    * jl/submodule-mv: (53 commits)
      rm: delete .gitmodules entry of submodules removed from the work tree
      mv: update the path entry in .gitmodules for moved submodules
      submodule.c: add .gitmodules staging helper functions
      mv: move submodules using a gitfile
      mv: move submodules together with their work trees
      rm: do not set a variable twice without intermediate reading.
      t6131 - skip tests if on case-insensitive file system
      parse_pathspec: accept :(icase)path syntax
      pathspec: support :(glob) syntax
      pathspec: make --literal-pathspecs disable pathspec magic
      pathspec: support :(literal) syntax for noglob pathspec
      kill limit_pathspec_to_literal() as it's only used by parse_pathspec()
      parse_pathspec: preserve prefix length via PATHSPEC_PREFIX_ORIGIN
      parse_pathspec: make sure the prefix part is wildcard-free
      rename field "raw" to "_raw" in struct pathspec
      tree-diff: remove the use of pathspec's raw[] in follow-rename codepath
      remove match_pathspec() in favor of match_pathspec_depth()
      remove init_pathspec() in favor of parse_pathspec()
      remove diff_tree_{setup,release}_paths
      convert common_prefix() to use struct pathspec
      ...
Commits on Sep 6, 2013
  1. Matthieu Moy Junio C Hamano

    status: disable display of '#' comment prefix by default

    moy authored gitster committed
    Historically, "git status" needed to prefix each output line with '#' so
    that the output could be added as comment to the commit message. This
    prefix comment has no real purpose when "git status" is ran from the
    command-line, and this may distract users from the real content.
    
    Disable this prefix comment by default, and make it re-activable for
    users needing backward compatibility with status.displayCommentPrefix.
    
    Obviously, "git commit" ignores status.displayCommentPrefix and keeps the
    comment unconditionnaly when writing to COMMIT_EDITMSG (but not when
    writing to stdout for an error message or with --dry-run).
    
    Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 15, 2013
  1. Nguyễn Thái Ngọc Duy Junio C Hamano

    status: convert to use parse_pathspec

    pclouds authored gitster committed
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 10, 2013
  1. Jeff King Junio C Hamano

    wt-status: use "format" function attribute for status_printf

    peff authored gitster committed
    These functions could benefit from the added compile-time
    safety of having the compiler check printf arguments.
    
    Unfortunately, we also sometimes pass an empty format string,
    which will cause false positives with -Wformat-zero-length.
    In this case, that warning is wrong because our function is
    not a no-op with an empty format: it may be printing
    colorized output along with a trailing newline.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Apr 2, 2013
  1. Matthieu Moy Junio C Hamano

    status: show commit sha1 in "You are currently reverting" message

    moy authored gitster committed
    Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. Matthieu Moy Junio C Hamano

    status: show 'revert' state and status hint

    moy authored gitster committed
    This is the logical equivalent for "git status" of 3ee4452 (bash: teach
    __git_ps1 about REVERT_HEAD).
    
    Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Apr 1, 2013
  1. Junio C Hamano

    Merge branch 'nd/branch-show-rebase-bisect-state'

    gitster authored
    Add a bit more information to "git status" during a rebase/bisect
    session.
    
    * nd/branch-show-rebase-bisect-state:
      status, branch: fix the misleading "bisecting" message
      branch: show more information when HEAD is detached
      status: show more info than "currently not on any branch"
      wt-status: move wt_status_get_state() out to wt_status_print()
      wt-status: split wt_status_state parsing function out
      wt-status: move strbuf into read_and_strip_branch()
Commits on Mar 21, 2013
  1. Junio C Hamano

    Merge branch 'tb/document-status-u-tradeoff'

    gitster authored
    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
Commits on Mar 17, 2013
  1. Nguyễn Thái Ngọc Duy Junio C Hamano

    status: show more info than "currently not on any branch"

    pclouds authored gitster committed
    When a remote ref or a tag is checked out, HEAD is automatically
    detached. There is no user-friendly way to find out what ref is
    checked out in this case. This patch digs in reflog for this
    information and shows "HEAD detached from origin/master" or "HEAD
    detached at v1.8.0" instead of "currently not on any branch".
    
    When it cannot figure out the original ref, it shows an abbreviated
    SHA-1. "Currently not on any branch" would never display (unless
    reflog is pruned to near empty that the last checkout entry is lost).
    
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. Nguyễn Thái Ngọc Duy Junio C Hamano

    wt-status: split wt_status_state parsing function out

    pclouds authored gitster committed
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. Nguyễn Thái Ngọc Duy Junio C Hamano

    wt-status: move strbuf into read_and_strip_branch()

    pclouds authored gitster committed
    The strbufs are placed outside read_and_strip_branch as a premature
    optimization: when it reads "refs/heads/foo" to strbuf and wants to
    return just "foo", it could do so without memory movement. In return
    the caller must not use the returned pointer after releasing strbufs,
    which own the buffers that contain the returned strings. It's a clumsy
    design.
    
    By moving strbufs into read_and_strip_branch(), the returned pointer
    always points to a malloc'd buffer or NULL. The pointer can be passed
    around and freed after use.
    
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. Nguyễn Thái Ngọc Duy Junio C Hamano

    status: advise to consider use of -u when read_directory takes too long

    pclouds authored gitster committed
    Introduce advice.statusUoption to suggest considering use of -u to
    strike different trade-off when it took more than 2 seconds to
    enumerate untracked/ignored files.
    
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Feb 5, 2013
  1. Nguyễn Thái Ngọc Duy Junio C Hamano

    status: show the branch name if possible in in-progress info

    pclouds authored gitster committed
    The typical use-case is starting a rebase, do something else, come
    back the day after, run "git status" or make a new commit and wonder
    what in the world's going on. Which branch is being rebased is
    probably the most useful tidbit to help, but the target may help
    too.
    
    Ideally, I would have loved to see "rebasing master on
    origin/master", but the target ref name is not stored during rebase,
    so this patch writes "rebasing master on a78c8c98b" as a
    half-measure to remind future users of that potential improvement.
    
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Sep 16, 2012
  1. Junio C Hamano

    wt-status.c: mark a private file-scope symbol as static

    gitster authored
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 16, 2012
  1. Jeff King Junio C Hamano

    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 <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jun 14, 2012
  1. Junio C Hamano

    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 t7060-wt-status.sh is now working with the new help
    messages. Tests about suggestions of "git rm" are also added.
    
    Signed-off-by: Lucien Kong <Lucien.Kong@ensimag.imag.fr>
    Signed-off-by: Valentin Duperray <Valentin.Duperray@ensimag.imag.fr>
    Signed-off-by: Franck Jonas <Franck.Jonas@ensimag.imag.fr>
    Signed-off-by: Thomas Nguy <Thomas.Nguy@ensimag.imag.fr>
    Signed-off-by: Huynh Khoi Nguyen Nguyen <Huynh-Khoi-Nguyen.Nguyen@ensimag.imag.fr>
    Signed-off-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on May 8, 2012
  1. Jeff King

    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 <peff@peff.net>
  2. Jeff King

    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
    
    Conflicts:
    	wt-status.h
  3. Jeff King

    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 <peff@peff.net>
  4. Jeff King

    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
    stack.
    
    Signed-off-by: Jeff King <peff@peff.net>
Commits on Apr 27, 2012
  1. Nguyễn Thái Ngọc Duy Junio C Hamano

    status: add --column

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

    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
    
    Conflicts:
    	builtin/commit.c
Commits on Mar 8, 2011
  1. jrn Junio C Hamano

    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 <gitster@pobox.com>
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Feb 22, 2011
  1. Jay Soffian Junio C Hamano

    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 <jaysoffian@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Nov 30, 2010
  1. Aga303 Junio C Hamano

    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 <aga@iki.fi>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jun 30, 2010
  1. Junio C Hamano

    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
    
    Conflicts:
    	builtin/commit.c
    	t/t7508-status.sh
    	wt-status.c
    	wt-status.h
Commits on Jun 25, 2010
  1. Jens Lehmann Junio C Hamano

    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 <Jens.Lehmann@web.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Something went wrong with that request. Please try again.