1. 24 Sep, 2018 22 commits
  2. 21 Sep, 2018 3 commits
    • Derrick Stolee's avatar
      commit-reach: fix memory and flag leaks · 4067a646
      Derrick Stolee authored
      The can_all_from_reach_with_flag() method uses 'assign_flag' as a
      value we can use to mark objects temporarily during our commit walk.
      The intent is that these flags are removed from all objects before
      returning. However, this is not the case.
      
      The 'from' array could also contain objects that are not commits, and
      we mark those objects with 'assign_flag'. Add a loop to the 'cleanup'
      section that removes these markers.
      
      Also, we forgot to free() the memory for 'list', so add that to the
      'cleanup' section.
      Signed-off-by: default avatarDerrick Stolee <dstolee@microsoft.com>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      4067a646
    • Derrick Stolee's avatar
      commit-reach: properly peel tags · b67f6b26
      Derrick Stolee authored
      The can_all_from_reach_with_flag() algorithm was refactored in 4fbcca4e
      "commit-reach: make can_all_from_reach... linear" but incorrectly
      assumed that all objects provided were commits. During a fetch
      negotiation, ok_to_give_up() in upload-pack.c may provide unpeeled tags
      to the 'from' array. The current code creates a segfault.
      
      Add a direct call to can_all_from_reach_with_flag() in 'test-tool reach'
      and add a test in t6600-test-reach.sh that demonstrates this segfault.
      
      Correct the issue by peeling tags when investigating the initial list
      of objects in the 'from' array.
      Signed-off-by: default avatarJeff King <peff@peff.net>
      Signed-off-by: default avatarDerrick Stolee <dstolee@microsoft.com>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      b67f6b26
    • Duy Nguyen's avatar
      add: do not accept pathspec magic 'attr' · 84d938b7
      Duy Nguyen authored
      Commit b0db7046 (pathspec: allow querying for attributes -
      2017-03-13) adds new pathspec magic 'attr' but only with
      match_pathspec(). "git add" has some pathspec related code that still
      does not know about 'attr' and will bail out:
      
          $ git add ':(attr:foo)'
          fatal: BUG:dir.c:1584: unsupported magic 40
      
      A better solution would be making this code support 'attr'. But I
      don't know how much work is needed (I'm not familiar with this new
      magic). For now, let's simply reject this magic with a friendlier
      message:
      
          $ git add ':(attr:foo)'
          fatal: :(attr:foo): pathspec magic not supported by this command: 'attr'
      
      Update t6135 so that the expected error message is from the
      "graceful" rejection codepath, not "oops, we were supposed to reject
      the request to trigger this magic" codepath.
      
      Reported-by: smaudet@sebastianaudet.com
      Signed-off-by: Duy Nguyen's avatarNguyễn Thái Ngọc Duy <pclouds@gmail.com>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      84d938b7
  3. 20 Sep, 2018 3 commits
    • Junio C Hamano's avatar
      Merge branch 'ab/fetch-tags-noclobber' · 150f307a
      Junio C Hamano authored
      The rules used by "git push" and "git fetch" to determine if a ref
      can or cannot be updated were inconsistent; specifically, fetching
      to update existing tags were allowed even though tags are supposed
      to be unmoving anchoring points.  "git fetch" was taught to forbid
      updates to existing tags without the "--force" option.
      This is a backward incompatible change but in a good way; it may
      still need to be treated carefully.
      
      * ab/fetch-tags-noclobber:
        fetch doc: correct grammar in --force docs
        push doc: add spacing between two words
      150f307a
    • Junio C Hamano's avatar
      Merge branch 'bp/checkout-new-branch-optim' · dbc50fd6
      Junio C Hamano authored
      "git checkout -b newbranch [HEAD]" should not have to do as much as
      checking out a commit different from HEAD.  An attempt is made to
      optimize this special case.
      
      * bp/checkout-new-branch-optim:
        config doc: add missing list separator for checkout.optimizeNewBranch
      dbc50fd6
    • Ævar Arnfjörð Bjarmason's avatar
      fetch doc: correct grammar in --force docs · 73e94796
      Ævar Arnfjörð Bjarmason authored
      Correct a grammar error (saying "the receiving" made no sense) in the
      recently landed documentation added in my 0bc8d71b ("fetch: stop
      clobbering existing tags without --force", 2018-08-31) by rephrasing
      the sentence.  Also correct 'fetching work the same way' by s/work/&s/;
      Signed-off-by: Ævar Arnfjörð Bjarmason's avatarÆvar Arnfjörð Bjarmason <avarab@gmail.com>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      73e94796
  4. 19 Sep, 2018 2 commits
  5. 17 Sep, 2018 10 commits
    • Junio C Hamano's avatar
      Initial batch post 2.19 · 2d3b1c57
      Junio C Hamano authored
      2d3b1c57
    • Junio C Hamano's avatar
      Merge branch 'nd/bisect-show-list-fix' · 1966cda6
      Junio C Hamano authored
      Debugging aid update.
      
      * nd/bisect-show-list-fix:
        bisect.c: make show_list() build again
      1966cda6
    • Junio C Hamano's avatar
      Merge branch 'ab/fetch-tags-noclobber' · d39cab39
      Junio C Hamano authored
      The rules used by "git push" and "git fetch" to determine if a ref
      can or cannot be updated were inconsistent; specifically, fetching
      to update existing tags were allowed even though tags are supposed
      to be unmoving anchoring points.  "git fetch" was taught to forbid
      updates to existing tags without the "--force" option.
      
      * ab/fetch-tags-noclobber:
        fetch: stop clobbering existing tags without --force
        fetch: document local ref updates with/without --force
        push doc: correct lies about how push refspecs work
        push doc: move mention of "tag <tag>" later in the prose
        push doc: remove confusing mention of remote merger
        fetch tests: add a test for clobbering tag behavior
        push tests: use spaces in interpolated string
        push tests: make use of unused $1 in test description
        fetch: change "branch" to "reference" in --force -h output
      d39cab39
    • Junio C Hamano's avatar
      Merge branch 'es/worktree-forced-ops-fix' · 1c515bf7
      Junio C Hamano authored
      Fix a bug in which the same path could be registered under multiple
      worktree entries if the path was missing (for instance, was removed
      manually).  Also, as a convenience, expand the number of cases in
      which --force is applicable.
      
      * es/worktree-forced-ops-fix:
        doc-diff: force worktree add
        worktree: delete .git/worktrees if empty after 'remove'
        worktree: teach 'remove' to override lock when --force given twice
        worktree: teach 'move' to override lock when --force given twice
        worktree: teach 'add' to respect --force for registered but missing path
        worktree: disallow adding same path multiple times
        worktree: prepare for more checks of whether path can become worktree
        worktree: generalize delete_git_dir() to reduce code duplication
        worktree: move delete_git_dir() earlier in file for upcoming new callers
        worktree: don't die() in library function find_worktree()
      1c515bf7
    • Junio C Hamano's avatar
      Merge branch 'sg/doc-trace-appends' · 2af0b1c6
      Junio C Hamano authored
      Docfix.
      
      * sg/doc-trace-appends:
        Documentation/git.txt: clarify that GIT_TRACE=/path appends
      2af0b1c6
    • Junio C Hamano's avatar
      Merge branch 'jk/diff-rendered-docs' · 98509d0f
      Junio C Hamano authored
      Dev doc update.
      
      * jk/diff-rendered-docs:
        Revert "doc/Makefile: drop doc-diff worktree and temporary files on "make clean""
        doc/Makefile: drop doc-diff worktree and temporary files on "make clean"
        doc-diff: add --clean mode to remove temporary working gunk
        doc-diff: fix non-portable 'man' invocation
        doc-diff: always use oids inside worktree
        SubmittingPatches: mention doc-diff
      98509d0f
    • Junio C Hamano's avatar
      Merge branch 'jk/patch-corrupted-delta-fix' · 07703ae0
      Junio C Hamano authored
      Malformed or crafted data in packstream can make our code attempt
      to read or write past the allocated buffer and abort, instead of
      reporting an error, which has been fixed.
      
      * jk/patch-corrupted-delta-fix:
        t5303: use printf to generate delta bases
        patch-delta: handle truncated copy parameters
        patch-delta: consistently report corruption
        patch-delta: fix oob read
        t5303: test some corrupt deltas
        test-delta: read input into a heap buffer
      07703ae0
    • Junio C Hamano's avatar
      Merge branch 'ds/commit-graph-tests' · 06880cff
      Junio C Hamano authored
      We can now optionally run tests with commit-graph enabled.
      
      * ds/commit-graph-tests:
        commit-graph: define GIT_TEST_COMMIT_GRAPH
      06880cff
    • Junio C Hamano's avatar
      Merge branch 'jk/pack-objects-with-bitmap-fix' · b4583001
      Junio C Hamano authored
      Hotfix of the base topic.
      
      * jk/pack-objects-with-bitmap-fix:
        pack-bitmap: drop "loaded" flag
        traverse_bitmap_commit_list(): don't free result
        t5310: test delta reuse with bitmaps
        bitmap_has_sha1_in_uninteresting(): drop BUG check
      b4583001
    • Junio C Hamano's avatar
      Merge branch 'rs/mailinfo-format-flowed' · 6b472d9a
      Junio C Hamano authored
      "git mailinfo" used in "git am" learned to make a best-effort
      recovery of a patch corrupted by MUA that sends text/plain with
      format=flawed option.
      
      * rs/mailinfo-format-flowed:
        mailinfo: support format=flowed
      6b472d9a