1. 13 3月, 2017 7 次提交
    • J
      Merge branch 'vn/line-log-memcpy-size-fix' · 6c621015
      Junio C Hamano 提交于
      The command-line parsing of "git log -L" copied internal data
      structures using incorrect size on ILP32 systems.
      
      * vn/line-log-memcpy-size-fix:
        line-log: use COPY_ARRAY to fix mis-sized memcpy
      6c621015
    • J
      Merge branch 'jk/ewah-use-right-type-in-sizeof' · cb36508a
      Junio C Hamano 提交于
      Code clean-up.
      
      * jk/ewah-use-right-type-in-sizeof:
        ewah: fix eword_t/uint64_t confusion
      cb36508a
    • J
      Merge branch 'ax/line-log-range-merge-fix' · 36d5286f
      Junio C Hamano 提交于
      The code to parse "git log -L..." command line was buggy when there
      are many ranges specified with -L; overrun of the allocated buffer
      has been fixed.
      
      * ax/line-log-range-merge-fix:
        line-log.c: prevent crash during union of too many ranges
      36d5286f
    • J
      Merge branch 'ss/remote-bzr-hg-placeholder-wo-python' · 271513cd
      Junio C Hamano 提交于
      There is no need for Python only to give a few messages to the
      standard error stream, but we somehow did.
      
      * ss/remote-bzr-hg-placeholder-wo-python:
        contrib: git-remote-{bzr,hg} placeholders don't need Python
      271513cd
    • J
      Merge branch 'js/realpath-pathdup-fix' · ba37c92d
      Junio C Hamano 提交于
      Git v2.12 was shipped with an embarrassing breakage where various
      operations that verify paths given from the user stopped dying when
      seeing an issue, and instead later triggering segfault.
      
      * js/realpath-pathdup-fix:
        real_pathdup(): fix callsites that wanted it to die on error
        t1501: demonstrate NULL pointer access with invalid GIT_WORK_TREE
      ba37c92d
    • J
      Merge branch 'jk/add-i-patch-do-prompt' · fb070d2f
      Junio C Hamano 提交于
      The patch subcommand of "git add -i" was meant to have paths
      selection prompt just like other subcommand, unlike "git add -p"
      directly jumps to hunk selection.  Recently, this was broken and
      "add -i" lost the paths selection dialog, but it now has been
      fixed.
      
      * jk/add-i-patch-do-prompt:
        add--interactive: fix missing file prompt for patch mode with "-i"
      fb070d2f
    • J
      Merge branch 'jh/mingw-openssl-sha1' · 033328a5
      Junio C Hamano 提交于
      Windows port wants to use OpenSSL's implementation of SHA-1
      routines, so let them.
      
      * jh/mingw-openssl-sha1:
        mingw: use OpenSSL's SHA-1 routines
      033328a5
  2. 11 3月, 2017 19 次提交
    • J
      Second batch after 2.12 · 625568cd
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      625568cd
    • J
      Merge branch 'rs/log-email-subject' · 0a246106
      Junio C Hamano 提交于
      Code clean-up.
      
      * rs/log-email-subject:
        pretty: use fmt_output_email_subject()
        log-tree: factor out fmt_output_email_subject()
      0a246106
    • J
      Merge branch 'tg/stash-push' · 44c3f09f
      Junio C Hamano 提交于
      "git stash save" takes a pathspec so that the local changes can be
      stashed away only partially.
      
      * tg/stash-push:
        stash: allow pathspecs in the no verb form
        stash: use stash_push for no verb form
        stash: teach 'push' (and 'create_stash') to honor pathspec
        stash: refactor stash_create
        stash: add test for the create command line arguments
        stash: introduce push verb
      44c3f09f
    • J
      Merge branch 'sb/submodule-init-url-selection' · ae900ebd
      Junio C Hamano 提交于
      When "git submodule init" decides that the submodule in the working
      tree is its upstream, it now gives a warning as it is not a very
      common setup.
      
      * sb/submodule-init-url-selection:
        submodule init: warn about falling back to a local path
      ae900ebd
    • J
      Merge branch 'rj/remove-unused-mktemp' · fb907176
      Junio C Hamano 提交于
      Code cleanup.
      
      * rj/remove-unused-mktemp:
        wrapper.c: remove unused gitmkstemps() function
        wrapper.c: remove unused git_mkstemp() function
      fb907176
    • J
      Merge branch 'ew/markdown-url-in-readme' · 5886e754
      Junio C Hamano 提交于
      Doc update.
      
      * ew/markdown-url-in-readme:
        README: create HTTP/HTTPS links from URLs in Markdown
      5886e754
    • J
      Merge branch 'ps/docs-diffcore' · 9664cef1
      Junio C Hamano 提交于
      Doc update.
      
      * ps/docs-diffcore:
        docs/diffcore: unquote "Complete Rewrites" in headers
        docs/diffcore: fix grammar in diffcore-rename header
      9664cef1
    • J
      Merge branch 'jt/http-base-url-update-upon-redirect' · d0f549f4
      Junio C Hamano 提交于
      When a redirected http transport gets an error during the
      redirected request, we ignored the error we got from the server,
      and ended up giving a not-so-useful error message.
      
      * jt/http-base-url-update-upon-redirect:
        http: attempt updating base URL only if no error
      d0f549f4
    • J
      Merge branch 'jk/http-auth' · 92718f57
      Junio C Hamano 提交于
      Reduce authentication round-trip over HTTP when the server supports
      just a single authentication method.
      
      * jk/http-auth:
        http: add an "auto" mode for http.emptyauth
        http: restrict auth methods to what the server advertises
      92718f57
    • J
      Merge branch 'jh/send-email-one-cc' · ea1e784c
      Junio C Hamano 提交于
      "Cc:" on the trailer part does not have to conform to RFC strictly,
      unlike in the e-mail header.  "git send-email" has been updated to
      ignore anything after '>' when picking addresses, to allow non-address
      cruft like " # stable 4.4" after the address.
      
      * jh/send-email-one-cc:
        send-email: only allow one address per body tag
      ea1e784c
    • J
      Merge branch 'rs/strbuf-add-real-path' · fc322935
      Junio C Hamano 提交于
      An helper function to make it easier to append the result from
      real_path() to a strbuf has been added.
      
      * rs/strbuf-add-real-path:
        strbuf: add strbuf_add_real_path()
        cocci: use ALLOC_ARRAY
      fc322935
    • J
      Merge branch 'rs/sha1-file-plug-fallback-base-leak' · 82682e21
      Junio C Hamano 提交于
      A leak in a codepath to read from a packed object in (rare) cases
      has been plugged.
      
      * rs/sha1-file-plug-fallback-base-leak:
        sha1_file: release fallback base's memory in unpack_entry()
      82682e21
    • J
      Merge branch 'rs/commit-parsing-optim' · 98c96f8b
      Junio C Hamano 提交于
      The code that parses header fields in the commit object has been
      updated for (micro)performance and code hygiene.
      
      * rs/commit-parsing-optim:
        commit: don't check for space twice when looking for header
        commit: be more precise when searching for headers
      98c96f8b
    • J
      Merge branch 'jk/t6300-cleanup' · 11cfc0ef
      Junio C Hamano 提交于
      A test that creates a confusing branch whose name is HEAD has been
      corrected not to do so.
      
      * jk/t6300-cleanup:
        t6300: avoid creating refs/heads/HEAD
      11cfc0ef
    • J
      Merge branch 'jk/parse-config-key-cleanup' · 963792ed
      Junio C Hamano 提交于
      The "parse_config_key()" API function has been cleaned up.
      
      * jk/parse-config-key-cleanup:
        parse_hide_refs_config: tell parse_config_key we don't want a subsection
        parse_config_key: allow matching single-level config
        parse_config_key: use skip_prefix instead of starts_with
      963792ed
    • J
      Merge branch 'sb/parse-hide-refs-config-cleanup' · 34061299
      Junio C Hamano 提交于
      Code clean-up.
      
      * sb/parse-hide-refs-config-cleanup:
        refs: parse_hide_refs_config to use parse_config_key
      34061299
    • J
      Merge branch 'jt/upload-pack-error-report' · a729e467
      Junio C Hamano 提交于
      "git upload-pack", which is a counter-part of "git fetch", did not
      report a request for a ref that was not advertised as invalid.
      This is generally not a problem (because "git fetch" will stop
      before making such a request), but is the right thing to do.
      
      * jt/upload-pack-error-report:
        upload-pack: report "not our ref" to client
      a729e467
    • J
      Merge branch 'jk/ident-empty' · 066c38ca
      Junio C Hamano 提交于
      user.email that consists of only cruft chars should consistently
      error out, but didn't.
      
      * jk/ident-empty:
        ident: do not ignore empty config name/email
        ident: reject all-crud ident name
        ident: handle NULL email when complaining of empty name
        ident: mark error messages for translation
      066c38ca
    • J
      Merge branch 'jc/config-case-cmdline-take-2' · 2f54451f
      Junio C Hamano 提交于
      The code to parse "git -c VAR=VAL cmd" and set configuration
      variable for the duration of cmd had two small bugs, which have
      been fixed.
      
      * jc/config-case-cmdline-take-2:
        config: use git_config_parse_key() in git_config_parse_parameter()
        config: move a few helper functions up
      2f54451f
  3. 09 3月, 2017 2 次提交
  4. 08 3月, 2017 1 次提交
  5. 07 3月, 2017 2 次提交
    • J
      ewah: fix eword_t/uint64_t confusion · 3255e512
      Jeff King 提交于
      The ewah subsystem typedefs eword_t to be uint64_t, but some
      code uses a bare uint64_t. This isn't a bug now, but it's a
      potential maintenance problem if the definition of eword_t
      ever changes. Let's use the correct type.
      
      Note that we can't use COPY_ARRAY() here because the source
      and destination point to objects of different sizes. For
      that reason we'll also skip the usual "sizeof(*dst)" and use
      the real type, which should make it more clear that there's
      something tricky going on.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      3255e512
    • V
      line-log: use COPY_ARRAY to fix mis-sized memcpy · 07f546cd
      Vegard Nossum 提交于
      This memcpy meant to get the sizeof a "struct range", not a
      "range_set", as the former is what our array holds. Rather
      than swap out the types, let's convert this site to
      COPY_ARRAY, which avoids the problem entirely (and confirms
      that the src and dst types match).
      
      Note for curiosity's sake that this bug doesn't trigger on
      I32LP64 systems, but does on ILP32 systems. The mistaken
      "struct range_set" has two ints and a pointer. That's 16
      bytes on LP64, or 12 on ILP32. The correct "struct range"
      type has two longs, which is also 16 on LP64, but only 8 on
      ILP32.
      
      Likewise an IL32P64 system would experience the bug.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NVegard Nossum <vegard.nossum@oracle.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      07f546cd
  6. 04 3月, 2017 2 次提交
    • A
      line-log.c: prevent crash during union of too many ranges · aaae0bf7
      Allan Xavier 提交于
      The existing implementation of range_set_union does not correctly
      reallocate memory, leading to a heap overflow when it attempts to union
      more than 24 separate line ranges.
      
      For struct range_set *out to grow correctly it must have out->nr set to
      the current size of the buffer when it is passed to range_set_grow.
      However, the existing implementation of range_set_union only updates
      out->nr at the end of the function, meaning that it is always zero
      before this. This results in range_set_grow never growing the buffer, as
      well as some of the union logic itself being incorrect as !out->nr is
      always true.
      
      The reason why 24 is the limit is that the first allocation of size 1
      ends up allocating a buffer of size 24 (due to the call to alloc_nr in
      ALLOC_GROW). This goes some way to explain why this hasn't been
      caught before.
      
      Fix the problem by correctly updating out->nr after reallocating the
      range_set. As this results in out->nr containing the same value as the
      variable o, replace o with out->nr as well.
      
      Finally, add a new test to help prevent the problem reoccurring in the
      future. Thanks to Vegard Nossum for writing the test.
      Signed-off-by: NAllan Xavier <allan.x.xavier@oracle.com>
      Reviewed-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      aaae0bf7
    • S
      contrib: git-remote-{bzr,hg} placeholders don't need Python · b8686c66
      Sebastian Schuberth 提交于
      It does not make sense for these placeholder scripts to depend on Python
      just because the real scripts do. At the example of Git for Windows, we
      would not even be able to see those warnings as it does not ship with
      Python. So just use plain shell scripts instead.
      Signed-off-by: NSebastian Schuberth <sschuberth@gmail.com>
      Reviewed-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      b8686c66
  7. 03 3月, 2017 1 次提交
    • J
      add--interactive: fix missing file prompt for patch mode with "-i" · c852bd54
      Jeff King 提交于
      When invoked as "git add -i", each menu interactive menu
      option prompts the user to select a list of files. This
      includes the "patch" option, which gets the list before
      starting the hunk-selection loop.
      
      As "git add -p", it behaves differently, and jumps straight
      to the hunk selection loop.
      
      Since 0539d5e6 (i18n: add--interactive: mark patch prompt
      for translation, 2016-12-14), the "add -i" case mistakenly
      jumps to straight to the hunk-selection loop. Prior to that
      commit the distinction between the two cases was managed by
      the $patch_mode variable. That commit used $patch_mode for
      something else, and moved the old meaning to the "$cmd"
      variable.  But it forgot to update the $patch_mode check
      inside patch_update_cmd() which controls the file-list
      behavior.
      
      The simplest fix would be to change that line to check $cmd.
      But while we're here, let's use a less obscure name for this
      flag: $patch_mode_only, a boolean which tells whether we are
      in full-interactive mode or only in patch-mode.
      Reported-by: NHenrik Grubbström <grubba@grubba.org>
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c852bd54
  8. 02 3月, 2017 3 次提交
  9. 01 3月, 2017 3 次提交