1. 12 10月, 2016 4 次提交
  2. 04 10月, 2016 5 次提交
    • J
      Git 2.10.1 · 6406bdc0
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      6406bdc0
    • J
      Merge branch 'jk/ident-ai-canonname-could-be-null' into maint · 11738ddf
      Junio C Hamano 提交于
      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
      11738ddf
    • J
      Merge branch 'jk/doc-cvs-update' into maint · 3d0049ea
      Junio C Hamano 提交于
      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
      3d0049ea
    • J
      Merge branch 'jk/pack-tag-of-tag' into maint · f4315eed
      Junio C Hamano 提交于
      "git pack-objects --include-tag" was taught that when we know that
      we are sending an object C, we want a tag B that directly points at
      C but also a tag A that points at the tag B.  We used to miss the
      intermediate tag B in some cases.
      
      * jk/pack-tag-of-tag:
        pack-objects: walk tag chains for --include-tag
        t5305: simplify packname handling
        t5305: use "git -C"
        t5305: drop "dry-run" of unpack-objects
        t5305: move cleanup into test block
      f4315eed
    • S
      ref-filter: strip format option after a field name only once while parsing · e94ce139
      SZEDER Gábor 提交于
      When parse_ref_filter_atom() iterates over a list of valid atoms to
      check that a field name is one of them, it has to strip the optional
      colon-separated format option suffix that might follow the field name.
      However, it does so inside the loop, i.e. it performs the exact same
      stripping over and over again.
      
      Move stripping the format option suffix out of that loop, so it's only
      performed once for each parsed field name.
      Signed-off-by: NSZEDER Gábor <szeder@ira.uka.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e94ce139
  3. 30 9月, 2016 25 次提交
    • J
      Prepare for 2.10.1 · 92d42666
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      92d42666
    • J
      Merge branch 'tg/add-chmod+x-fix' into maint · 36f64036
      Junio C Hamano 提交于
      "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
      36f64036
    • J
      Merge branch 'et/add-chmod-x' into maint · bf3a55a2
      Junio C Hamano 提交于
      "git add --chmod=+x" added recently lacked documentation, which has
      been corrected.
      
      * et/add-chmod-x:
        add: document the chmod option
      bf3a55a2
    • J
      Merge branch 'rt/rebase-i-broken-insn-advise' into maint · cec5f0bf
      Junio C Hamano 提交于
      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
      cec5f0bf
    • J
      Merge branch 'ls/travis-homebrew-path-fix' into maint · d2a4131e
      Junio C Hamano 提交于
      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
      d2a4131e
    • J
      Merge branch 'js/regexec-buf' into maint · 300e95f7
      Junio C Hamano 提交于
      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
      300e95f7
    • J
      Merge branch 'nd/checkout-disambiguation' into maint · d336b675
      Junio C Hamano 提交于
      "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
      d336b675
    • J
      Merge branch 'ep/doc-check-ref-format-example' into maint · 71065841
      Junio C Hamano 提交于
      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
      71065841
    • J
      Merge branch 'mm/config-color-ui-default-to-auto' into maint · a74a3b7a
      Junio C Hamano 提交于
      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
      a74a3b7a
    • J
      Merge branch 'jk/reduce-gc-aggressive-depth' into maint · eb293ac8
      Junio C Hamano 提交于
      "git gc --aggressive" used to limit the delta-chain length to 250,
      which is way too deep for gaining additional space savings and is
      detrimental for runtime performance.  The limit has been reduced to
      50.
      
      * jk/reduce-gc-aggressive-depth:
        gc: default aggressive depth to 50
      eb293ac8
    • J
      Merge branch 'jk/rebase-i-drop-ident-check' into maint · e25e6f39
      Junio C Hamano 提交于
      Even when "git pull --rebase=preserve" (and the underlying "git
      rebase --preserve") can complete without creating any new commit
      (i.e. fast-forwards), it still insisted on having a usable ident
      information (read: user.email is set correctly), which was less
      than nice.  As the underlying commands used inside "git rebase"
      would fail with a more meaningful error message and advice text
      when the bogus ident matters, this extra check was removed.
      
      * jk/rebase-i-drop-ident-check:
        rebase-interactive: drop early check for valid ident
      e25e6f39
    • J
      Merge branch 'jt/format-patch-base-info-above-sig' into maint · 7b7e977b
      Junio C Hamano 提交于
      "git format-patch --base=..." feature that was recently added
      showed the base commit information after "-- " e-mail signature
      line, which turned out to be inconvenient.  The base information
      has been moved above the signature line.
      
      * jt/format-patch-base-info-above-sig:
        format-patch: show base info before email signature
      7b7e977b
    • J
      Merge branch 'ks/perf-build-with-autoconf' into maint · 08d0f7a5
      Junio C Hamano 提交于
      Performance tests done via "t/perf" did not use the same set of
      build configuration if the user relied on autoconf generated
      configuration.
      
      * ks/perf-build-with-autoconf:
        t/perf/run: copy config.mak.autogen & friends to build area
      08d0f7a5
    • J
      Merge branch 'rs/xdiff-merge-overlapping-hunks-for-W-context' into maint · ef4f0cad
      Junio C Hamano 提交于
      "git diff -W" output needs to extend the context backward to
      include the header line of the current function and also forward to
      include the body of the entire current function up to the header
      line of the next one.  This process may have to merge to adjacent
      hunks, but the code forgot to do so in some cases.
      
      * rs/xdiff-merge-overlapping-hunks-for-W-context:
        xdiff: fix merging of hunks with -W context and -u context
      ef4f0cad
    • J
      Merge branch 'ew/http-do-not-forget-to-call-curl-multi-remove-handle' into maint · e007a094
      Junio C Hamano 提交于
      The http transport (with curl-multi option, which is the default
      these days) failed to remove curl-easy handle from a curlm session,
      which led to unnecessary API failures.
      
      * ew/http-do-not-forget-to-call-curl-multi-remove-handle:
        http: always remove curl easy from curlm session on release
        http: consolidate #ifdefs for curl_multi_remove_handle
        http: warn on curl_multi_add_handle failures
      e007a094
    • J
      Merge branch 'jk/patch-ids-no-merges' into maint · 35ca3e53
      Junio C Hamano 提交于
      "git log --cherry-pick" used to include merge commits as candidates
      to be matched up with other commits, resulting a lot of wasted time.
      The patch-id generation logic has been updated to ignore merges to
      avoid the wastage.
      
      * jk/patch-ids-no-merges:
        patch-ids: refuse to compute patch-id for merge commit
        patch-ids: turn off rename detection
      35ca3e53
    • J
      Merge branch 'js/git-gui-commit-gpgsign' into maint · d7e74c94
      Junio C Hamano 提交于
      "git commit-tree" stopped reading commit.gpgsign configuration
      variable that was meant for Porcelain "git commit" in Git 2.9; we
      forgot to update "git gui" to look at the configuration to match
      this change.
      
      * js/git-gui-commit-gpgsign:
        git-gui: respect commit.gpgsign again
      d7e74c94
    • J
      Merge branch 'jk/fix-remote-curl-url-wo-proto' into maint · 35ec7fd4
      Junio C Hamano 提交于
      "git fetch http::/site/path" did not die correctly and segfaulted
      instead.
      
      * jk/fix-remote-curl-url-wo-proto:
        remote-curl: handle URLs without protocol
      35ec7fd4
    • J
      Merge branch 'sy/git-gui-i18n-ja' into maint · 81835926
      Junio C Hamano 提交于
      Update Japanese translation for "git-gui".
      
      * sy/git-gui-i18n-ja:
        git-gui: update Japanese information
        git-gui: update Japanese translation
        git-gui: add Japanese language code
        git-gui: apply po template to Japanese translation
        git-gui: consistently use the same word for "blame" in Japanese
        git-gui: consistently use the same word for "remote" in Japanese
      81835926
    • J
      Merge branch 'mr/vcs-svn-printf-ulong' into maint · 73336299
      Junio C Hamano 提交于
      Code cleanup.
      
      * mr/vcs-svn-printf-ulong:
        vcs-svn/fast_export: fix timestamp fmt specifiers
      73336299
    • J
      Merge branch 'rs/unpack-trees-reduce-file-scope-global' into maint · 633212b2
      Junio C Hamano 提交于
      Code cleanup.
      
      * rs/unpack-trees-reduce-file-scope-global:
        unpack-trees: pass checkout state explicitly to check_updates()
      633212b2
    • J
      Merge branch 'rs/strbuf-remove-fix' into maint · b0af4819
      Junio C Hamano 提交于
      Code cleanup.
      
      * rs/strbuf-remove-fix:
        strbuf: use valid pointer in strbuf_remove()
      b0af4819
    • J
      Merge branch 'rs/checkout-some-states-are-const' into maint · 3a3bb365
      Junio C Hamano 提交于
      Code cleanup.
      
      * rs/checkout-some-states-are-const:
        checkout: constify parameters of checkout_stage() and checkout_merged()
      3a3bb365
    • J
      Merge branch 'bw/pathspec-remove-unused-extern-decl' into maint · 9e2c4fa5
      Junio C Hamano 提交于
      Code cleanup.
      
      * bw/pathspec-remove-unused-extern-decl:
        pathspec: remove unnecessary function prototypes
      9e2c4fa5
    • J
      graph: fix extra spaces in graph_padding_line · 16477935
      Jeff King 提交于
      The graph_padding_line() function outputs a series of "|"
      columns, and then pads with spaces to graph->width by
      calling graph_pad_horizontally(). However, we tell the
      latter that we wrote graph->num_columns characters, which is
      not true; we also needed spaces between the columns. Let's
      keep a count of how many characters we've written, which is
      what all the other callers of graph_pad_horizontally() do.
      
      Without this, any output that is written at the end of a
      padding line will be bumped out by at least an extra
      graph->num_columns spaces. Presumably nobody ever noticed
      the bug because there's no code path that actually writes to
      the end of a padding line.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      16477935
  4. 27 9月, 2016 1 次提交
  5. 26 9月, 2016 2 次提交
    • R
      use COPY_ARRAY · 45ccef87
      René Scharfe 提交于
      Add a semantic patch for converting certain calls of memcpy(3) to
      COPY_ARRAY() and apply that transformation to the code base.  The result
      is
       shorter and safer code.  For now only consider calls where source and
      destination have the same type, or in other words: easy cases.
      Signed-off-by: NRene Scharfe <l.s.r@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      45ccef87
    • R
      add COPY_ARRAY · 60566cbb
      René Scharfe 提交于
      Add COPY_ARRAY, a safe and convenient helper for copying arrays,
      complementing ALLOC_ARRAY and REALLOC_ARRAY.  Users just specify source,
      destination and the number of elements; the size of an element is
      inferred automatically.
      
      It checks if the multiplication of size and element count overflows.
      The inferred size is passed first to st_mult, which allows the division
      there to be done at compilation time.
      
      As a basic type safety check it makes sure the sizes of source and
      destination elements are the same.  That's evaluated at compilation time
      as well.
      
      COPY_ARRAY is safe to use with NULL as source pointer iff 0 elements are
      to be copied.  That convention is used in some cases for initializing
      arrays.  Raw memcpy(3) does not support it -- compilers are allowed to
      assume that only valid pointers are passed to it and can optimize away
      NULL checks after such a call.
      Signed-off-by: NRene Scharfe <l.s.r@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      60566cbb
  6. 24 9月, 2016 1 次提交
    • J
      ident: handle NULL ai_canonname · c375a7ef
      Jeff King 提交于
      We call getaddrinfo() to try to convert a short hostname
      into a fully-qualified one (to use it as an email domain).
      If there isn't a canonical name, getaddrinfo() will
      generally return either a NULL addrinfo list, or one in
      which ai->ai_canonname is a copy of the original name.
      
      However, if the result of gethostname() looks like an IP
      address, then getaddrinfo() behaves differently on some
      systems. On OS X, it will return a "struct addrinfo" with a
      NULL ai_canonname, and we segfault feeding it to strchr().
      
      This is hard to test reliably because it involves not only a
      system where we we have to fallback to gethostname() to come
      up with an ident, but also where the hostname is a number
      with no dots. But I was able to replicate the bug by faking
      a hostname, like:
      
          diff --git a/ident.c b/ident.c
          index e20a772..b790d28 100644
          --- a/ident.c
          +++ b/ident.c
          @@ -128,6 +128,7 @@ static void add_domainname(struct strbuf *out, int *is_bogus)
                           *is_bogus = 1;
                           return;
                   }
          +        xsnprintf(buf, sizeof(buf), "1");
                   if (strchr(buf, '.'))
                           strbuf_addstr(out, buf);
                   else if (canonical_name(buf, out) < 0) {
      
      and running "git var GIT_AUTHOR_IDENT" on an OS X system.
      
      Before this patch it segfaults, and after we correctly
      complain of the bogus "user@1.(none)" address (though this
      bogus address would be suitable for non-object uses like
      writing reflogs).
      Reported-by: NJonas Thiel <jonas.lierschied@gmx.de>
      Diagnosed-by: NJohn Keeping <john@keeping.me.uk>
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c375a7ef
  7. 23 9月, 2016 2 次提交