1. 20 4月, 2017 3 次提交
    • J
      Merge branch 'bw/push-options-recursively-to-submodules' · 872e2cf0
      Junio C Hamano 提交于
      "git push --recurse-submodules --push-option=<string>" learned to
      propagate the push option recursively down to pushes in submodules.
      
      * bw/push-options-recursively-to-submodules:
        push: propagate remote and refspec with --recurse-submodules
        submodule--helper: add push-check subcommand
        remote: expose parse_push_refspec function
        push: propagate push-options with --recurse-submodules
        push: unmark a local variable as static
      872e2cf0
    • J
      Merge branch 'bc/object-id' · b1081e40
      Junio C Hamano 提交于
      Conversion from unsigned char [40] to struct object_id continues.
      
      * bc/object-id:
        Documentation: update and rename api-sha1-array.txt
        Rename sha1_array to oid_array
        Convert sha1_array_for_each_unique and for_each_abbrev to object_id
        Convert sha1_array_lookup to take struct object_id
        Convert remaining callers of sha1_array_lookup to object_id
        Make sha1_array_append take a struct object_id *
        sha1-array: convert internal storage for struct sha1_array to object_id
        builtin/pull: convert to struct object_id
        submodule: convert check_for_new_submodule_commits to object_id
        sha1_name: convert disambiguate_hint_fn to take object_id
        sha1_name: convert struct disambiguate_state to object_id
        test-sha1-array: convert most code to struct object_id
        parse-options-cb: convert sha1_array_append caller to struct object_id
        fsck: convert init_skiplist to struct object_id
        builtin/receive-pack: convert portions to struct object_id
        builtin/pull: convert portions to struct object_id
        builtin/diff: convert to struct object_id
        Convert GIT_SHA1_RAWSZ used for allocation to GIT_MAX_RAWSZ
        Convert GIT_SHA1_HEXSZ used for allocation to GIT_MAX_HEXSZ
        Define new hash-size constants for allocating memory
      b1081e40
    • J
      Merge branch 'sb/submodule-short-status' · c703555c
      Junio C Hamano 提交于
      The output from "git status --short" has been extended to show
      various kinds of dirtyness in submodules differently; instead of to
      "M" for modified, 'm' and '?' can be shown to signal changes only
      to the working tree of the submodule but not the commit that is
      checked out.
      
      * sb/submodule-short-status:
        submodule.c: correctly handle nested submodules in is_submodule_modified
        short status: improve reporting for submodule changes
        submodule.c: stricter checking for submodules in is_submodule_modified
        submodule.c: port is_submodule_modified to use porcelain 2
        submodule.c: convert is_submodule_modified to use strbuf_getwholeline
        submodule.c: factor out early loop termination in is_submodule_modified
        submodule.c: use argv_array in is_submodule_modified
      c703555c
  2. 17 4月, 2017 11 次提交
    • J
      Twelfth batch for 2.13 · 584f8975
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      584f8975
    • J
      Merge branch 'js/difftool-builtin' · 7b612c96
      Junio C Hamano 提交于
      Code cleanup.
      
      * js/difftool-builtin:
        difftool: fix use-after-free
        difftool: avoid strcpy
      7b612c96
    • J
      Merge branch 'sb/unpack-trees-would-lose-submodule-message-update' · c8a8951c
      Junio C Hamano 提交于
      Update an error message.
      
      * sb/unpack-trees-would-lose-submodule-message-update:
        unpack-trees.c: align submodule error message to the other error messages
      c8a8951c
    • J
      Merge branch 'ab/regen-perl-mak-with-different-perl' · 3817d631
      Junio C Hamano 提交于
      Update the build dependency so that an update to /usr/bin/perl
      etc. result in recomputation of perl.mak file.
      
      * ab/regen-perl-mak-with-different-perl:
        perl: regenerate perl.mak if perl -V changes
      3817d631
    • J
      Merge branch 'sb/show-diff-for-submodule-in-diff-fix' · 1776a710
      Junio C Hamano 提交于
      "git diff --submodule=diff" learned to work better in a project
      with a submodule that in turn has its own submodules.
      
      * sb/show-diff-for-submodule-in-diff-fix:
        diff: submodule inline diff to initialize env array.
      1776a710
    • J
      Merge branch 'qp/bisect-docfix' · 263fd041
      Junio C Hamano 提交于
      Doc update.
      
      * qp/bisect-docfix:
        git-bisect.txt: add missing word
      263fd041
    • J
      Merge branch 'mm/ls-files-s-doc' · 97d9e979
      Junio C Hamano 提交于
      Doc update.
      
      * mm/ls-files-s-doc:
        Documentation: document elements in "ls-files -s" output in order
      97d9e979
    • J
      Merge branch 'jk/loose-object-info-report-error' · dfe46c5c
      Junio C Hamano 提交于
      Update error handling for codepath that deals with corrupt loose
      objects.
      
      * jk/loose-object-info-report-error:
        index-pack: detect local corruption in collision check
        sha1_loose_object_info: return error for corrupted objects
      dfe46c5c
    • J
      Merge branch 'jc/bs-t-is-not-a-tab-for-sed' · 3c833cae
      Junio C Hamano 提交于
      Code cleanup.
      
      * jc/bs-t-is-not-a-tab-for-sed:
        contrib/git-resurrect.sh: do not write \t for HT in sed scripts
      3c833cae
    • J
      Merge branch 'jc/unused-symbols' · 93a96cce
      Junio C Hamano 提交于
      Code cleanup.
      
      * jc/unused-symbols:
        remote.[ch]: parse_push_cas_option() can be static
      93a96cce
    • J
      Merge branch 'jk/snprintf-cleanups' · cb054eb2
      Junio C Hamano 提交于
      Code clean-up.
      
      * jk/snprintf-cleanups:
        daemon: use an argv_array to exec children
        gc: replace local buffer with git_path
        transport-helper: replace checked snprintf with xsnprintf
        convert unchecked snprintf into xsnprintf
        combine-diff: replace malloc/snprintf with xstrfmt
        replace unchecked snprintf calls with heap buffers
        receive-pack: print --pack-header directly into argv array
        name-rev: replace static buffer with strbuf
        create_branch: use xstrfmt for reflog message
        create_branch: move msg setup closer to point of use
        avoid using mksnpath for refs
        avoid using fixed PATH_MAX buffers for refs
        fetch: use heap buffer to format reflog
        tag: use strbuf to format tag header
        diff: avoid fixed-size buffer for patch-ids
        odb_mkstemp: use git_path_buf
        odb_mkstemp: write filename into strbuf
        do not check odb_mkstemp return value for errors
      cb054eb2
  3. 14 4月, 2017 1 次提交
    • J
      difftool: fix use-after-free · 882add13
      Johannes Schindelin 提交于
      The left and right base directories were pointed to the buf field of
      two strbufs, which were subject to change.
      
      A contrived test case shows the problem where a file with a long enough
      name to force the strbuf to grow is up-to-date (hence the code path is
      used where the work tree's version of the file is reused), and then a
      file that is not up-to-date needs to be written (hence the code path is
      used where checkout_entry() uses the previously recorded base_dir that
      is invalid by now).
      
      Let's just copy the base_dir strings for use with checkout_entry(),
      never touch them until the end, and release them then. This is an easily
      verifiable fix (as opposed to the next-obvious alternative: to re-set
      base_dir after every loop iteration).
      
      This fixes https://github.com/git-for-windows/git/issues/1124Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Reviewed-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      882add13
  4. 11 4月, 2017 9 次提交
  5. 03 4月, 2017 2 次提交
  6. 02 4月, 2017 4 次提交
    • Q
      git-bisect.txt: add missing word · 60b091c6
      Quentin Pradet 提交于
      Signed-off-by: NQuentin Pradet <quentin.pradet@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      60b091c6
    • M
      Documentation: document elements in "ls-files -s" output in order · be6ed145
      Mostyn Bramley-Moore 提交于
      List the fields in order of appearance in the command output.
      Signed-off-by: NMostyn Bramley-Moore <mostyn@antipode.se>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      be6ed145
    • J
      index-pack: detect local corruption in collision check · 51054177
      Jeff King 提交于
      When we notice that we have a local copy of an incoming
      object, we compare the two objects to make sure we haven't
      found a collision. Before we get to the actual object
      bytes, though, we compare the type and size from
      sha1_object_info().
      
      If our local object is corrupted, then the type will be
      OBJ_BAD, which obviously will not match the incoming type,
      and we'll report "SHA1 COLLISION FOUND" (with capital
      letters and everything). This is confusing, as the problem
      is not a collision but rather local corruption. We should
      report that instead (just like we do if reading the rest of
      the object content fails a few lines later).
      
      Note that we _could_ just ignore the error and mark it as a
      non-collision. That would let you "git fetch" to replace a
      corrupted object. But it's not a very reliable method for
      repairing a repository. The earlier want/have negotiation
      tries to get the other side to omit objects we already have,
      and it would not realize that we are "missing" this
      corrupted object. So we're better off complaining loudly
      when we see corruption, and letting the user take more
      drastic measures to repair (like making a full clone
      elsewhere and copying the pack into place).
      
      Note that the test sets transfer.unpackLimit in the
      receiving repository so that we use index-pack (which is
      what does the collision check). Normally for such a small
      push we'd use unpack-objects, which would simply try to
      write the loose object, and discard the new one when we see
      that there's already an old one.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      51054177
    • J
      sha1_loose_object_info: return error for corrupted objects · 93cff9a9
      Jeff King 提交于
      When sha1_loose_object_info() finds that a loose object file
      cannot be stat(2)ed or mmap(2)ed, it returns -1 to signal an
      error to the caller.  However, if it found that the loose
      object file is corrupt and the object data cannot be used
      from it, it stuffs OBJ_BAD into "type" field of the
      object_info, but returns zero (i.e., success), which can
      confuse callers.
      
      This is due to 052fe5ea (sha1_loose_object_info: make type
      lookup optional, 2013-07-12), which switched the return to a
      strict success/error, rather than returning the type (but
      botched the return).
      
      Callers of regular sha1_object_info() don't notice the
      difference, as that function returns the type (which is
      OBJ_BAD in this case). However, direct callers of
      sha1_object_info_extended() see the function return success,
      but without setting any meaningful values in the object_info
      struct, leading them to access potentially uninitialized
      memory.
      
      The easiest way to see the bug is via "cat-file -s", which
      will happily ignore the corruption and report whatever
      value happened to be in the "size" variable.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      93cff9a9
  7. 01 4月, 2017 2 次提交
  8. 31 3月, 2017 8 次提交