Commits on Jul 22, 2016
  1. @gitster

    Merge branch 'rs/use-strbuf-addbuf' into next

    * rs/use-strbuf-addbuf:
      strbuf: avoid calling strbuf_grow() twice in strbuf_addbuf()
    gitster committed Jul 22, 2016
  2. @gitster

    Merge branch 'ew/daemon-socket-keepalive' into next

    Portability fix.
    * ew/daemon-socket-keepalive:
      Windows: add missing definition of ENOTSOCK
    gitster committed Jul 22, 2016
  3. @j6t @gitster

    Windows: add missing definition of ENOTSOCK

    The previous commit introduced the first use of ENOTSOCK. This macro is
    not available on Windows. Define it as WSAENOTSOCK because that is the
    corresponding error value reported by the Windows versions of socket
    Signed-off-by: Johannes Sixt <>
    Signed-off-by: Junio C Hamano <>
    j6t committed with gitster Jul 21, 2016
  4. @gitster

    strbuf: avoid calling strbuf_grow() twice in strbuf_addbuf()

    Implement strbuf_addbuf() as a normal function in order to avoid calling
    strbuf_grow() twice, with the second callinside strbud_add() being a
    no-op.  This is slightly faster and also reduces the text size a bit.
    Signed-off-by: Rene Scharfe <>
    Signed-off-by: Junio C Hamano <>
    René Scharfe committed with gitster Jul 21, 2016
Commits on Jul 20, 2016
  1. @gitster

    Merge branch 'jk/push-scrub-url' into next

    * jk/push-scrub-url:
      t5541: fix url scrubbing test when GPG is not set
    gitster committed Jul 20, 2016
  2. @peff @gitster

    t5541: fix url scrubbing test when GPG is not set

    When the GPG prereq is not set, we do not run test 34. That
    test changes the directory of the test script as a side
    effect (something we usually frown on, but which matches the
    style of the rest of this script). When test 35 (the
    url-scrubbing test) runs, it expects to be in the directory
    from test 34. If it's not, the test fails; we are in a
    different sub-repo, our test-commit is built on a different
    history, and the push becomes a non-fast-forward.
    We can fix this by unconditionally moving to the directory
    we expect (again, against our usual style but matching how
    the rest of the script operates).
    As an additional protection, let's also switch from "make a
    new commit and push to master" to just "push to a new
    branch". We don't care about the branch name; we just want
    _some_ ref update to trigger the status output. Pushing to a
    new branch is less likely to run into problems with
    force-updates, changing the checked-out branch, etc.
    Signed-off-by: Jeff King <>
    Signed-off-by: Junio C Hamano <>
    peff committed with gitster Jul 20, 2016
