1. 05 10月, 2017 5 次提交
  2. 03 10月, 2017 17 次提交
    • J
      The twelfth batch for 2.15 · 8fb8a945
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      8fb8a945
    • J
      Merge branch 'bw/git-clang-format' · 4812340b
      Junio C Hamano 提交于
      Adjust clang-format penalty parameters.
      
      * bw/git-clang-format:
        clang-format: adjust line break penalties
      4812340b
    • J
      Merge branch 'ad/doc-markup-fix' · 8f2733a0
      Junio C Hamano 提交于
      Docfix.
      
      * ad/doc-markup-fix:
        doc: correct command formatting
      8f2733a0
    • J
      Merge branch 'mh/mmap-packed-refs' · 1a2e1a76
      Junio C Hamano 提交于
      Operations that do not touch (majority of) packed refs have been
      optimized by making accesses to packed-refs file lazy; we no longer
      pre-parse everything, and an access to a single ref in the
      packed-refs does not touch majority of irrelevant refs, either.
      
      * mh/mmap-packed-refs: (21 commits)
        packed-backend.c: rename a bunch of things and update comments
        mmapped_ref_iterator: inline into `packed_ref_iterator`
        ref_cache: remove support for storing peeled values
        packed_ref_store: get rid of the `ref_cache` entirely
        ref_store: implement `refs_peel_ref()` generically
        packed_read_raw_ref(): read the reference from the mmapped buffer
        packed_ref_iterator_begin(): iterate using `mmapped_ref_iterator`
        read_packed_refs(): ensure that references are ordered when read
        packed_ref_cache: keep the `packed-refs` file mmapped if possible
        packed-backend.c: reorder some definitions
        mmapped_ref_iterator_advance(): no peeled value for broken refs
        mmapped_ref_iterator: add iterator over a packed-refs file
        packed_ref_cache: remember the file-wide peeling state
        read_packed_refs(): read references with minimal copying
        read_packed_refs(): make parsing of the header line more robust
        read_packed_refs(): only check for a header at the top of the file
        read_packed_refs(): use mmap to read the `packed-refs` file
        die_unterminated_line(), die_invalid_line(): new functions
        packed_ref_cache: add a backlink to the associated `packed_ref_store`
        prefix_ref_iterator: break when we leave the prefix
        ...
      1a2e1a76
    • J
      Merge branch 'mr/doc-negative-pathspec' · 9124cca6
      Junio C Hamano 提交于
      Doc updates.
      
      * mr/doc-negative-pathspec:
        docs: improve discoverability of exclude pathspec
      9124cca6
    • J
      Merge branch 'sb/submodule-diff-header-fix' · 9257d3d7
      Junio C Hamano 提交于
      Error message tweak.
      
      * sb/submodule-diff-header-fix:
        submodule: correct error message for missing commits
      9257d3d7
    • J
      Merge branch 'sb/diff-color-move' · 98c57ea6
      Junio C Hamano 提交于
      The output from "git diff --summary" was broken in a recent topic
      that has been merged to 'master' and lost a LF after reporting of
      mode change.  This has been fixed.
      
      * sb/diff-color-move:
        diff: correct newline in summary for renamed files
      98c57ea6
    • J
      Merge branch 'sb/test-submodule-update-config' · 5a5b8c1f
      Junio C Hamano 提交于
      * sb/test-submodule-update-config:
        t7406: submodule.<name>.update command must not be run from .gitmodules
      5a5b8c1f
    • J
      Merge branch 'jk/validate-headref-fix' · bb3afad3
      Junio C Hamano 提交于
      Code clean-up.
      
      * jk/validate-headref-fix:
        validate_headref: use get_oid_hex for detached HEADs
        validate_headref: use skip_prefix for symref parsing
        validate_headref: NUL-terminate HEAD buffer
      bb3afad3
    • J
      Merge branch 'jk/read-in-full' · cb1083ca
      Junio C Hamano 提交于
      Code clean-up to prevent future mistakes by copying and pasting
      code that checks the result of read_in_full() function.
      
      * jk/read-in-full:
        worktree: check the result of read_in_full()
        worktree: use xsize_t to access file size
        distinguish error versus short read from read_in_full()
        avoid looking at errno for short read_in_full() returns
        prefer "!=" when checking read_in_full() result
        notes-merge: drop dead zero-write code
        files-backend: prefer "0" for write_in_full() error check
      cb1083ca
    • J
      Merge branch 'jk/no-optional-locks' · d4e93836
      Junio C Hamano 提交于
      Some commands (most notably "git status") makes an opportunistic
      update when performing a read-only operation to help optimize later
      operations in the same repository.  The new "--no-optional-locks"
      option can be passed to Git to disable them.
      
      * jk/no-optional-locks:
        git: add --no-optional-locks option
      d4e93836
    • J
      Merge branch 'hn/string-list-doc' · d9ec072a
      Junio C Hamano 提交于
      Doc reorg.
      
      * hn/string-list-doc:
        string-list.h: move documentation from Documentation/api/ into header
      d9ec072a
    • J
      Merge branch 'hn/path-ownership-comment' · 9de7ae63
      Junio C Hamano 提交于
      Add comment to a few functions that use a short-lived buffer the
      caller can peek and copy out of.
      
      * hn/path-ownership-comment:
        read_gitfile_gently: clarify return value ownership.
        real_path: clarify return value ownership
      9de7ae63
    • J
      Merge branch 'hn/submodule-comment' · 2f777fad
      Junio C Hamano 提交于
      * hn/submodule-comment:
        submodule.c: describe submodule_to_gitdir() in a new comment
      2f777fad
    • J
      Merge branch 'sd/branch-copy' · 3b48045c
      Junio C Hamano 提交于
      "git branch" learned "-c/-C" to create a new branch by copying an
      existing one.
      
      * sd/branch-copy:
        branch: fix "copy" to never touch HEAD
        branch: add a --copy (-c) option to go with --move (-m)
        branch: add test for -m renaming multiple config sections
        config: create a function to format section headers
      3b48045c
    • J
      Merge branch 'bc/rev-parse-parseopt-fix' · b2a2c4d8
      Junio C Hamano 提交于
      Recent versions of "git rev-parse --parseopt" did not parse the
      option specification that does not have the optional flags (*=?!)
      correctly, which has been corrected.
      
      * bc/rev-parse-parseopt-fix:
        parse-options: only insert newline in help text if needed
        parse-options: write blank line to correct output stream
        t0040,t1502: Demonstrate parse_options bugs
        git-rebase: don't ignore unexpected command line arguments
        rev-parse parseopt: interpret any whitespace as start of help text
        rev-parse parseopt: do not search help text for flag chars
        t1502: demonstrate rev-parse --parseopt option mis-parsing
      b2a2c4d8
    • J
      Merge branch 'js/rebase-i-final' · 5f3108b7
      Junio C Hamano 提交于
      The final batch to "git rebase -i" updates to move more code from
      the shell script to C.
      
      * js/rebase-i-final:
        rebase -i: rearrange fixup/squash lines using the rebase--helper
        t3415: test fixup with wrapped oneline
        rebase -i: skip unnecessary picks using the rebase--helper
        rebase -i: check for missing commits in the rebase--helper
        t3404: relax rebase.missingCommitsCheck tests
        rebase -i: also expand/collapse the SHA-1s via the rebase--helper
        rebase -i: do not invent onelines when expanding/collapsing SHA-1s
        rebase -i: remove useless indentation
        rebase -i: generate the script via rebase--helper
        t3415: verify that an empty instructionFormat is handled as before
      5f3108b7
  3. 02 10月, 2017 5 次提交
  4. 01 10月, 2017 3 次提交
    • R
      refs: pass NULL to resolve_refdup() if hash is not needed · efbd4fdf
      René Scharfe 提交于
      This allows us to get rid of several write-only variables.
      Signed-off-by: NRene Scharfe <l.s.r@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      efbd4fdf
    • R
      refs: pass NULL to refs_resolve_refdup() if hash is not needed · 872ccb2c
      René Scharfe 提交于
      This gets us rid of a write-only variable.
      Signed-off-by: NRene Scharfe <l.s.r@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      872ccb2c
    • J
      clang-format: adjust line break penalties · 42efde4c
      Johannes Schindelin 提交于
      We really, really, really want to limit the columns to 80 per line: One
      of the few consistent style comments on the Git mailing list is that the
      lines should not have more than 80 columns/line (even if 79 columns/line
      would make more sense, given that the code is frequently viewed as diff,
      and diffs adding an extra character).
      
      The penalty of 5 for excess characters is way too low to guarantee that,
      though, as pointed out by Brandon Williams.
      
      From the existing clang-format examples and documentation, it appears
      that 100 is a penalty deemed appropriate for Stuff You Really Don't
      Want, so let's assign that as the penalty for "excess characters", i.e.
      overly long lines.
      
      While at it, adjust the penalties further: we are actually not that keen
      on preventing new line breaks within comments or string literals, so the
      penalty of 100 seems awfully high.
      
      Likewise, we are not all that adamant about keeping line breaks away
      from assignment operators (a lot of Git's code breaks immediately after
      the `=` character just to keep that 80 columns/line limit).
      
      We do frown a little bit more about functions' return types being on
      their own line than the penalty 0 would suggest, so this was adjusted,
      too.
      
      Finally, we do not particularly fancy breaking before the first parameter
      in a call, but if it keeps the line shorter than 80 columns/line, that's
      what we do, so lower the penalty for breaking before a call's first
      parameter, but not quite as much as introducing new line breaks to
      comments.
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Reviewed-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      42efde4c
  5. 29 9月, 2017 10 次提交
    • E
      fast-import: checkpoint: dump branches/tags/marks even if object_count==0 · 30e215a6
      Eric Rannaud 提交于
      The checkpoint command cycles packfiles if object_count != 0, a sensible
      test or there would be no pack files to write. Since 820b9310, the
      command also dumps branches, tags and marks, but still conditionally.
      However, it is possible for a command stream to modify refs or create
      marks without creating any new objects.
      
      For example, reset a branch (and keep fast-import running):
      
      	$ git fast-import
      	reset refs/heads/master
      	from refs/heads/master^
      
      	checkpoint
      
      but refs/heads/master remains unchanged.
      
      Other example: a commit command that re-creates an object that already
      exists in the object database.
      
      The man page also states that checkpoint "updates the refs" and that
      "placing a progress command immediately after a checkpoint will inform
      the reader when the checkpoint has been completed and it can safely
      access the refs that fast-import updated". This wasn't always true
      without this patch.
      
      This fix unconditionally calls dump_{branches,tags,marks}() for all
      checkpoint commands. dump_branches() and dump_tags() are cheap to call
      in the case of a no-op.
      
      Add tests to t9300 that observe the (non-packfiles) effects of
      checkpoint.
      Signed-off-by: NEric Rannaud <e@nanocritical.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      30e215a6
    • J
      The eleventh batch for 2.15 · ea220ee4
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      ea220ee4
    • J
      Merge branch 'sb/doc-config-submodule-update' · d5eec909
      Junio C Hamano 提交于
      * sb/doc-config-submodule-update:
        Documentation/config: clarify the meaning of submodule.<name>.update
      d5eec909
    • J
      Merge branch 'ma/leakplugs' · 69c54c72
      Junio C Hamano 提交于
      Memory leaks in various codepaths have been plugged.
      
      * ma/leakplugs:
        pack-bitmap[-write]: use `object_array_clear()`, don't leak
        object_array: add and use `object_array_pop()`
        object_array: use `object_array_clear()`, not `free()`
        leak_pending: use `object_array_clear()`, not `free()`
        commit: fix memory leak in `reduce_heads()`
        builtin/commit: fix memory leak in `prepare_index()`
      69c54c72
    • J
      Merge branch 'rj/no-sign-compare' · 14a8168e
      Junio C Hamano 提交于
      Many codepaths have been updated to squelch -Wsign-compare
      warnings.
      
      * rj/no-sign-compare:
        ALLOC_GROW: avoid -Wsign-compare warnings
        cache.h: hex2chr() - avoid -Wsign-compare warnings
        commit-slab.h: avoid -Wsign-compare warnings
        git-compat-util.h: xsize_t() - avoid -Wsign-compare warnings
      14a8168e
    • J
      Merge branch 'sb/merge-commit-msg-hook' · d4d262d1
      Junio C Hamano 提交于
      As "git commit" to conclude a conflicted "git merge" honors the
      commit-msg hook, "git merge" that records a merge commit that
      cleanly auto-merges should, but it didn't.
      * sb/merge-commit-msg-hook (2017-09-22) 1 commit
      (merged to 'next' on 2017-09-25 at 096e0502a8)
      + Documentation/githooks: mention merge in commit-msg hook
      
      Add documentation for a topic that has recently graduated to the
      'master' branch.
      
      * sb/merge-commit-msg-hook:
        Documentation/githooks: mention merge in commit-msg hook
      d4d262d1
    • J
      Merge branch 'jt/fast-export-copy-modify-fix' · 8096e1d3
      Junio C Hamano 提交于
      "git fast-export" with -M/-C option issued "copy" instruction on a
      path that is simultaneously modified, which was incorrect.
      
      * jt/fast-export-copy-modify-fix:
        fast-export: do not copy from modified file
      8096e1d3
    • J
      Merge branch 'mk/describe-match-with-all' · 8c1bc7c2
      Junio C Hamano 提交于
      "git describe --match <pattern>" has been taught to play well with
      the "--all" option.
      
      * mk/describe-match-with-all:
        describe: teach --match to handle branches and remotes
      8c1bc7c2
    • J
      Merge branch 'jm/status-ignored-directory-optim' · 075bc9c7
      Junio C Hamano 提交于
      "git status --ignored", when noticing that a directory without any
      tracked path is ignored, still enumerated all the ignored paths in
      the directory, which is unnecessary.  The codepath has been
      optimized to avoid this overhead.
      
      * jm/status-ignored-directory-optim:
        Improve performance of git status --ignored
      075bc9c7
    • A
      doc: correct command formatting · 5e633326
      Adam Dinwoodie 提交于
      Leaving spaces around the `-delimeters for commands means asciidoc fails
      to parse them as the start of a literal string.  Remove an extraneous
      space that is causing a literal to not be formatted as such.
      Signed-off-by: NAdam Dinwoodie <adam@dinwoodie.org>
      Acked-by: NAndreas Heiduk <asheiduk@gmail.com>
      Reviewed-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      5e633326