Permalink
Commits on Feb 21, 2017
  1. Merge branch 'svn-escape-backslash' of git://bogomips.org/git-svn

    * 'svn-escape-backslash' of git://bogomips.org/git-svn:
      git-svn: escape backslashes in refnames
    gitster committed Feb 21, 2017
Commits on Feb 17, 2017
  1. Git 2.12-rc2

    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    gitster committed Feb 17, 2017
Commits on Feb 16, 2017
  1. Hopefully the final batch of mini-topics before the final

    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    gitster committed Feb 16, 2017
  2. Merge branch 'jk/tempfile-ferror-fclose-confusion'

    Code clean-up.
    
    * jk/tempfile-ferror-fclose-confusion:
      tempfile: avoid "ferror | fclose" trick
    gitster committed Feb 16, 2017
  3. Merge branch 'dp/submodule-doc-markup-fix'

    Doc fix.
    
    * dp/submodule-doc-markup-fix:
      config.txt: fix formatting of submodule.alternateErrorStrategy section
    gitster committed Feb 16, 2017
  4. Merge branch 'jk/reset-to-break-a-commit-doc-updated'

    Doc update.
    
    * jk/reset-to-break-a-commit-doc-updated:
      reset: add an example of how to split a commit into two
    gitster committed Feb 16, 2017
  5. Merge branch 'jk/reset-to-break-a-commit-doc'

    Doc update.
    
    * jk/reset-to-break-a-commit-doc:
      Revert "reset: add an example of how to split a commit into two"
    gitster committed Feb 16, 2017
  6. Merge branch 'js/mingw-isatty'

    A hotfix for a topic already in 'master'.
    
    * js/mingw-isatty:
      mingw: make stderr unbuffered again
    gitster committed Feb 16, 2017
  7. Merge branch 'rs/strbuf-cleanup-in-rmdir-recursively'

    Code clean-up.
    
    * rs/strbuf-cleanup-in-rmdir-recursively:
      rm: reuse strbuf for all remove_dir_recursively() calls, again
    gitster committed Feb 16, 2017
  8. Merge branch 'rs/ls-files-partial-optim'

    "ls-files" run with pathspec has been micro-optimized to avoid
    having to memmove(3) unnecessary bytes.
    
    * rs/ls-files-partial-optim:
      ls-files: move only kept cache entries in prune_cache()
      ls-files: pass prefix length explicitly to prune_cache()
    gitster committed Feb 16, 2017
  9. Merge branch 'rs/cocci-check-free-only-null'

    A new coccinelle rule that catches a check of !pointer before the
    pointer is free(3)d, which most likely is a bug.
    
    * rs/cocci-check-free-only-null:
      cocci: detect useless free(3) calls
    gitster committed Feb 16, 2017
  10. Merge branch 'ls/p4-path-encoding'

    When "git p4" imports changelist that removes paths, it failed to
    convert pathnames when the p4 used encoding different from the one
    used on the Git side.  This has been corrected.
    
    * ls/p4-path-encoding:
      git-p4: fix git-p4.pathEncoding for removed files
    gitster committed Feb 16, 2017
  11. tempfile: avoid "ferror | fclose" trick

    The current code wants to record an error condition from
    either ferror() or fclose(), but makes sure that we always
    call both functions. So it can't use logical-OR "||", which
    would short-circuit when ferror() is true. Instead, it uses
    bitwise-OR "|" to evaluate both functions and set one or
    more bits in the "err" flag if they reported a failure.
    
    Unlike logical-OR, though, bitwise-OR does not introduce a
    sequence point, and the order of evaluation for its operands
    is unspecified. So a compiler would be free to generate code
    which calls fclose() first, and then ferror() on the
    now-freed filehandle.
    
    There's no indication that this has happened in practice,
    but let's write it out in a way that follows the standard.
    
    Noticed-by: Andreas Schwab <schwab@linux-m68k.org>
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    peff committed with gitster Feb 16, 2017
  12. config.txt: fix formatting of submodule.alternateErrorStrategy section

    Add missing `::` after the title.
    
    Signed-off-by: David Pursehouse <dpursehouse@collab.net>
    Acked-by: Stefan Beller <sbeller@google.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    dpursehouse committed with gitster Feb 16, 2017
  13. reset: add an example of how to split a commit into two

    It is often useful to break a commit into multiple parts that are more
    logical separations. This can be tricky to learn how to do without the
    brute-force method if re-writing code or commit messages from scratch.
    
    Add a section to the git-reset documentation which shows an example
    process for how to use git add -p and git commit -c HEAD@{1} to
    interactively break a commit apart and re-use the original commit
    message as a starting point when making the new commit message.
    
    Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jacob-keller committed with gitster Feb 16, 2017
  14. Revert "reset: add an example of how to split a commit into two"

    This reverts commit 7326451; a
    better rewrite will be queued separately.
    gitster committed Feb 16, 2017