Commits on Jul 19, 2016
  1. @gitster

    Sync with master

    gitster committed Jul 19, 2016
  2. @gitster

    Merge branch 'rs/submodule-config-code-cleanup' into next

    Code cleanup.
    * rs/submodule-config-code-cleanup:
      submodule-config: use explicit empty string instead of strbuf in config_from()
    gitster committed Jul 19, 2016
  3. @gitster

    Merge branch 'rs/use-strbuf-addbuf' into next

    Code cleanup.
    * rs/use-strbuf-addbuf:
      use strbuf_addbuf() for appending a strbuf to another
    gitster committed Jul 19, 2016
  4. @gitster

    Merge branch 'ew/daemon-socket-keepalive' into next

    Recent update to "git daemon" tries to enable the socket-level
    KEEPALIVE, but when it is spawned via inetd, the standard input
    file descriptor may not necessarily be connected to a socket.
    Suppress an ENOTSOCK error from setsockopt().
    * ew/daemon-socket-keepalive:
      daemon: ignore ENOTSOCK from setsockopt
    gitster committed Jul 19, 2016
  5. @gitster

    Merge branch 'ew/autoconf-pthread' into next

    Existing autoconf generated test for the need to link with pthread
    library did not check all the functions from pthread libraries;
    recent FreeBSD has some functions in libc but not others, and we
    mistakenly thought linking with libc is enough when it is not.
    * ew/autoconf-pthread: stronger test for pthread linkage
    gitster committed Jul 19, 2016
  6. @gitster

    Merge branch 'mh/blame-worktree' into next

    "git blame file" allowed the lineage of lines in the uncommitted,
    unadded contents of "file" to be inspected, but it refused when
    "file" did not appear in the current commit.  When "file" was
    created by renaming an existing file (but the change has not been
    committed), this restriction was unnecessarily tight.
    * mh/blame-worktree:
      t/ Use here documents
      blame: allow to blame paths freshly added to the index
    gitster committed Jul 19, 2016
  7. @gitster

    Merge branch 'sb/push-options' into next

    "git push" learned to accept and pass extra options to the
    receiving end so that hooks can read and react to them.
    * sb/push-options:
      add a test for push options
      push: accept push options
      receive-pack: implement advertising and receiving push options
      push options: {pre,post}-receive hook learns about push options
    gitster committed Jul 19, 2016
  8. @gitster

    Merge branch 'js/fsck-name-object' into next

    When "git fsck" reports a broken link (e.g. a tree object contains
    a blob that does not exist), both containing object and the object
    that is referred to were reported with their 40-hex object names.
    The command learned the "--name-objects" option to show the path to
    the containing object from existing refs (e.g. "HEAD~24^2:file.txt").
    * js/fsck-name-object:
      fsck: optionally show more helpful info for broken links
      fsck: give the error function a chance to see the fsck_options
      fsck_walk(): optionally name objects on the go
      fsck: refactor how to describe objects
    gitster committed Jul 19, 2016
  9. @gitster

    Merge branch 'nd/cache-tree-ita' into next

    "git add -N dir/file && git write-tree" produced an incorrect tree
    when there are other paths in the same directory that sorts after
    * nd/cache-tree-ita:
      cache-tree: do not generate empty trees as a result of all i-t-a subentries
      cache-tree.c: fix i-t-a entry skipping directory updates sometimes introduce and use $EMPTY_BLOB introduce and use $EMPTY_TREE
    gitster committed Jul 19, 2016
  10. @gitster

    Merge branch 'jk/push-scrub-url' into next

    "git fetch http://user:pass@host/repo..." scrubbed the userinfo
    part, but "git push" didn't.
    * jk/push-scrub-url:
      push: anonymize URL in status output
    gitster committed Jul 19, 2016
  11. @gitster

    Merge branch 'nd/test-helpers' into next

    Build clean-up.
    * nd/test-helpers:
      t/ fix running tests with --valgrind
      Makefile: use VCSSVN_LIB to refer to svn library
      Makefile: drop extra dependencies for test helpers
    gitster committed Jul 19, 2016
  12. @gitster

    Merge branch 'jc/doc-diff-filter-exclude' into next

    Belated doc update for a feature added in v1.8.5.
    * jc/doc-diff-filter-exclude:
      diff: document diff-filter exclusion
    gitster committed Jul 19, 2016
  13. @gitster

    Sixth batch of topics for 2.10

    Signed-off-by: Junio C Hamano <>
    gitster committed Jul 19, 2016
  14. @gitster

    Merge branch 'ls/p4-tmp-refs'

    "git p4" used a location outside $GIT_DIR/refs/ to place its
    temporary branches, which has been moved to refs/git-p4-tmp/.
    * ls/p4-tmp-refs:
      git-p4: place temporary refs used for branch import under refs/git-p4-tmp
    gitster committed Jul 19, 2016
  15. @gitster

    Merge branch 'js/am-call-theirs-theirs-in-fallback-3way'

    One part of "git am" had an oddball helper function that called
    stuff from outside "his" as opposed to calling what we have "ours",
    which was not gender-neutral and also inconsistent with the rest of
    the system where outside stuff is usuall called "theirs" in
    contrast to "ours".
    * js/am-call-theirs-theirs-in-fallback-3way:
      am: counteract gender bias
    gitster committed Jul 19, 2016
  16. @gitster

    Merge branch 'jk/write-file'

    General code clean-up around a helper function to write a
    single-liner to a file.
    * jk/write-file:
      branch: use write_file_buf instead of write_file
      use write_file_buf where applicable
      write_file: add format attribute
      write_file: add pointer+len variant
      write_file: use xopen
      write_file: drop "gently" form
      branch: use non-gentle write_file for branch description
      am: ignore return value of write_file()
      config: fix bogus fd check when setting up default config
    gitster committed Jul 19, 2016
  17. @gitster

    Merge branch 'jk/printf-format'

    Code clean-up to avoid using a variable string that compilers may
    feel untrustable as printf-style format given to write_file()
    helper function.
    * jk/printf-format:
      commit.c: remove print_commit_list()
      avoid using sha1_to_hex output as printf format
      walker: let walker_say take arbitrary formats
    gitster committed Jul 19, 2016
  18. @gitster

    Merge branch 'rs/help-c-source-with-gitattributes'

    The .c/.h sources are marked as such in our .gitattributes file so
    that "git diff -W" and friends would work better.
    * rs/help-c-source-with-gitattributes:
      .gitattributes: set file type for C files
    gitster committed Jul 19, 2016
  19. @gitster

    Merge branch 'nd/fetch-ref-summary'

    Improve the look of the way "git fetch" reports what happened to
    each ref that was fetched.
    * nd/fetch-ref-summary:
      fetch: reduce duplicate in ref update status lines with placeholder
      fetch: align all "remote -> local" output
      fetch: change flag code for displaying tag update and deleted ref
      fetch: refactor ref update status formatting code
      git-fetch.txt: document fetch output
    gitster committed Jul 19, 2016
  20. @gitster

    Merge branch 'jk/test-match-signal'

    The test framework learned a new helper test_match_signal to
    check an exit code from getting killed by an expected signal.
    * jk/test-match-signal:
      t/lib-git-daemon: use test_match_signal
      test_must_fail: use test_match_signal
      t0005: use test_match_signal as appropriate
      tests: factor portable signal check out of t0005
    gitster committed Jul 19, 2016
  21. @gitster

    Merge branch 'jk/common-main'

    There are certain house-keeping tasks that need to be performed at
    the very beginning of any Git program, and programs that are not
    built-in commands had to do them exactly the same way as "git"
    potty does.  It was easy to make mistakes in one-off standalone
    programs (like test helpers).  A common "main()" function that
    calls cmd_main() of individual program has been introduced to
    make it harder to make mistakes.
    * jk/common-main:
      mingw: declare main()'s argv as const
      common-main: call git_setup_gettext()
      common-main: call restore_sigpipe_to_default()
      common-main: call sanitize_stdfds()
      common-main: call git_extract_argv0_path()
      add an extra level of indirection to main()
    gitster committed Jul 19, 2016
  22. @gitster

    Merge branch 'ak/lazy-prereq-mktemp'

    A test that unconditionally used "mktemp" learned that the command
    is not necessarily available everywhere.
    * ak/lazy-prereq-mktemp:
      t7610: test for mktemp before test execution
    gitster committed Jul 19, 2016
  23. @gitster

    Merge branch 'nd/icase'

    "git grep -i" has been taught to fold case in non-ascii locales
    * nd/icase:
      grep.c: reuse "icase" variable
      diffcore-pickaxe: support case insensitive match on non-ascii
      diffcore-pickaxe: Add regcomp_or_die()
      grep/pcre: support utf-8
      gettext: add is_utf8_locale()
      grep/pcre: prepare locale-dependent tables for icase matching
      grep: rewrite an if/else condition to avoid duplicate expression
      grep/icase: avoid kwsset when -F is specified
      grep/icase: avoid kwsset on literal non-ascii strings
      test-regex: expose full regcomp() to the command line
      test-regex: isolate the bug test code
      grep: break down an "if" stmt in preparation for next changes
    gitster committed Jul 19, 2016
  24. @gitster

    Merge branch 'bc/cocci'

    Conversion from unsigned char sha1[20] to struct object_id
    * bc/cocci:
      diff: convert prep_temp_blob() to struct object_id
      merge-recursive: convert merge_recursive_generic() to object_id
      merge-recursive: convert leaf functions to use struct object_id
      merge-recursive: convert struct merge_file_info to object_id
      merge-recursive: convert struct stage_data to use object_id
      diff: rename struct diff_filespec's sha1_valid member
      diff: convert struct diff_filespec to struct object_id
      coccinelle: apply object_id Coccinelle transformations
      coccinelle: convert hashcpy() with null_sha1 to hashclr()
      contrib/coccinelle: add basic Coccinelle transforms
      hex: add oid_to_hex_r()
    gitster committed Jul 19, 2016
  25. @gitster

    Merge branch 'js/log-to-diffopt-file'

    The commands in the "log/diff" family have had an FILE* pointer in the
    data structure they pass around for a long time, but some codepaths
    used to always write to the standard output.  As a preparatory step
    to make "git format-patch" available to the internal callers, these
    codepaths have been updated to consistently write into that FILE*
    * js/log-to-diffopt-file:
      mingw: fix the shortlog --output=<file> test
      diff: do not color output when --color=auto and --output=<file> is given
      t4211: ensure that log respects --output=<file>
      shortlog: respect the --output=<file> setting
      format-patch: use stdout directly
      format-patch: avoid freopen()
      format-patch: explicitly switch off color when writing to files
      shortlog: support outputting to streams other than stdout
      graph: respect the diffopt.file setting
      line-log: respect diffopt's configured output file stream
      log-tree: respect diffopt's configured output file stream
      log: prepare log/log-tree to reuse the diffopt.close_file attribute
    gitster committed Jul 19, 2016
  26. @gitster

    Merge branch 'sb/submodule-parallel-fetch'

    Fix recently introduced codepaths that are involved in parallel
    submodule operations, which gave up on reading too early, and
    could have wasted CPU while attempting to write under a corner
    case condition.
    * sb/submodule-parallel-fetch:
      hoist out handle_nonblock function for xread and xwrite
      xwrite: poll on non-blocking FDs
      xread: retry after poll on EAGAIN/EWOULDBLOCK
    gitster committed Jul 19, 2016
  27. @gitster

    Merge branch 'lf/recv-sideband-cleanup'

    Code simplification.
    * lf/recv-sideband-cleanup:
      sideband.c: small optimization of strbuf usage
      sideband.c: refactor recv_sideband()
    gitster committed Jul 19, 2016
  28. @gitster

    Merge branch 'dk/blame-move-no-reason-for-1-line-context'

    "git blame -M" missed a single line that was moved within the file.
    * dk/blame-move-no-reason-for-1-line-context:
      blame: require 0 context lines while finding moved lines with -M
    gitster committed Jul 19, 2016
  29. @gitster

    Merge branch 'nd/connect-ssh-command-config'

    A new configuration variable core.sshCommand has been added to
    specify what value for GIT_SSH_COMMAND to use per repository.
    * nd/connect-ssh-command-config:
      connect: read $GIT_SSH_COMMAND from config file
    gitster committed Jul 19, 2016