Permalink
Commits on Sep 27, 2016
  1. Merge branch 'dt/mailinfo' into next

    * dt/mailinfo:
      add David Turner's Two Sigma address
    gitster committed Sep 27, 2016
  2. Merge branch 'va/git-gui-i18n' into next

    "git gui" l10n to Portuguese.
    
    * va/git-gui-i18n:
      git-gui: l10n: add Portuguese translation
      git-gui i18n: mark strings for translation
    gitster committed Sep 27, 2016
  3. Merge branch 'rs/git-gui-use-modern-git-merge-syntax' into next

    The original command line syntax for "git merge", which was "git
    merge <msg> HEAD <parent>...", has been deprecated for quite some
    time, and "git gui" was the last in-tree user of the syntax.  This
    is finally fixed, so that we can move forward with the deprecation.
    
    * rs/git-gui-use-modern-git-merge-syntax:
      git-gui: stop using deprecated merge syntax
    gitster committed Sep 27, 2016
  4. Merge branch 'jc/verify-loose-object-header' into next

    Codepaths that read from an on-disk loose object were too loose in
    validating what they are reading is a proper object file and
    sometimes read past the data they read from the disk, which has
    been corrected.  H/t to Gustavo Grieco for reporting.
    
    * jc/verify-loose-object-header:
      unpack_sha1_header(): detect malformed object header
      streaming: make sure to notice corrupt object
    gitster committed Sep 27, 2016
  5. Merge branch 'nd/init-core-worktree-in-multi-worktree-world' into next

    "git init" tried to record core.worktree in the repository's
    'config' file when GIT_WORK_TREE environment variable was set and
    it was different from where GIT_DIR appears as ".git" at its top,
    but the logic was faulty when .git is a "gitdir:" file that points
    at the real place, causing trouble in working trees that are
    managed by "git worktree".  This has been corrected.
    
    * nd/init-core-worktree-in-multi-worktree-world:
      init: kill git_link variable
      init: do not set unnecessary core.worktree
      init: kill set_git_dir_init()
      init: call set_git_dir_init() from within init_db()
      init: correct re-initialization from a linked worktree
    gitster committed Sep 27, 2016
  6. Merge branch 'ik/gitweb-force-highlight' into next

    "gitweb" can spawn "highlight" to show blob contents with
    (programming) language-specific syntax highlighting, but only
    when the language is known.  "highlight" can however be told
    to make the guess itself by giving it "--force" option, which
    has been enabled.
    
    * ik/gitweb-force-highlight:
      gitweb: use highlight's shebang detection
      gitweb: remove unused guess_file_syntax() parameter
    gitster committed Sep 27, 2016
  7. Merge branch 'rs/copy-array' into next

    Code cleanup.
    
    * rs/copy-array:
      use COPY_ARRAY
      add COPY_ARRAY
    gitster committed Sep 27, 2016
  8. Merge branch 'mh/diff-indent-heuristic' into next

    Output from "git diff" can be made easier to read by selecting
    which lines are common and which lines are added/deleted
    intelligently when the lines before and after the changed section
    are the same.  A command line option is added to help with the
    experiment to find a good heuristics.
    
    * mh/diff-indent-heuristic:
      xdiff: rename "struct group" to "struct xdlgroup"
    gitster committed Sep 27, 2016
  9. xdiff: rename "struct group" to "struct xdlgroup"

    Commit e8adf23 (xdl_change_compact(): introduce the concept
    of a change group, 2016-08-22) added a "struct group" type
    to xdiff/xdiffi.c. But the POSIX system header "grp.h"
    already defines "struct group" (it is part of the getgrnam
    interface). This happens to work because the new type is
    local to xdiffi.c, and the xdiff code includes a relatively
    small set of system headers. But it will break compilation
    if xdiff ever switches to using git-compat-util.h.  It can
    also probably cause confusion with tools that look at the
    whole code base, like coccinelle or ctags.
    
    Let's resolve by giving the xdiff variant a scoped name,
    which is closer to other xdiff types anyway (e.g.,
    xdlfile_t, though note that xdiff is fond if typedefs when
    Git usually is not).
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    peff committed with gitster Sep 27, 2016
  10. add David Turner's Two Sigma address

    Signed-off-by: David Turner <novalis@novalis.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    novalis committed with gitster Sep 27, 2016