Commits on Feb 15, 2017
  1. A bit more for -rc2

    gitster committed Feb 15, 2017
  2. Merge branch 'tg/stash-doc-cleanup'

    The documentation explained what "git stash" does to the working
    tree (after stashing away the local changes) in terms of "reset
    --hard", which was exposing an unnecessary implementation detail.
    
    * tg/stash-doc-cleanup:
      Documentation/stash: remove mention of git reset --hard
    gitster committed Feb 15, 2017
  3. Merge branch 'jk/doc-submodule-markup-fix'

    Doc markup fix.
    
    * jk/doc-submodule-markup-fix:
      docs/git-submodule: fix unbalanced quote
    gitster committed Feb 15, 2017
  4. Merge branch 'jk/doc-remote-helpers-markup-fix'

    Doc markup fix.
    
    * jk/doc-remote-helpers-markup-fix:
      docs/gitremote-helpers: fix unbalanced quotes
    gitster committed Feb 15, 2017
  5. Merge branch 'sb/doc-unify-bottom'

    Doc clean-up.
    
    * sb/doc-unify-bottom:
      Documentation: unify bottom "part of git suite" lines
    gitster committed Feb 15, 2017
  6. Merge branch 'sb/push-options-via-transport'

    The push-options given via the "--push-options" option were not
    passed through to external remote helpers such as "smart HTTP" that
    are invoked via the transport helper.
    
    * sb/push-options-via-transport:
      push options: pass push options to the transport helper
    gitster committed Feb 15, 2017
  7. Merge branch 'cw/completion'

    More command line completion (in contrib/) for recent additions.
    
    * cw/completion:
      completion: recognize more long-options
      completion: teach remote subcommands to complete options
      completion: teach replace to complete options
      completion: teach ls-remote to complete options
      completion: improve bash completion for git-add
      completion: add subcommand completion for rerere
      completion: teach submodule subcommands to complete options
    gitster committed Feb 15, 2017
  8. Merge branch 'rs/swap'

    Code clean-up.
    
    * rs/swap:
      graph: use SWAP macro
      diff: use SWAP macro
      use SWAP macro
      apply: use SWAP macro
      add SWAP macro
    gitster committed Feb 15, 2017
  9. Merge branch 'sb/submodule-doc'

    Doc updates.
    
    * sb/submodule-doc:
      submodule update documentation: don't repeat ourselves
      submodule documentation: add options to the subcommand
    gitster committed Feb 15, 2017
Commits on Feb 14, 2017
  1. mingw: make stderr unbuffered again

    When removing the hack for isatty(), we actually removed more than just
    an isatty() hack: we removed the hack where internal data structures of
    the MSVC runtime are modified in order to redirect stdout/stderr.
    
    Instead of using that hack (that does not work with newer versions of
    the runtime, anyway), we replaced it by reopening the respective file
    descriptors.
    
    What we forgot was to mark stderr as unbuffered again.
    
    Reported by Hannes Sixt. Fixed with Jeff Hostetler's assistance.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Tested-by: Johannes Sixt <j6t@kdbg.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    dscho committed with gitster Feb 13, 2017
