1. 25 9月, 2017 11 次提交
    • J
      Merge branch 'ks/commit-do-not-touch-cut-line' · 77f45395
      Junio C Hamano 提交于
      The explanation of the cut-line in the commit log editor has been
      slightly tweaked.
      
      * ks/commit-do-not-touch-cut-line:
        commit-template: change a message to be more intuitive
      77f45395
    • J
      Merge branch 'tg/refs-allowed-flags' · d0190105
      Junio C Hamano 提交于
      API error-proofing which happens to also squelch warnings from GCC.
      
      * tg/refs-allowed-flags:
        refs: strip out not allowed flags from ref_transaction_update
      d0190105
    • J
      Merge branch 'rs/archive-excluded-directory' · 62b1cb7b
      Junio C Hamano 提交于
      "git archive", especially when used with pathspec, stored an empty
      directory in its output, even though Git itself never does so.
      This has been fixed.
      
      * rs/archive-excluded-directory:
        archive: don't add empty directories to archives
      62b1cb7b
    • J
      Merge branch 'ks/help-alias-label' · 5079cc82
      Junio C Hamano 提交于
      "git help co" now says "co is aliased to ...", not "git co is".
      
      * ks/help-alias-label:
        help: change a message to be more precise
      5079cc82
    • J
      Merge branch 'jn/per-repo-object-store-fixes' · ceb7a01a
      Junio C Hamano 提交于
      Step #0 of a planned & larger series to make the in-core object
      store per in-core repository object.
      
      * jn/per-repo-object-store-fixes:
        replace-objects: evaluate replacement refs without using the object store
        push, fetch: error out for submodule entries not pointing to commits
        pack: make packed_git_mru global a value instead of a pointer
      ceb7a01a
    • J
      Merge branch 'jk/write-in-full-fix' · c50424a6
      Junio C Hamano 提交于
      Many codepaths did not diagnose write failures correctly when disks
      go full, due to their misuse of write_in_full() helper function,
      which have been corrected.
      
      * jk/write-in-full-fix:
        read_pack_header: handle signed/unsigned comparison in read result
        config: flip return value of store_write_*()
        notes-merge: use ssize_t for write_in_full() return value
        pkt-line: check write_in_full() errors against "< 0"
        convert less-trivial versions of "write_in_full() != len"
        avoid "write_in_full(fd, buf, len) != len" pattern
        get-tar-commit-id: check write_in_full() return against 0
        config: avoid "write_in_full(fd, buf, len) < len" pattern
      c50424a6
    • J
      Merge branch 'ez/doc-duplicated-words-fix' · 94982b69
      Junio C Hamano 提交于
      Typofix.
      
      * ez/doc-duplicated-words-fix:
        doc: fix minor typos (extra/duplicated words)
      94982b69
    • J
      Merge branch 'kd/doc-for-each-ref' · f5faef85
      Junio C Hamano 提交于
      Doc update.
      
      * kd/doc-for-each-ref:
        doc/for-each-ref: explicitly specify option names
        doc/for-each-ref: consistently use '=' to between argument names and values
      f5faef85
    • J
      Merge branch 'cc/subprocess-handshake-missing-capabilities' · b9db14f5
      Junio C Hamano 提交于
      Finishing touches to a topic already in 'master'.
      
      * cc/subprocess-handshake-missing-capabilities:
        subprocess: loudly die when subprocess asks for an unsupported capability
      b9db14f5
    • J
      Merge branch 'kw/write-index-reduce-alloc' · d085f977
      Junio C Hamano 提交于
      A hotfix to a topic already in 'master'.
      
      * kw/write-index-reduce-alloc:
        read-cache: fix index corruption with index v4
        Add t/helper/test-write-cache to .gitignore
      d085f977
    • J
      Merge branch 'mg/name-rev-tests-with-short-stack' · b0df15a1
      Junio C Hamano 提交于
      A handful of tests to demonstrates a recursive implementation of
      "name-rev" hurts.
      
      * mg/name-rev-tests-with-short-stack:
        t6120: test describe and name-rev with deep repos
        t6120: clean up state after breaking repo
        t6120: test name-rev --all and --stdin
        t7004: move limited stack prereq to test-lib
      b0df15a1
  2. 21 9月, 2017 1 次提交
    • J
      Merge branch 'jk/leak-checkers' · 59c0ea18
      Junio C Hamano 提交于
      Many of our programs consider that it is OK to release dynamic
      storage that is used throughout the life of the program by simply
      exiting, but this makes it harder to leak detection tools to avoid
      reporting false positives.  Plug many existing leaks and introduce
      a mechanism for developers to mark that the region of memory
      pointed by a pointer is not lost/leaking to help these tools.
      
      * jk/leak-checkers:
        git-compat-util: make UNLEAK less error-prone
      59c0ea18
  3. 20 9月, 2017 1 次提交
  4. 19 9月, 2017 24 次提交
    • J
      The eighth batch for 2.15 · 9ddaf86b
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      9ddaf86b
    • J
      Merge branch 'rk/commit-tree-make-F-verbatim' · 4d46bce6
      Junio C Hamano 提交于
      Unlike "git commit-tree < file", "git commit-tree -F file" did not
      pass the contents of the file verbatim and instead completed an
      incomplete line at the end, if exists.  The latter has been updated
      to match the behaviour of the former.
      
      * rk/commit-tree-make-F-verbatim:
        commit-tree: do not complete line in -F input
      4d46bce6
    • J
      Merge branch 'rs/strbuf-leakfix' · d811ba18
      Junio C Hamano 提交于
      Many leaks of strbuf have been fixed.
      
      * rs/strbuf-leakfix: (34 commits)
        wt-status: release strbuf after use in wt_longstatus_print_tracking()
        wt-status: release strbuf after use in read_rebase_todolist()
        vcs-svn: release strbuf after use in end_revision()
        utf8: release strbuf on error return in strbuf_utf8_replace()
        userdiff: release strbuf after use in userdiff_get_textconv()
        transport-helper: release strbuf after use in process_connect_service()
        sequencer: release strbuf after use in save_head()
        shortlog: release strbuf after use in insert_one_record()
        sha1_file: release strbuf on error return in index_path()
        send-pack: release strbuf on error return in send_pack()
        remote: release strbuf after use in set_url()
        remote: release strbuf after use in migrate_file()
        remote: release strbuf after use in read_remote_branches()
        refs: release strbuf on error return in write_pseudoref()
        notes: release strbuf after use in notes_copy_from_stdin()
        merge: release strbuf after use in write_merge_heads()
        merge: release strbuf after use in save_state()
        mailinfo: release strbuf on error return in handle_boundary()
        mailinfo: release strbuf after use in handle_from()
        help: release strbuf on error return in exec_woman_emacs()
        ...
      d811ba18
    • J
      Merge branch 'jk/shortlog-ident-cleanup' · 17cb5f85
      Junio C Hamano 提交于
      Code clean-up.
      
      * jk/shortlog-ident-cleanup:
        shortlog: skip format/parse roundtrip for internal traversal
      17cb5f85
    • J
      Merge branch 'mh/packed-ref-transactions' · 07f0542d
      Junio C Hamano 提交于
      Implement transactional update to the packed-ref representation of
      references.
      
      * mh/packed-ref-transactions:
        files_transaction_finish(): delete reflogs before references
        packed-backend: rip out some now-unused code
        files_ref_store: use a transaction to update packed refs
        t1404: demonstrate two problems with reference transactions
        files_initial_transaction_commit(): use a transaction for packed refs
        prune_refs(): also free the linked list
        files_pack_refs(): use a reference transaction to write packed refs
        packed_delete_refs(): implement method
        packed_ref_store: implement reference transactions
        struct ref_transaction: add a place for backends to store data
        packed-backend: don't adjust the reference count on lock/unlock
      07f0542d
    • J
      Merge branch 'kw/merge-recursive-cleanup' · 67012639
      Junio C Hamano 提交于
      A leakfix and code clean-up.
      
      * kw/merge-recursive-cleanup:
        merge-recursive: change current file dir string_lists to hashmap
        merge-recursive: remove return value from get_files_dirs
        merge-recursive: fix memory leak
      67012639
    • J
      Merge branch 'sb/merge-commit-msg-hook' · 0543de43
      Junio C Hamano 提交于
      As "git commit" to conclude a conflicted "git merge" honors the
      commit-msg hook, "git merge" that recoreds a merge commit that
      cleanly auto-merges should, but it didn't.
      
      * sb/merge-commit-msg-hook:
        builtin/merge: honor commit-msg hook for merges
      0543de43
    • J
      Merge branch 'jk/leak-checkers' · 09595ab3
      Junio C Hamano 提交于
      Many of our programs consider that it is OK to release dynamic
      storage that is used throughout the life of the program by simply
      exiting, but this makes it harder to leak detection tools to avoid
      reporting false positives.  Plug many existing leaks and introduce
      a mechanism for developers to mark that the region of memory
      pointed by a pointer is not lost/leaking to help these tools.
      
      * jk/leak-checkers:
        add UNLEAK annotation for reducing leak false positives
        set_git_dir: handle feeding gitdir to itself
        repository: free fields before overwriting them
        reset: free allocated tree buffers
        reset: make tree counting less confusing
        config: plug user_config leak
        update-index: fix cache entry leak in add_one_file()
        add: free leaked pathspec after add_files_to_cache()
        test-lib: set LSAN_OPTIONS to abort by default
        test-lib: --valgrind should not override --verbose-log
      09595ab3
    • J
      Merge branch 'nm/pull-submodule-recurse-config' · df80c576
      Junio C Hamano 提交于
      "git -c submodule.recurse=yes pull" did not work as if the
      "--recurse-submodules" option was given from the command line.
      This has been corrected.
      
      * nm/pull-submodule-recurse-config:
        pull: honor submodule.recurse config option
        pull: fix cli and config option parsing order
      df80c576
    • J
      Merge branch 'mh/packed-ref-store-prep' · daafb506
      Junio C Hamano 提交于
      Fix regression to "gitk --bisect" by a recent update.
      
      * mh/packed-ref-store-prep:
        rev-parse: don't trim bisect refnames
      daafb506
    • J
      Merge branch 'ma/remove-config-maybe-bool' · c39da2c0
      Junio C Hamano 提交于
      Finishing touches to a recent topic.
      
      * ma/remove-config-maybe-bool:
        config: remove git_config_maybe_bool
      c39da2c0
    • J
      Merge branch 'jk/system-path-cleanup' · f2ab3a10
      Junio C Hamano 提交于
      Code clean-up.
      
      * jk/system-path-cleanup:
        git_extract_argv0_path: do nothing without RUNTIME_PREFIX
        system_path: move RUNTIME_PREFIX to a sub-function
      f2ab3a10
    • J
      Merge branch 'jh/hashmap-disable-counting' · b86e1120
      Junio C Hamano 提交于
      Our hashmap implementation in hashmap.[ch] is not thread-safe when
      adding a new item needs to expand the hashtable by rehashing; add
      an API to disable the automatic rehashing to work it around.
      
      * jh/hashmap-disable-counting:
        hashmap: add API to disable item counting when threaded
      b86e1120
    • J
      Merge branch 'bb/doc-eol-dirty' · 0517ae0b
      Junio C Hamano 提交于
      Doc update.
      
      * bb/doc-eol-dirty:
        Documentation: mention that `eol` can change the dirty status of paths
      0517ae0b
    • J
      Merge branch 'jt/packmigrate' · 281b1cf8
      Junio C Hamano 提交于
      Remove unneeded file added by a topic already in 'master'.
      
      * jt/packmigrate:
        Remove inadvertently added outgoing/packfile.h
      281b1cf8
    • J
      Merge branch 'jk/incore-lockfile-removal' · 89563ec3
      Junio C Hamano 提交于
      The long-standing rule that an in-core lockfile instance, once it
      is used, must not be freed, has been lifted and the lockfile and
      tempfile APIs have been updated to reduce the chance of programming
      errors.
      
      * jk/incore-lockfile-removal:
        stop leaking lock structs in some simple cases
        ref_lock: stop leaking lock_files
        lockfile: update lifetime requirements in documentation
        tempfile: auto-allocate tempfiles on heap
        tempfile: remove deactivated list entries
        tempfile: use list.h for linked list
        tempfile: release deactivated strbufs instead of resetting
        tempfile: robustify cleanup handler
        tempfile: factor out deactivation
        tempfile: factor out activation
        tempfile: replace die("BUG") with BUG()
        tempfile: handle NULL tempfile pointers gracefully
        tempfile: prefer is_tempfile_active to bare access
        lockfile: do not rollback lock on failed close
        tempfile: do not delete tempfile on failed close
        always check return value of close_tempfile
        verify_signed_buffer: prefer close_tempfile() to close()
        setup_temporary_shallow: move tempfile struct into function
        setup_temporary_shallow: avoid using inactive tempfile
        write_index_as_tree: cleanup tempfile on error
      89563ec3
    • J
      Merge branch 'nd/prune-in-worktree' · 8a044c7f
      Junio C Hamano 提交于
      "git gc" and friends when multiple worktrees are used off of a
      single repository did not consider the index and per-worktree refs
      of other worktrees as the root for reachability traversal, making
      objects that are in use only in other worktrees to be subject to
      garbage collection.
      
      * nd/prune-in-worktree:
        refs.c: reindent get_submodule_ref_store()
        refs.c: remove fallback-to-main-store code get_submodule_ref_store()
        rev-list: expose and document --single-worktree
        revision.c: --reflog add HEAD reflog from all worktrees
        files-backend: make reflog iterator go through per-worktree reflog
        revision.c: --all adds HEAD from all worktrees
        refs: remove dead for_each_*_submodule()
        refs.c: move for_each_remote_ref_submodule() to submodule.c
        revision.c: use refs_for_each*() instead of for_each_*_submodule()
        refs: add refs_head_ref()
        refs: move submodule slash stripping code to get_submodule_ref_store
        refs.c: refactor get_submodule_ref_store(), share common free block
        revision.c: --indexed-objects add objects from all worktrees
        revision.c: refactor add_index_objects_to_pending()
        refs.c: use is_dir_sep() in resolve_gitlink_ref()
        revision.h: new flag in struct rev_info wrt. worktree-related refs
      8a044c7f
    • J
      Merge branch 'ma/split-symref-update-fix' · dafbe199
      Junio C Hamano 提交于
      A leakfix.
      
      * ma/split-symref-update-fix:
        refs/files-backend: add `refname`, not "HEAD", to list
        refs/files-backend: correct return value in lock_ref_for_update
        refs/files-backend: fix memory leak in lock_ref_for_update
        refs/files-backend: add longer-scoped copy of string to list
      dafbe199
    • J
      Merge branch 'mh/notes-cleanup' · 30675f70
      Junio C Hamano 提交于
      Code clean-up.
      
      * mh/notes-cleanup:
        load_subtree(): check that `prefix_len` is in the expected range
        load_subtree(): declare some variables to be `size_t`
        hex_to_bytes(): simpler replacement for `get_oid_hex_segment()`
        get_oid_hex_segment(): don't pad the rest of `oid`
        load_subtree(): combine some common code
        get_oid_hex_segment(): return 0 on success
        load_subtree(): only consider blobs to be potential notes
        load_subtree(): check earlier whether an internal node is a tree entry
        load_subtree(): separate logic for internal vs. terminal entries
        load_subtree(): fix incorrect comment
        load_subtree(): reduce the scope of some local variables
        load_subtree(): remove unnecessary conditional
        notes: make GET_NIBBLE macro more robust
      30675f70
    • J
      Merge branch 'mg/timestamp-t-fix' · eb066429
      Junio C Hamano 提交于
      A mismerge fix.
      
      * mg/timestamp-t-fix:
        name-rev: change ULONG_MAX to TIME_MAX
      eb066429
    • J
      Merge branch 'ma/pkt-line-leakfix' · c78e182d
      Junio C Hamano 提交于
      A leakfix.
      
      * ma/pkt-line-leakfix:
        pkt-line: re-'static'-ify buffer in packet_write_fmt_1()
      c78e182d
    • J
      Merge branch 'jk/config-lockfile-leak-fix' · b0727e24
      Junio C Hamano 提交于
      A leakfix.
      
      * jk/config-lockfile-leak-fix:
        config: use a static lock_file struct
      b0727e24
    • J
      Merge branch 'dw/diff-highlight-makefile-fix' · 1f1ea329
      Junio C Hamano 提交于
      Build clean-up.
      
      * dw/diff-highlight-makefile-fix:
        diff-highlight: add clean target to Makefile
      1f1ea329
    • J
      Merge branch 'ti/external-sha1dc' · cb6ec86d
      Junio C Hamano 提交于
      Platforms that ship with a separate sha1 with collision detection
      library can link to it instead of using the copy we ship as part of
      our source tree.
      
      * ti/external-sha1dc:
        sha1dc: allow building with the external sha1dc library
        sha1dc: build git plumbing code more explicitly
      cb6ec86d
  5. 15 9月, 2017 1 次提交
  6. 14 9月, 2017 2 次提交
    • J
      read_pack_header: handle signed/unsigned comparison in read result · f48ecd38
      Jeff King 提交于
      The result of read_in_full() may be -1 if we saw an error.
      But in comparing it to a sizeof() result, that "-1" will be
      promoted to size_t. In fact, the largest possible size_t
      which is much bigger than our struct size. This means that
      our "< sizeof(header)" error check won't trigger.
      
      In practice, we'd go on to read uninitialized memory and
      compare it to the PACK signature, which is likely to fail.
      But we shouldn't get there.
      
      We can fix this by making a direct "!=" comparison to the
      requested size, rather than "<". This means that errors get
      lumped in with short reads, but that's sufficient for our
      purposes here. There's no PH_ERROR tp represent our case.
      And anyway, this function reads from pipes and network
      sockets. A network error may racily appear as EOF to us
      anyway if there's data left in the socket buffers.
      Signed-off-by: NJeff King <peff@peff.net>
      Reviewed-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      f48ecd38
    • J
      config: flip return value of store_write_*() · d9bd4cbb
      Jeff King 提交于
      The store_write_section() and store_write_pairs() functions
      are basically high-level wrappers around write(). But their
      return values are flipped from our usual convention, using
      "1" for success and "0" for failure.
      
      Let's flip them to follow the usual write() conventions and
      update all callers. As these are local to config.c, it's
      unlikely that we'd have new callers in any topics in flight
      (which would be silently broken by our change). But just to
      be on the safe side, let's rename them to just
      write_section() and write_pairs().  That also accentuates
      their relationship with write().
      Signed-off-by: NJeff King <peff@peff.net>
      Reviewed-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      d9bd4cbb