1. 23 12月, 2016 2 次提交
    • A
      mingw: fix colourization on Cygwin pseudo terminals · 86924838
      Alan Davies 提交于
      Git only colours the output and uses pagination if isatty() returns 1.
      MSYS2 and Cygwin emulate pseudo terminals via named pipes, meaning that
      isatty() returns 0.
      
      f7f90e0f (mingw: make isatty() recognize MSYS2's pseudo terminals
      (/dev/pty*), 2016-04-27) fixed this for MSYS2 terminals, but not for
      Cygwin.
      
      The named pipes that Cygwin and MSYS2 use are very similar. MSYS2 PTY pipes
      are called 'msys-*-pty*' and Cygwin uses 'cygwin-*-pty*'. This commit
      modifies the existing check to allow both MSYS2 and Cygwin PTY pipes to be
      identified as TTYs.
      
      Note that pagination is still broken when running Git for Windows from
      within Cygwin, as MSYS2's less.exe is spawned (and does not like to
      interact with Cygwin's PTY).
      
      This partially fixes https://github.com/git-for-windows/git/issues/267Signed-off-by: NAlan Davies <alan.n.davies@gmail.com>
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      86924838
    • J
      mingw: adjust is_console() to work with stdin · fee807c5
      Johannes Schindelin 提交于
      When determining whether a handle corresponds to a *real* Win32 Console
      (as opposed to, say, a character device such as /dev/null), we use the
      GetConsoleOutputBufferInfo() function as a tell-tale.
      
      However, that does not work for *input* handles associated with a
      console. Let's just use the GetConsoleMode() function for input handles,
      and since it does not work on output handles fall back to the previous
      method for those.
      
      This patch prepares for using is_console() instead of my previous
      misguided attempt in cbb3f3c9 (mingw: intercept isatty() to handle
      /dev/null as Git expects it, 2016-12-11) that broke everything on
      Windows.
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      fee807c5
  2. 12 12月, 2016 1 次提交
  3. 06 12月, 2016 2 次提交
  4. 30 11月, 2016 19 次提交
    • J
      Merge branch 'tk/diffcore-delta-remove-unused' into maint · 0a79ccaa
      Junio C Hamano 提交于
      Code cleanup.
      
      * tk/diffcore-delta-remove-unused:
        diffcore-delta: remove unused parameter to diffcore_count_changes()
      0a79ccaa
    • J
      Merge branch 'jk/create-branch-remove-unused-param' into maint · af8d6a98
      Junio C Hamano 提交于
      Code clean-up.
      
      * jk/create-branch-remove-unused-param:
        create_branch: drop unused "head" parameter
      af8d6a98
    • J
      Merge branch 'nd/worktree-lock' into maint · 797d1a46
      Junio C Hamano 提交于
      Typofix.
      
      * nd/worktree-lock:
        git-worktree.txt: fix typo "to"/"two", and add comma
      797d1a46
    • J
      Merge branch 'ps/common-info-doc' into maint · d92466ee
      Junio C Hamano 提交于
      Doc fix.
      
      * ps/common-info-doc:
        doc: fix location of 'info/' with $GIT_COMMON_DIR
      d92466ee
    • J
      Merge branch 'rs/cocci' into maint · e3c4323e
      Junio C Hamano 提交于
      Improve the rule to convert "unsigned char [20]" into "struct
      object_id *" in contrib/coccinelle/
      
      * rs/cocci:
        cocci: avoid self-references in object_id transformations
      e3c4323e
    • J
      Merge branch 'nd/test-helpers' into maint · 91207f37
      Junio C Hamano 提交于
      Update to the test framework made in 2.9 timeframe broke running
      the tests under valgrind, which has been fixed.
      
      * nd/test-helpers:
        valgrind: support test helpers
      91207f37
    • J
      Merge branch 'sc/fmt-merge-msg-doc-markup-fix' into maint · 6afadbd5
      Junio C Hamano 提交于
      Documentation fix.
      
      * sc/fmt-merge-msg-doc-markup-fix:
        Documentation/fmt-merge-msg: fix markup in example
      6afadbd5
    • J
      Merge branch 'rs/commit-pptr-simplify' into maint · c8a3ec37
      Junio C Hamano 提交于
      Code simplification.
      
      * rs/commit-pptr-simplify:
        commit: simplify building parents list
      c8a3ec37
    • J
      Merge branch 'jk/rebase-config-insn-fmt-docfix' into maint · 50b8276a
      Junio C Hamano 提交于
      Documentation fix.
      
      * jk/rebase-config-insn-fmt-docfix:
        doc: fix missing "::" in config list
      50b8276a
    • J
      Merge branch 'ak/pre-receive-hook-template-modefix' into maint · e9f74313
      Junio C Hamano 提交于
      A trivial clean-up to a recently graduated topic.
      
      * ak/pre-receive-hook-template-modefix:
        pre-receive.sample: mark it executable
      e9f74313
    • J
      Merge branch 'ls/macos-update' into maint · 729fb9ad
      Junio C Hamano 提交于
      Portability update and workaround for builds on recent Mac OS X.
      
      * ls/macos-update:
        travis-ci: disable GIT_TEST_HTTPD for macOS
        Makefile: set NO_OPENSSL on macOS by default
      729fb9ad
    • J
      Merge branch 'as/merge-attr-sleep' into maint · 25e298d2
      Junio C Hamano 提交于
      Fix for a racy false-positive test failure.
      
      * as/merge-attr-sleep:
        t6026: clarify the point of "kill $(cat sleep.pid)"
        t6026: ensure that long-running script really is
        Revert "t6026-merge-attr: don't fail if sleep exits early"
        Revert "t6026-merge-attr: ensure that the merge driver was called"
        t6026-merge-attr: ensure that the merge driver was called
        t6026-merge-attr: don't fail if sleep exits early
      25e298d2
    • J
      Merge branch 'ak/sh-setup-dot-source-i18n-fix' into maint · bb6bc68d
      Junio C Hamano 提交于
      Recent update to git-sh-setup (a library of shell functions that
      are used by our in-tree scripted Porcelain commands) included
      another shell library git-sh-i18n without specifying where it is,
      relying on the $PATH.  This has been fixed to be more explicit by
      prefixing $(git --exec-path) output in front.
      
      * ak/sh-setup-dot-source-i18n-fix:
        git-sh-setup: be explicit where to dot-source git-sh-i18n from.
      bb6bc68d
    • J
      Merge branch 'jk/daemon-path-ok-check-truncation' into maint · aa22ef8a
      Junio C Hamano 提交于
      "git daemon" used fixed-length buffers to turn URL to the
      repository the client asked for into the server side directory
      path, using snprintf() to avoid overflowing these buffers, but
      allowed possibly truncated paths to the directory.  This has been
      tightened to reject such a request that causes overlong path to be
      required to serve.
      
      * jk/daemon-path-ok-check-truncation:
        daemon: detect and reject too-long paths
      aa22ef8a
    • J
      Merge branch 'rs/ring-buffer-wraparound' into maint · f2ad912f
      Junio C Hamano 提交于
      The code that we have used for the past 10+ years to cycle
      4-element ring buffers turns out to be not quite portable in
      theoretical world.
      
      * rs/ring-buffer-wraparound:
        hex: make wraparound of the index into ring-buffer explicit
      f2ad912f
    • J
      Merge branch 'mm/send-email-cc-cruft-after-address' into maint · a3f2781d
      Junio C Hamano 提交于
      "git send-email" attempts to pick up valid e-mails from the
      trailers, but people in real world write non-addresses there, like
      "Cc: Stable <add@re.ss> # 4.8+", which broke the output depending
      on the availability and vintage of Mail::Address perl module.
      
      * mm/send-email-cc-cruft-after-address:
        Git.pm: add comment pointing to t9000
        t9000-addresses: update expected results after fix
        parse_mailboxes: accept extra text after <...> address
      a3f2781d
    • J
      Merge branch 'cp/completion-negative-refs' into maint · fa308cd8
      Junio C Hamano 提交于
      The command-line completion script (in contrib/) learned to
      complete "git cmd ^mas<HT>" to complete the negative end of
      reference to "git cmd ^master".
      
      * cp/completion-negative-refs:
        completion: support excluding refs
      fa308cd8
    • J
      Merge branch 'jc/am-read-author-file' into maint · bab32da3
      Junio C Hamano 提交于
      Extract a small helper out of the function that reads the authors
      script file "git am" internally uses.
      This by itself is not useful until a second caller appears in the
      future for "rebase -i" helper.
      
      * jc/am-read-author-file:
        am: refactor read_author_script()
      bab32da3
    • J
      common-main: stop munging argv[0] path · 6854a8f5
      Jeff King 提交于
      Since 650c4492 (common-main: call git_extract_argv0_path(),
      2016-07-01), the argv[0] that is seen in cmd_main() of
      individual programs is always the basename of the
      executable, as common-main strips off the full path. This
      can produce confusing results for git-daemon, which wants to
      re-exec itself.
      
      For instance, if the program was originally run as
      "/usr/lib/git/git-daemon", it will try just re-execing
      "git-daemon", which will find the first instance in $PATH.
      If git's exec-path has not been prepended to $PATH, we may
      find the git-daemon from a different version (or no
      git-daemon at all).
      
      Normally this isn't a problem. Git commands are run as "git
      daemon", the git wrapper puts the exec-path at the front of
      $PATH, and argv[0] is already "daemon" anyway. But running
      git-daemon via its full exec-path, while not really a
      recommended method, did work prior to 650c4492. Let's make
      it work again.
      
      The real goal of 650c4492 was not to munge argv[0], but to
      reliably set the argv0_path global. The only reason it
      munges at all is that one caller, the git.c wrapper,
      piggy-backed on that computation to find the command
      basename.  Instead, let's leave argv[0] untouched in
      common-main, and have git.c do its own basename computation.
      
      While we're at it, let's drop the return value from
      git_extract_argv0_path(). It was only ever used in this one
      callsite, and its dual purposes is what led to this
      confusion in the first place.
      
      Note that by changing the interface, the compiler can
      confirm for us that there are no other callers storing the
      return value. But the compiler can't tell us whether any of
      the cmd_main() functions (besides git.c) were relying on the
      basename munging. However, we can observe that prior to
      650c4492, no other cmd_main() functions did that munging,
      and no new cmd_main() functions have been introduced since
      then. So we can't be regressing any of those cases.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      6854a8f5
  5. 15 11月, 2016 1 次提交
  6. 14 11月, 2016 1 次提交
  7. 12 11月, 2016 2 次提交
    • J
      t6026: clarify the point of "kill $(cat sleep.pid)" · fdf4f6c7
      Johannes Sixt 提交于
      We lengthened the time the leftover process sleeps in the previous
      commit to make sure it will be there while 'git merge' runs and
      finishes.  It therefore needs to be killed before leaving the test.
      And it needs to be killed even when 'git merge' fails, so it has to
      be triggered via test_when_finished mechanism.
      
      Explain all that in a large comment, and move the use site of
      test_when_finished to immediately before 'git merge' invocation,
      where the process is spawned.
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      fdf4f6c7
    • P
      doc: fix location of 'info/' with $GIT_COMMON_DIR · 3285b7ba
      Patrick Steinhardt 提交于
      With the introduction of the $GIT_COMMON_DIR variable, the
      repository layout manual was changed to reflect the location for
      many files in case the variable is set. While adding the new
      locations, one typo snuck in regarding the location of the
      'info/' folder, which is falsely claimed to reside at
      "$GIT_COMMON_DIR/index".
      
      Fix the typo to point to "$GIT_COMMON_DIR/info/" instead.
      Signed-off-by: NPatrick Steinhardt <ps@pks.im>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      3285b7ba
  8. 11 11月, 2016 6 次提交
  9. 10 11月, 2016 1 次提交
    • J
      create_branch: drop unused "head" parameter · 4bd488ea
      Jeff King 提交于
      This function used to have the caller pass in the current
      value of HEAD, in order to make sure we didn't clobber HEAD.
      In 55c4a673, that logic moved to validate_new_branchname(),
      which just resolves HEAD itself. The parameter to
      create_branch is now unused.
      
      Since we have to update and re-wrap the docstring describing
      the parameters anyway, let's take this opportunity to break
      it out into a list, which makes it easier to find the
      parameters.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4bd488ea
  10. 09 11月, 2016 1 次提交
  11. 02 11月, 2016 1 次提交
  12. 31 10月, 2016 3 次提交
    • A
      git-sh-setup: be explicit where to dot-source git-sh-i18n from. · 1073094f
      Anders Kaseorg 提交于
      d323c6b6 ("i18n: git-sh-setup.sh: mark strings for translation",
      2016-06-17) started to dot-source git-sh-i18n shell script library,
      assuming that $PATH is already adjusted for our scripts, namely,
      $GIT_EXEC_PATH is at the beginning of $PATH.
      
      Old contrib scripts like contrib/convert-grafts-to-replace-refs.sh
      and contrib/rerere-train.sh and third-party scripts like guilt may
      however be using this as ". $(git --exec-path)/git-sh-setup",
      without satisfying that assumption.  Be more explicit by specifying
      its path prefixed with "$(git --exec-path)/". to be safe.
      
      While we’re here, move the sourcing of git-sh-i18n below the shell
      portability fixes.
      Signed-off-by: NAnders Kaseorg <andersk@mit.edu>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      1073094f
    • R
      commit: simplify building parents list · de9f7fa3
      René Scharfe 提交于
      Push pptr down into the FROM_MERGE branch of the if/else statement,
      where it's actually used, and call commit_list_append() for appending
      elements instead of playing tricks with commit_list_insert().  Call
      copy_commit_list() in the amend branch instead of open-coding it.  Don't
      bother setting pptr in the final branch as it's not used thereafter.
      Signed-off-by: NRene Scharfe <l.s.r@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      de9f7fa3
    • J
      doc: fix missing "::" in config list · 6d834ac8
      Jeff King 提交于
      The rebase.instructionFormat option is missing its "::" to
      tell AsciiDoc that it's a list entry. As a result, the
      option name gets lumped into the description in one big
      paragraph.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      6d834ac8