Commits on Feb 13, 2017
  1. rm: reuse strbuf for all remove_dir_recursively() calls, again

    Don't throw the memory allocated for remove_dir_recursively() away after
    a single call, use it for the other entries as well instead.
    
    This change was done before in deb8e15 (rm: reuse strbuf for all
    remove_dir_recursively() calls), but was reverted as a side-effect of
    55856a3 (rm: absorb a submodules git dir before deletion). Reinstate
    the optimization.
    
    Signed-off-by: Rene Scharfe <l.s.r@web.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    René Scharfe committed with gitster Feb 11, 2017
  2. Documentation/stash: remove mention of git reset --hard

    Don't mention git reset --hard in the documentation for git stash save.
    It's an implementation detail that doesn't matter to the end user and
    thus shouldn't be exposed to them.  In addition it's not quite true for
    git stash -p, and will not be true when a filename argument to limit the
    stash to a few files is introduced.
    
    Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    tgummerer committed with gitster Feb 12, 2017
  3. docs/git-submodule: fix unbalanced quote

    The documentation gives an example of the submodule foreach
    command that uses both backticks and single-quotes. We stick
    the whole thing inside "+" markers to make it monospace, but
    the inside punctuation still needs escaping. We handle the
    backticks with "{backtick}", and use backslash-escaping for
    the single-quotes.
    
    But we missed the escaping on the second quote. Fortunately,
    asciidoc renders this unbalanced quote as we want (showing
    the quote), but asciidoctor does not. We could fix it by
    adding the missing backslash.
    
    However, let's take a step back. Even when rendered
    correctly, it's hard to read a long command stuck into the
    middle of a paragraph, and the important punctuation is hard
    to notice. Let's instead bump it into its own single-line
    code block. That makes both the source and the rendered
    result more readable, and as a bonus we don't have to worry
    about quoting at all.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    peff committed with gitster Feb 13, 2017
  4. docs/gitremote-helpers: fix unbalanced quotes

    Each of these options is missing the closing single-quote on
    the option name. This understandably confuses asciidoc,
    which ends up rendering a stray quote, like:
    
      option cloning {'true|false}
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    peff committed with gitster Feb 13, 2017
  5. ls-files: move only kept cache entries in prune_cache()

    prune_cache() first identifies those entries at the start of the sorted
    array that can be discarded.  Then it moves the rest of the entries up.
    Last it identifies the unwanted trailing entries among the moved ones
    and cuts them off.
    
    Change the order: Identify both start *and* end of the range to keep
    first and then move only those entries to the top.  The resulting code
    is slightly shorter and a bit more efficient.
    
    Signed-off-by: Rene Scharfe <l.s.r@web.de>
    Reviewed-by: Brandon Williams <bmwill@google.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    René Scharfe committed with gitster Feb 10, 2017
  6. ls-files: pass prefix length explicitly to prune_cache()

    The function prune_cache() relies on the fact that it is only called on
    max_prefix and sneakily uses the matching global variable max_prefix_len
    directly.  Tighten its interface by passing both the string and its
    length as parameters.  While at it move the NULL check into the function
    to collect all cache-pruning related logic in one place.
    
    Signed-off-by: Rene Scharfe <l.s.r@web.de>
    Reviewed-by: Brandon Williams <bmwill@google.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    René Scharfe committed with gitster Feb 10, 2017
Commits on Feb 11, 2017
  1. cocci: detect useless free(3) calls

    Add a semantic patch for removing checks that cause free(3) to only be
    called with a NULL pointer, as that must be a programming mistake.
    
    Signed-off-by: Rene Scharfe <l.s.r@web.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    René Scharfe committed with gitster Feb 11, 2017
Commits on Feb 10, 2017
  1. git-p4: fix git-p4.pathEncoding for removed files

    In a9e3835 we taught git-p4 a way to re-encode path names from what
    was used in Perforce to UTF-8. This path re-encoding worked properly for
    "added" paths. "Removed" paths were not re-encoded and therefore
    different from the "added" paths. Consequently, these files were not
    removed in a git-p4 cloned Git repository because the path names did not
    match.
    
    Fix this by moving the re-encoding to a place that affects "added" and
    "removed" paths. Add a test to demonstrate the issue.
    
    Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
    Reviewed-by: Luke Diamand <luke@diamand.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    larsxschneider committed with gitster Feb 9, 2017
  2. Git 2.12-rc1

    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    gitster committed Feb 10, 2017