1. 22 9月, 2015 3 次提交
  2. 18 9月, 2015 5 次提交
  3. 10 9月, 2015 1 次提交
  4. 05 9月, 2015 11 次提交
  5. 04 9月, 2015 20 次提交
    • 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
    • J
      Merge branch 'ee/clean-test-fixes' into maint · fb8880de
      Junio C Hamano 提交于
      * ee/clean-test-fixes:
        t7300: fix broken && chains
      fb8880de
    • J
      Merge branch 'jk/log-missing-default-HEAD' into maint · 5af77d13
      Junio C Hamano 提交于
      "git init empty && git -C empty log" said "bad default revision 'HEAD'",
      which was found to be a bit confusing to new users.
      
      * jk/log-missing-default-HEAD:
        log: diagnose empty HEAD more clearly
      5af77d13
    • J
      Merge branch 'cc/trailers-corner-case-fix' into maint · 9d939886
      Junio C Hamano 提交于
      The "interpret-trailers" helper mistook a multi-paragraph title of
      a commit log message with a colon in it as the end of the trailer
      block.
      
      * cc/trailers-corner-case-fix:
        trailer: support multiline title
        trailer: retitle a test and correct an in-comment message
        trailer: ignore first line of message
      9d939886
    • J
      Merge branch 'dt/commit-preserve-base-index-upon-opportunistic-cache-tree-update' into maint · 311e5ce2
      Junio C Hamano 提交于
      When re-priming the cache-tree opportunistically while committing
      the in-core index as-is, we mistakenly invalidated the in-core
      index too aggressively, causing the experimental split-index code
      to unnecessarily rewrite the on-disk index file(s).
      
      * dt/commit-preserve-base-index-upon-opportunistic-cache-tree-update:
        commit: don't rewrite shared index unnecessarily
      311e5ce2
    • J
      Merge branch 'rs/archive-zip-many' into maint · 1c820392
      Junio C Hamano 提交于
      "git archive" did not use zip64 extension when creating an archive
      with more than 64k entries, which nobody should need, right ;-)?
      
      * rs/archive-zip-many:
        archive-zip: support more than 65535 entries
        archive-zip: use a local variable to store the creator version
        t5004: test ZIP archives with many entries
      1c820392
    • J
      Merge branch 'jc/calloc-pathspec' into maint · ae6ac848
      Junio C Hamano 提交于
      Minor code cleanup.
      
      * jc/calloc-pathspec:
        ps_matched: xcalloc() takes nmemb and then element size
      ae6ac848
    • J
      Merge branch 'ss/fix-config-fd-leak' into maint · 8136099a
      Junio C Hamano 提交于
      * ss/fix-config-fd-leak:
        config: close config file handle in case of error
      8136099a
    • J
      Merge branch 'sg/wt-status-header-inclusion' into maint · dc4e7b02
      Junio C Hamano 提交于
      * sg/wt-status-header-inclusion:
        wt-status: move #include "pathspec.h" to the header
      dc4e7b02
    • J
      Merge branch 'po/po-readme' into maint · 659227be
      Junio C Hamano 提交于
      Doc updates for i18n.
      
      * po/po-readme:
        po/README: Update directions for l10n contributors
      659227be
    • J
      Merge branch 'sg/t3020-typofix' into maint · 57a2bb1f
      Junio C Hamano 提交于
      * sg/t3020-typofix:
        t3020: fix typo in test description
      57a2bb1f
    • J
      Merge branch 'as/docfix-reflog-expire-unreachable' into maint · c1fa16b1
      Junio C Hamano 提交于
      Docfix.
      
      * as/docfix-reflog-expire-unreachable:
        Documentation/config: fix inconsistent label on gc.*.reflogExpireUnreachable
      c1fa16b1
    • J
      Merge branch 'nd/fixup-linked-gitdir' into maint · d6c196ab
      Junio C Hamano 提交于
      The code in "multiple-worktree" support that attempted to recover
      from an inconsistent state updated an incorrect file.
      
      * nd/fixup-linked-gitdir:
        setup: update the right file in multiple checkouts
      d6c196ab
    • J
      Merge branch 'jk/rev-list-has-no-notes' into maint · e654e3b5
      Junio C Hamano 提交于
      "git rev-list" does not take "--notes" option, but did not complain
      when one is given.
      
      * jk/rev-list-has-no-notes:
        rev-list: make it obvious that we do not support notes
      e654e3b5
    • J
      Merge branch 'jk/fix-alias-pager-config-key-warnings' into maint · fa6d3749
      Junio C Hamano 提交于
      Because the configuration system does not allow "alias.0foo" and
      "pager.0foo" as the configuration key, the user cannot use '0foo'
      as a custom command name anyway, but "git 0foo" tried to look these
      keys up and emitted useless warnings before saying '0foo is not a
      git command'.  These warning messages have been squelched.
      
      * jk/fix-alias-pager-config-key-warnings:
        config: silence warnings for command names with invalid keys
      fa6d3749
    • J
      Merge branch 'nd/dwim-wildcards-as-pathspecs' into maint · 0b2cef28
      Junio C Hamano 提交于
      Test updates for Windows.
      
      * nd/dwim-wildcards-as-pathspecs:
        t2019: skip test requiring '*' in a file name non Windows
      0b2cef28
    • J
      Merge branch 'sg/help-group' into maint · 969560bd
      Junio C Hamano 提交于
      We rewrote one of the build scripts in Perl but this reimplements
      in Bourne shell.
      
      * sg/help-group:
        generate-cmdlist: re-implement as shell script
      969560bd
    • J
      Merge branch 'ps/t1509-chroot-test-fixup' into maint · d11448f6
      Junio C Hamano 提交于
      t1509 test that requires a dedicated VM environment had some
      bitrot, which has been corrected.
      
      * ps/t1509-chroot-test-fixup:
        tests: fix cleanup after tests in t1509-root-worktree
        tests: fix broken && chains in t1509-root-worktree
      d11448f6
    • J
      Merge branch 'jh/strbuf-read-use-read-in-full' into maint · 8b270710
      Junio C Hamano 提交于
      strbuf_read() used to have one extra iteration (and an unnecessary
      strbuf_grow() of 8kB), which was eliminated.
      
      * jh/strbuf-read-use-read-in-full:
        strbuf_read(): skip unnecessary strbuf_grow() at eof
      8b270710
    • J
      Merge branch 'jk/long-error-messages' into maint · 6c0850f2
      Junio C Hamano 提交于
      The codepath to produce error messages had a hard-coded limit to
      the size of the message, primarily to avoid memory allocation while
      calling die().
      
      * jk/long-error-messages:
        vreportf: avoid intermediate buffer
        vreportf: report to arbitrary filehandles
      6c0850f2