1. 06 10月, 2015 2 次提交
  2. 05 9月, 2015 9 次提交
  3. 04 9月, 2015 1 次提交
    • J
      verify_absent: allow filenames longer than PATH_MAX · f514ef97
      Jeff King 提交于
      When unpack-trees wants to know whether a path will
      overwrite anything in the working tree, we use lstat() to
      see if there is anything there. But if we are going to write
      "foo/bar", we can't just lstat("foo/bar"); we need to look
      for leading prefixes (e.g., "foo"). So we use the lstat cache
      to find the length of the leading prefix, and copy the
      filename up to that length into a temporary buffer (since
      the original name is const, we cannot just stick a NUL in
      it).
      
      The copy we make goes into a PATH_MAX-sized buffer, which
      will overflow if the prefix is longer than PATH_MAX. How
      this happens is a little tricky, since in theory PATH_MAX is
      the biggest path we will have read from the filesystem. But
      this can happen if:
      
        - the compiled-in PATH_MAX does not accurately reflect
          what the filesystem is capable of
      
        - the leading prefix is not _quite_ what is on disk; it
          contains the next element from the name we are checking.
          So if we want to write "aaa/bbb/ccc/ddd" and "aaa/bbb"
          exists, the prefix of interest is "aaa/bbb/ccc". If
          "aaa/bbb" approaches PATH_MAX, then "ccc" can overflow
          it.
      
      So this can be triggered, but it's hard to do. In
      particular, you cannot just "git clone" a bogus repo. The
      verify_absent checks happen before unpack-trees writes
      anything to the filesystem, so there are never any leading
      prefixes during the initial checkout, and the bug doesn't
      trigger. And by definition, these files are larger than
      PATH_MAX, so writing them will fail, and clone will
      complain (though it may write a partial path, which will
      cause a subsequent "git checkout" to hit the bug).
      
      We can fix it by creating the temporary path on the heap.
      The extra malloc overhead is not important, as we are
      already making at least one stat() call (and probably more
      for the prefix discovery).
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      f514ef97
  4. 04 8月, 2015 7 次提交
  5. 28 7月, 2015 15 次提交
    • J
      Git 2.4.7 · ca00f80b
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      ca00f80b
    • J
      Merge branch 'jk/pretty-encoding-doc' into maint · caac7a3a
      Junio C Hamano 提交于
      Doc update.
      
      * jk/pretty-encoding-doc:
        docs: clarify that --encoding can produce invalid sequences
      caac7a3a
    • J
      Merge branch 'tb/checkout-doc' into maint · ff132a19
      Junio C Hamano 提交于
      Doc update.
      
      * tb/checkout-doc:
        git-checkout.txt: document "git checkout <pathspec>" better
      ff132a19
    • J
      Merge branch 'ls/hint-rev-list-count' into maint · 3afcec90
      Junio C Hamano 提交于
      * ls/hint-rev-list-count:
        rev-list: add --count to usage guide
      3afcec90
    • J
      Merge branch 'mm/branch-doc-updates' into maint · 315b3ba3
      Junio C Hamano 提交于
      * mm/branch-doc-updates:
        Documentation/branch: document -M and -D in terms of --force
        Documentation/branch: document -d --force and -m --force
      315b3ba3
    • J
      Merge branch 'jc/fsck-retire-require-eoh' into maint · bde6a72a
      Junio C Hamano 提交于
      A fix to a minor regression to "git fsck" in v2.2 era that started
      complaining about a body-less tag object when it lacks a separator
      empty line after its header to separate it with a non-existent body.
      
      * jc/fsck-retire-require-eoh:
        fsck: it is OK for a tag and a commit to lack the body
      bde6a72a
    • J
      Merge branch 'et/http-proxyauth' into maint · c1859365
      Junio C Hamano 提交于
      We used to ask libCURL to use the most secure authentication method
      available when talking to an HTTP proxy only when we were told to
      talk to one via configuration variables.  We now ask libCURL to
      always use the most secure authentication method, because the user
      can tell libCURL to use an HTTP proxy via an environment variable
      without using configuration variables.
      
      * et/http-proxyauth:
        http: always use any proxy auth method available
      c1859365
    • J
      Merge branch 'jc/unexport-git-pager-in-use-in-pager' into maint · 342c14db
      Junio C Hamano 提交于
      When you say "!<ENTER>" while running say "git log", you'd confuse
      yourself in the resulting shell, that may look as if you took
      control back to the original shell you spawned "git log" from but
      that isn't what is happening.  To that new shell, we leaked
      GIT_PAGER_IN_USE environment variable that was meant as a local
      communication between the original "Git" and subprocesses that was
      spawned by it after we launched the pager, which caused many
      "interesting" things to happen, e.g. "git diff | cat" still paints
      its output in color by default.
      
      Stop leaking that environment variable to the pager's half of the
      fork; we only need it on "Git" side when we spawn the pager.
      
      * jc/unexport-git-pager-in-use-in-pager:
        pager: do not leak "GIT_PAGER_IN_USE" to the pager
      342c14db
    • J
      Merge branch 'mh/strbuf-read-file-returns-ssize-t' into maint · 3b175fb9
      Junio C Hamano 提交于
      Avoid possible ssize_t to int truncation.
      
      * mh/strbuf-read-file-returns-ssize-t:
        strbuf: strbuf_read_file() should return ssize_t
      3b175fb9
    • J
      Merge branch 'kb/config-unmap-before-renaming' into maint · 6f402a93
      Junio C Hamano 提交于
      "git config" failed to update the configuration file when the
      underlying filesystem is incapable of renaming a file that is still
      open.
      
      * kb/config-unmap-before-renaming:
        config.c: fix writing config files on Windows network shares
      6f402a93
    • J
      Merge branch 'jk/rev-list-no-bitmap-while-pruning' into maint · 726359be
      Junio C Hamano 提交于
      A minor bugfix when pack bitmap is used with "rev-list --count".
      
      * jk/rev-list-no-bitmap-while-pruning:
        rev-list: disable --use-bitmap-index when pruning commits
      726359be
    • J
      Merge branch 'rh/test-color-avoid-terminfo-in-original-home' into maint · aa0b816c
      Junio C Hamano 提交于
      An ancient test framework enhancement to allow color was not
      entirely correct; this makes it work even when tput needs to read
      from the ~/.terminfo under the user's real HOME directory.
      
      * rh/test-color-avoid-terminfo-in-original-home:
        test-lib.sh: fix color support when tput needs ~/.terminfo
        Revert "test-lib.sh: do tests for color support after changing HOME"
      aa0b816c
    • J
      Merge branch 'jk/fix-refresh-utime' into maint · 7c696007
      Junio C Hamano 提交于
      Fix a small bug in our use of umask() return value.
      
      * jk/fix-refresh-utime:
        check_and_freshen_file: fix reversed success-check
      7c696007
    • J
      Merge branch 'cb/rebase-am-exit-code' into maint · 3f8b439a
      Junio C Hamano 提交于
      "git rebase" did not exit with failure when format-patch it invoked
      failed for whatever reason.
      
      * cb/rebase-am-exit-code:
        rebase: return non-zero error code if format-patch fails
      3f8b439a
    • J
      Merge branch 'jk/index-pack-reduce-recheck' into maint · de62fe8c
      Junio C Hamano 提交于
      Disable "have we lost a race with competing repack?" check while
      receiving a huge object transfer that runs index-pack.
      
      * jk/index-pack-reduce-recheck:
        index-pack: avoid excessive re-reading of pack directory
      de62fe8c
  6. 16 7月, 2015 6 次提交