Commits on Sep 26, 2016
  1. Sync with master

    * master:
      Fifth batch for 2.11
    gitster committed Sep 26, 2016
  2. Merge branch 'jk/ident-ai-canonname-could-be-null' into next

    In the codepath that comes up with the hostname to be used in an
    e-mail when the user didn't tell us, we looked at ai_canonname
    field in struct addrinfo without making sure it is not NULL first.
    
    * jk/ident-ai-canonname-could-be-null:
      ident: handle NULL ai_canonname
    gitster committed Sep 26, 2016
  3. Merge branch 'jk/verify-packfile-gently' into next

    A low-level function verify_packfile() was meant to show errors
    that were detected without dying itself, but under some conditions
    it didn't and died instead, which has been fixed.
    
    * jk/verify-packfile-gently:
      verify_packfile: check pack validity before accessing data
    gitster committed Sep 26, 2016
  4. Merge branch 'jt/fetch-pack-in-vain-count-with-stateless' into next

    When "git fetch" tries to find where the history of the repository
    it runs inhas diverged from what the other side has, it has a
    mechanism to avoid digging too deep into irrelevant side branches.
    This however did not work well over the "smart-http" transport due
    to a design bug, which has been fixed.
    
    * jt/fetch-pack-in-vain-count-with-stateless:
      fetch-pack: do not reset in_vain on non-novel acks
    gitster committed Sep 26, 2016
  5. Merge branch 'jt/mailinfo-fold-in-body-headers' into next

    When "git format-patch --stdout" output is placed as an in-body
    header and it uses the RFC2822 header folding, "git am" failed to
    put the header line back into a single logical line.  The
    underlying "git mailinfo" was taught to handle this properly.
    
    * jt/mailinfo-fold-in-body-headers:
      mailinfo: handle in-body header continuations
      mailinfo: make is_scissors_line take plain char *
      mailinfo: separate in-body header processing
    gitster committed Sep 26, 2016
  6. Fifth batch for 2.11

    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    gitster committed Sep 26, 2016
  7. Merge branch 'jk/clone-recursive-progress'

    "git clone --recurse-submodules" lost the progress eye-candy in
    recent update, which has been corrected.
    
    * jk/clone-recursive-progress:
      clone: pass --progress decision to recursive submodules
    gitster committed Sep 26, 2016
  8. Merge branch 'jk/doc-cvs-update'

    Documentation around tools to import from CVS was fairly outdated.
    
    * jk/doc-cvs-update:
      docs/cvs-migration: mention cvsimport caveats
      docs/cvs-migration: update link to cvsps homepage
      docs/cvsimport: prefer cvs-fast-export to parsecvs
    gitster committed Sep 26, 2016
  9. Merge branch 'rt/rebase-i-broken-insn-advise'

    When "git rebase -i" is given a broken instruction, it told the
    user to fix it with "--edit-todo", but didn't say what the step
    after that was (i.e. "--continue").
    
    * rt/rebase-i-broken-insn-advise:
      rebase -i: improve advice on bad instruction lines
    gitster committed Sep 26, 2016
  10. Merge branch 'rs/checkout-init-macro'

    Code cleanup.
    
    * rs/checkout-init-macro:
      introduce CHECKOUT_INIT
    gitster committed Sep 26, 2016
  11. Merge branch 'ls/travis-homebrew-path-fix'

    The procedure to build Git on Mac OS X for Travis CI hardcoded the
    internal directory structure we assumed HomeBrew uses, which was a
    no-no.  The procedure has been updated to ask HomeBrew things we
    need to know to fix this.
    
    * ls/travis-homebrew-path-fix:
      travis-ci: ask homebrew for its path instead of hardcoding it
    gitster committed Sep 26, 2016
  12. Merge branch 'tg/add-chmod+x-fix'

    "git add --chmod=+x <pathspec>" added recently only toggled the
    executable bit for paths that are either new or modified. This has
    been corrected to flip the executable bit for all paths that match
    the given pathspec.
    
    * tg/add-chmod+x-fix:
      t3700-add: do not check working tree file mode without POSIXPERM
      t3700-add: create subdirectory gently
      add: modify already added files when --chmod is given
      read-cache: introduce chmod_index_entry
      update-index: add test for chmod flags
    gitster committed Sep 26, 2016
  13. Merge branch 'js/regexec-buf'

    Some codepaths in "git diff" used regexec(3) on a buffer that was
    mmap(2)ed, which may not have a terminating NUL, leading to a read
    beyond the end of the mapped region.  This was fixed by introducing
    a regexec_buf() helper that takes a <ptr,len> pair with REG_STARTEND
    extension.
    
    * js/regexec-buf:
      regex: use regexec_buf()
      regex: add regexec_buf() that can work on a non NUL-terminated string
      regex: -G<pattern> feeds a non NUL-terminated string to regexec() and fails
    gitster committed Sep 26, 2016
  14. Merge branch 'nd/checkout-disambiguation'

    "git checkout <word>" does not follow the usual disambiguation
    rules when the <word> can be both a rev and a path, to allow
    checking out a branch 'foo' in a project that happens to have a
    file 'foo' in the working tree without having to disambiguate.
    This was poorly documented and the check was incorrect when the
    command was run from a subdirectory.
    
    * nd/checkout-disambiguation:
      checkout: fix ambiguity check in subdir
      checkout.txt: document a common case that ignores ambiguation rules
      checkout: add some spaces between code and comment
    gitster committed Sep 26, 2016
  15. Merge branch 'va/i18n-more'

    Even more i18n.
    
    * va/i18n-more:
      i18n: stash: mark messages for translation
      i18n: notes-merge: mark die messages for translation
      i18n: ident: mark hint for translation
      i18n: i18n: diff: mark die messages for translation
      i18n: connect: mark die messages for translation
      i18n: commit: mark message for translation
    gitster committed Sep 26, 2016
  16. Merge branch 'jt/format-patch-rfc'

    In some projects, it is common to use "[RFC PATCH]" as the subject
    prefix for a patch meant for discussion rather than application.  A
    new option "--rfc" was a short-hand for "--subject-prefix=RFC PATCH"
    to help the participants of such projects.
    
    * jt/format-patch-rfc:
      format-patch: add "--rfc" for the common case of [RFC PATCH]
    gitster committed Sep 26, 2016
  17. Merge branch 'ep/doc-check-ref-format-example'

    A shell script example in check-ref-format documentation has been
    fixed.
    
    * ep/doc-check-ref-format-example:
      git-check-ref-format.txt: fixup documentation
    gitster committed Sep 26, 2016
  18. Merge branch 'mh/diff-indent-heuristic'

    Output from "git diff" can be made easier to read by selecting
    which lines are common and which lines are added/deleted
    intelligently when the lines before and after the changed section
    are the same.  A command line option is added to help with the
    experiment to find a good heuristics.
    
    * mh/diff-indent-heuristic:
      blame: honor the diff heuristic options and config
      parse-options: add parse_opt_unknown_cb()
      diff: improve positioning of add/delete blocks in diffs
      xdl_change_compact(): introduce the concept of a change group
      recs_match(): take two xrecord_t pointers as arguments
      is_blank_line(): take a single xrecord_t as argument
      xdl_change_compact(): only use heuristic if group can't be matched
      xdl_change_compact(): fix compaction heuristic to adjust ixo
    gitster committed Sep 26, 2016
  19. Merge branch 'rs/c-auto-resets-attributes'

    The pretty-format specifier "%C(auto)" used by the "log" family of
    commands to enable coloring of the output is taught to also issue a
    color-reset sequence to the output.
    
    * rs/c-auto-resets-attributes:
      pretty: let %C(auto) reset all attributes
    gitster committed Sep 26, 2016
  20. Merge branch 'mm/config-color-ui-default-to-auto'

    Documentation for individual configuration variables to control use
    of color (like `color.grep`) said that their default value is
    'false', instead of saying their default is taken from `color.ui`.
    When we updated the default value for color.ui from 'false' to
    'auto' quite a while ago, all of them broke.  This has been
    corrected.
    
    * mm/config-color-ui-default-to-auto:
      Documentation/config: default for color.* is color.ui
    gitster committed Sep 26, 2016
  21. Merge branch 'rs/cocci'

    Code cleanup.
    
    * rs/cocci:
      use strbuf_addstr() for adding constant strings to a strbuf, part 2
      add coccicheck make target
      contrib/coccinelle: fix semantic patch for oid_to_hex_r()
    gitster committed Sep 26, 2016
  22. unpack_sha1_header(): detect malformed object header

    When opening a loose object file, we often do this sequence:
    
     - prepare a short buffer for the object header (on stack)
    
     - call unpack_sha1_header() and have early part of the object data
       inflated, enough to fill the buffer
    
     - parse that data in the short buffer, assuming that the first part
       of the object is <typename> SP <length> NUL
    
    Because the parsing function parse_sha1_header_extended() is not
    given the number of bytes inflated into the header buffer, it you
    craft a file whose early part inflates a garbage sequence without SP
    or NUL, and replace a loose object with it, it will end up reading
    past the end of the inflated data.
    
    To correct this, do the following four things:
    
     - rename unpack_sha1_header() to unpack_sha1_short_header() and
       have unpack_sha1_header_to_strbuf() keep calling that as its
       helper function.  This will detect and report zlib errors, but is
       not aware of the format of a loose object (as before).
    
     - introduce unpack_sha1_header() that calls the same helper
       function, and when zlib reports it inflated OK into the buffer,
       check if the inflated data has NUL.  This would ensure that
       parsing function will terminate within the buffer that holds the
       inflated header.
    
     - update unpack_sha1_header_to_strbuf() to check if the resulting
       buffer has NUL for the same effect.
    
     - update parse_sha1_header_extended() to make sure that its loop to
       find the SP that terminates the <typename> stops at NUL.
    
    Essentially, this makes unpack_*() functions that are asked to
    unpack a loose object header to be a bit more strict and detect an
    input that cannot possibly be a valid object header, even before the
    parsing function kicks in.
    
    Reported-by: Gustavo Grieco <gustavo.grieco@imag.fr>
    Helped-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    gitster committed Sep 26, 2016
  23. streaming: make sure to notice corrupt object

    The streaming read interface from a loose object called
    parse_sha1_header() but discarded its return value, without noticing
    a potential error.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    gitster committed Sep 26, 2016
  24. Merge branch 'va/i18n' of ../git-gui into va/git-gui-i18n

    * 'va/i18n' of ../git-gui:
      git-gui: l10n: add Portuguese translation
      git-gui i18n: mark strings for translation
    gitster committed Sep 26, 2016
  25. git-gui: l10n: add Portuguese translation

    Add Portuguese glossary.
    
    Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    vascool committed with gitster May 6, 2016