]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
5 years agoMerge branch 'en/sequencer-empty-edit-result-aborts'
Junio C Hamano [Mon, 24 Sep 2018 17:30:52 +0000 (10:30 -0700)] 
Merge branch 'en/sequencer-empty-edit-result-aborts'

"git rebase" etc. in Git 2.19 fails to abort when given an empty
commit log message as result of editing, which has been corrected.

* en/sequencer-empty-edit-result-aborts:
  sequencer: fix --allow-empty-message behavior, make it smarter

5 years agoMerge branch 'ds/reachable'
Junio C Hamano [Mon, 24 Sep 2018 17:30:52 +0000 (10:30 -0700)] 
Merge branch 'ds/reachable'

Recent update broke the reachability algorithm when refs (e.g.
tags) that point at objects that are not commit were involved,
which has been fixed.

* ds/reachable:
  commit-reach: fix memory and flag leaks
  commit-reach: properly peel tags

5 years agoMerge branch 'nd/attr-pathspec-fix'
Junio C Hamano [Mon, 24 Sep 2018 17:30:51 +0000 (10:30 -0700)] 
Merge branch 'nd/attr-pathspec-fix'

"git add ':(attr:foo)'" is not supported and is supposed to be
rejected while the command line arguments are parsed, but we fail
to reject such a command line upfront.

* nd/attr-pathspec-fix:
  add: do not accept pathspec magic 'attr'

5 years agoMerge branch 'bw/protocol-v2'
Junio C Hamano [Mon, 24 Sep 2018 17:30:50 +0000 (10:30 -0700)] 
Merge branch 'bw/protocol-v2'

Doc fix.

* bw/protocol-v2:
  config: document value 2 for protocol.version

5 years agoMerge branch 'sb/string-list-remove-unused'
Junio C Hamano [Mon, 24 Sep 2018 17:30:50 +0000 (10:30 -0700)] 
Merge branch 'sb/string-list-remove-unused'

Code clean-up.

* sb/string-list-remove-unused:
  string-list: remove unused function print_string_list

5 years agoMerge branch 'jk/dev-build-format-security'
Junio C Hamano [Mon, 24 Sep 2018 17:30:49 +0000 (10:30 -0700)] 
Merge branch 'jk/dev-build-format-security'

Build tweak to help developers.

* jk/dev-build-format-security:
  config.mak.dev: add -Wformat-security

5 years agoMerge branch 'sg/t3701-tighten-trace'
Junio C Hamano [Mon, 24 Sep 2018 17:30:49 +0000 (10:30 -0700)] 
Merge branch 'sg/t3701-tighten-trace'

Test update.

* sg/t3701-tighten-trace:
  t3701-add-interactive: tighten the check of trace output

5 years agoMerge branch 'sb/diff-color-move-more'
Junio C Hamano [Mon, 24 Sep 2018 17:30:48 +0000 (10:30 -0700)] 
Merge branch 'sb/diff-color-move-more'

Bugfix.

* sb/diff-color-move-more:
  diff: fix --color-moved-ws=allow-indentation-change

5 years agoMerge branch 'en/rerere-multi-stage-1-fix'
Junio C Hamano [Mon, 24 Sep 2018 17:30:48 +0000 (10:30 -0700)] 
Merge branch 'en/rerere-multi-stage-1-fix'

A corner case bugfix in "git rerere" code.

* en/rerere-multi-stage-1-fix:
  rerere: avoid buffer overrun
  t4200: demonstrate rerere segfault on specially crafted merge

5 years agoMerge branch 'js/mingw-o-append'
Junio C Hamano [Mon, 24 Sep 2018 17:30:47 +0000 (10:30 -0700)] 
Merge branch 'js/mingw-o-append'

Further fix for O_APPEND emulation on Windows

* js/mingw-o-append:
  mingw: fix mingw_open_append to work with named pipes
  t0051: test GIT_TRACE to a windows named pipe

5 years agoMerge branch 'en/double-semicolon-fix'
Junio C Hamano [Mon, 24 Sep 2018 17:30:47 +0000 (10:30 -0700)] 
Merge branch 'en/double-semicolon-fix'

Code clean-up.

* en/double-semicolon-fix:
  Remove superfluous trailing semicolons

5 years agoMerge branch 'jk/reopen-tempfile-truncate'
Junio C Hamano [Mon, 24 Sep 2018 17:30:46 +0000 (10:30 -0700)] 
Merge branch 'jk/reopen-tempfile-truncate'

Fix for a long-standing bug that leaves the index file corrupt when
it shrinks during a partial commit.

* jk/reopen-tempfile-truncate:
  reopen_tempfile(): truncate opened file

5 years agoMerge branch 'bp/mv-submodules-with-fsmonitor'
Junio C Hamano [Mon, 24 Sep 2018 17:30:46 +0000 (10:30 -0700)] 
Merge branch 'bp/mv-submodules-with-fsmonitor'

When fsmonitor is in use, after operation on submodules updates
.gitmodules, we lost track of the fact that we did so and relied on
stale fsmonitor data.

* bp/mv-submodules-with-fsmonitor:
  git-mv: allow submodules and fsmonitor to work together

5 years agoMerge branch 'ds/format-patch-range-diff-test'
Junio C Hamano [Mon, 24 Sep 2018 17:30:45 +0000 (10:30 -0700)] 
Merge branch 'ds/format-patch-range-diff-test'

* ds/format-patch-range-diff-test:
  t3206-range-diff.sh: cover single-patch case

5 years agoMerge branch 'tb/void-check-attr'
Junio C Hamano [Mon, 24 Sep 2018 17:30:45 +0000 (10:30 -0700)] 
Merge branch 'tb/void-check-attr'

Code clean-up.

* tb/void-check-attr:
  Make git_check_attr() a void function

5 years agoMerge branch 'js/rebase-i-autosquash-fix'
Junio C Hamano [Mon, 24 Sep 2018 17:30:45 +0000 (10:30 -0700)] 
Merge branch 'js/rebase-i-autosquash-fix'

"git rebase -i" did not clear the state files correctly when a run
of "squash/fixup" is aborted and then the user manually amended the
commit instead, which has been corrected.

* js/rebase-i-autosquash-fix:
  rebase -i: be careful to wrap up fixup/squash chains
  rebase -i --autosquash: demonstrate a problem skipping the last squash

5 years agocommit-reach: fix memory and flag leaks
Derrick Stolee [Fri, 21 Sep 2018 15:05:27 +0000 (08:05 -0700)] 
commit-reach: fix memory and flag leaks

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: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-reach: properly peel tags
Derrick Stolee [Fri, 21 Sep 2018 15:05:26 +0000 (08:05 -0700)] 
commit-reach: properly peel tags

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: Jeff King <peff@peff.net>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoadd: do not accept pathspec magic 'attr'
Nguyễn Thái Ngọc Duy [Tue, 18 Sep 2018 17:31:59 +0000 (19:31 +0200)] 
add: do not accept pathspec magic 'attr'

Commit b0db704652 (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: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'ab/fetch-tags-noclobber'
Junio C Hamano [Thu, 20 Sep 2018 21:51:43 +0000 (14:51 -0700)] 
Merge branch 'ab/fetch-tags-noclobber'

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

5 years agoMerge branch 'bp/checkout-new-branch-optim'
Junio C Hamano [Thu, 20 Sep 2018 21:51:43 +0000 (14:51 -0700)] 
Merge branch 'bp/checkout-new-branch-optim'

"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

5 years agofetch doc: correct grammar in --force docs
Ævar Arnfjörð Bjarmason [Tue, 18 Sep 2018 05:47:39 +0000 (05:47 +0000)] 
fetch doc: correct grammar in --force docs

Correct a grammar error (saying "the receiving" made no sense) in the
recently landed documentation added in my 0bc8d71b99 ("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 <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agopush doc: add spacing between two words
Ævar Arnfjörð Bjarmason [Tue, 18 Sep 2018 05:47:38 +0000 (05:47 +0000)] 
push doc: add spacing between two words

Fix a formatting error introduced in my recently landed
fe802bd21e ("push doc: correct lies about how push refspecs work",
2018-08-31).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoconfig doc: add missing list separator for checkout.optimizeNewBranch
Ævar Arnfjörð Bjarmason [Tue, 18 Sep 2018 05:34:49 +0000 (05:34 +0000)] 
config doc: add missing list separator for checkout.optimizeNewBranch

The documentation added in fa655d8411 ("checkout: optimize "git
checkout -b <new_branch>"", 2018-08-16) didn't add the double-colon
needed for the labeled list separator, as a result the added
documentation all got squashed into one paragraph. Fix that by adding
the list separator.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoInitial batch post 2.19
Junio C Hamano [Mon, 17 Sep 2018 21:15:00 +0000 (14:15 -0700)] 
Initial batch post 2.19

5 years agoMerge branch 'nd/bisect-show-list-fix'
Junio C Hamano [Mon, 17 Sep 2018 20:54:00 +0000 (13:54 -0700)] 
Merge branch 'nd/bisect-show-list-fix'

Debugging aid update.

* nd/bisect-show-list-fix:
  bisect.c: make show_list() build again

5 years agoMerge branch 'ab/fetch-tags-noclobber'
Junio C Hamano [Mon, 17 Sep 2018 20:54:00 +0000 (13:54 -0700)] 
Merge branch 'ab/fetch-tags-noclobber'

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

5 years agoMerge branch 'es/worktree-forced-ops-fix'
Junio C Hamano [Mon, 17 Sep 2018 20:53:59 +0000 (13:53 -0700)] 
Merge branch 'es/worktree-forced-ops-fix'

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()

5 years agoMerge branch 'sg/doc-trace-appends'
Junio C Hamano [Mon, 17 Sep 2018 20:53:59 +0000 (13:53 -0700)] 
Merge branch 'sg/doc-trace-appends'

Docfix.

* sg/doc-trace-appends:
  Documentation/git.txt: clarify that GIT_TRACE=/path appends

5 years agoMerge branch 'jk/diff-rendered-docs'
Junio C Hamano [Mon, 17 Sep 2018 20:53:59 +0000 (13:53 -0700)] 
Merge branch 'jk/diff-rendered-docs'

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

5 years agoMerge branch 'jk/patch-corrupted-delta-fix'
Junio C Hamano [Mon, 17 Sep 2018 20:53:58 +0000 (13:53 -0700)] 
Merge branch 'jk/patch-corrupted-delta-fix'

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

5 years agoMerge branch 'ds/commit-graph-tests'
Junio C Hamano [Mon, 17 Sep 2018 20:53:58 +0000 (13:53 -0700)] 
Merge branch 'ds/commit-graph-tests'

We can now optionally run tests with commit-graph enabled.

* ds/commit-graph-tests:
  commit-graph: define GIT_TEST_COMMIT_GRAPH

5 years agoMerge branch 'jk/pack-objects-with-bitmap-fix'
Junio C Hamano [Mon, 17 Sep 2018 20:53:58 +0000 (13:53 -0700)] 
Merge branch 'jk/pack-objects-with-bitmap-fix'

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

5 years agoMerge branch 'rs/mailinfo-format-flowed'
Junio C Hamano [Mon, 17 Sep 2018 20:53:57 +0000 (13:53 -0700)] 
Merge branch 'rs/mailinfo-format-flowed'

"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

5 years agoMerge branch 'jk/cocci'
Junio C Hamano [Mon, 17 Sep 2018 20:53:57 +0000 (13:53 -0700)] 
Merge branch 'jk/cocci'

spatch transformation to replace boolean uses of !hashcmp() to
newly introduced oideq() is added, and applied, to regain
performance lost due to support of multiple hash algorithms.

* jk/cocci:
  show_dirstat: simplify same-content check
  read-cache: use oideq() in ce_compare functions
  convert hashmap comparison functions to oideq()
  convert "hashcmp() != 0" to "!hasheq()"
  convert "oidcmp() != 0" to "!oideq()"
  convert "hashcmp() == 0" to hasheq()
  convert "oidcmp() == 0" to oideq()
  introduce hasheq() and oideq()
  coccinelle: use <...> for function exclusion

5 years agoMerge branch 'tg/rerere-doc-updates'
Junio C Hamano [Mon, 17 Sep 2018 20:53:56 +0000 (13:53 -0700)] 
Merge branch 'tg/rerere-doc-updates'

Clarify a part of technical documentation for rerere.

* tg/rerere-doc-updates:
  rerere: add note about files with existing conflict markers
  rerere: mention caveat about unmatched conflict markers

5 years agoMerge branch 'es/format-patch-rangediff'
Junio C Hamano [Mon, 17 Sep 2018 20:53:56 +0000 (13:53 -0700)] 
Merge branch 'es/format-patch-rangediff'

"git format-patch" learned a new "--range-diff" option to explain
the difference between this version and the previous attempt in
the cover letter (or after the tree-dashes as a comment).

* es/format-patch-rangediff:
  format-patch: allow --range-diff to apply to a lone-patch
  format-patch: add --creation-factor tweak for --range-diff
  format-patch: teach --range-diff to respect -v/--reroll-count
  format-patch: extend --range-diff to accept revision range
  format-patch: add --range-diff option to embed diff in cover letter
  range-diff: relieve callers of low-level configuration burden
  range-diff: publish default creation factor
  range-diff: respect diff_option.file rather than assuming 'stdout'

5 years agoMerge branch 'es/format-patch-interdiff'
Junio C Hamano [Mon, 17 Sep 2018 20:53:55 +0000 (13:53 -0700)] 
Merge branch 'es/format-patch-interdiff'

"git format-patch" learned a new "--interdiff" option to explain
the difference between this version and the previous atttempt in
the cover letter (or after the tree-dashes as a comment).

* es/format-patch-interdiff:
  format-patch: allow --interdiff to apply to a lone-patch
  log-tree: show_log: make commentary block delimiting reusable
  interdiff: teach show_interdiff() to indent interdiff
  format-patch: teach --interdiff to respect -v/--reroll-count
  format-patch: add --interdiff option to embed diff in cover letter
  format-patch: allow additional generated content in make_cover_letter()

5 years agoMerge branch 'cc/delta-islands'
Junio C Hamano [Mon, 17 Sep 2018 20:53:55 +0000 (13:53 -0700)] 
Merge branch 'cc/delta-islands'

Lift code from GitHub to restrict delta computation so that an
object that exists in one fork is not made into a delta against
another object that does not appear in the same forked repository.

* cc/delta-islands:
  pack-objects: move 'layer' into 'struct packing_data'
  pack-objects: move tree_depth into 'struct packing_data'
  t5320: tests for delta islands
  repack: add delta-islands support
  pack-objects: add delta-islands support
  pack-objects: refactor code into compute_layer_order()
  Add delta-islands.{c,h}

5 years agoMerge branch 'jk/trailer-fixes'
Junio C Hamano [Mon, 17 Sep 2018 20:53:54 +0000 (13:53 -0700)] 
Merge branch 'jk/trailer-fixes'

"git interpret-trailers" and its underlying machinery had a buggy
code that attempted to ignore patch text after commit log message,
which triggered in various codepaths that will always get the log
message alone and never get such an input.

* jk/trailer-fixes:
  append_signoff: use size_t for string offsets
  sequencer: ignore "---" divider when parsing trailers
  pretty, ref-filter: format %(trailers) with no_divider option
  interpret-trailers: allow suppressing "---" divider
  interpret-trailers: tighten check for "---" patch boundary
  trailer: pass process_trailer_opts to trailer_info_get()
  trailer: use size_t for iterating trailer list
  trailer: use size_t for string offsets

5 years agoMerge branch 'sb/range-diff-colors'
Junio C Hamano [Mon, 17 Sep 2018 20:53:54 +0000 (13:53 -0700)] 
Merge branch 'sb/range-diff-colors'

The color output support for recently introduced "range-diff"
command got tweaked a bit.

* sb/range-diff-colors:
  range-diff: indent special lines as context
  range-diff: make use of different output indicators
  diff.c: add --output-indicator-{new, old, context}
  diff.c: rewrite emit_line_0 more understandably
  diff.c: omit check for line prefix in emit_line_0
  diff: use emit_line_0 once per line
  diff.c: add set_sign to emit_line_0
  diff.c: reorder arguments for emit_line_ws_markup
  diff.c: simplify caller of emit_line_0
  t3206: add color test for range-diff --dual-color
  test_decode_color: understand FAINT and ITALIC

5 years agoMerge branch 'jk/pack-delta-reuse-with-bitmap'
Junio C Hamano [Mon, 17 Sep 2018 20:53:53 +0000 (13:53 -0700)] 
Merge branch 'jk/pack-delta-reuse-with-bitmap'

When creating a thin pack, which allows objects to be made into a
delta against another object that is not in the resulting pack but
is known to be present on the receiving end, the code learned to
take advantage of the reachability bitmap; this allows the server
to send a delta against a base beyond the "boundary" commit.

* jk/pack-delta-reuse-with-bitmap:
  pack-objects: reuse on-disk deltas for thin "have" objects
  pack-bitmap: save "have" bitmap from walk
  t/perf: add perf tests for fetches from a bitmapped server
  t/perf: add infrastructure for measuring sizes
  t/perf: factor out percent calculations
  t/perf: factor boilerplate out of test_perf

5 years agoMerge branch 'nd/unpack-trees-with-cache-tree'
Junio C Hamano [Mon, 17 Sep 2018 20:53:53 +0000 (13:53 -0700)] 
Merge branch 'nd/unpack-trees-with-cache-tree'

The unpack_trees() API used in checking out a branch and merging
walks one or more trees along with the index.  When the cache-tree
in the index tells us that we are walking a tree whose flattened
contents is known (i.e. matches a span in the index), as linearly
scanning a span in the index is much more efficient than having to
open tree objects recursively and listing their entries, the walk
can be optimized, which is done in this topic.

* nd/unpack-trees-with-cache-tree:
  Document update for nd/unpack-trees-with-cache-tree
  cache-tree: verify valid cache-tree in the test suite
  unpack-trees: add missing cache invalidation
  unpack-trees: reuse (still valid) cache-tree from src_index
  unpack-trees: reduce malloc in cache-tree walk
  unpack-trees: optimize walking same trees with cache-tree
  unpack-trees: add performance tracing
  trace.h: support nested performance tracing

5 years agoMerge branch 'ds/reachable'
Junio C Hamano [Mon, 17 Sep 2018 20:53:52 +0000 (13:53 -0700)] 
Merge branch 'ds/reachable'

The code for computing history reachability has been shuffled,
obtained a bunch of new tests to cover them, and then being
improved.

* ds/reachable:
  commit-reach: correct accidental #include of C file
  commit-reach: use can_all_from_reach
  commit-reach: make can_all_from_reach... linear
  commit-reach: replace ref_newer logic
  test-reach: test commit_contains
  test-reach: test can_all_from_reach_with_flags
  test-reach: test reduce_heads
  test-reach: test get_merge_bases_many
  test-reach: test is_descendant_of
  test-reach: test in_merge_bases
  test-reach: create new test tool for ref_newer
  commit-reach: move can_all_from_reach_with_flags
  upload-pack: generalize commit date cutoff
  upload-pack: refactor ok_to_give_up()
  upload-pack: make reachable() more generic
  commit-reach: move commit_contains from ref-filter
  commit-reach: move ref_newer from remote.c
  commit.h: remove method declarations
  commit-reach: move walk methods from commit.c

5 years agoMerge branch 'sb/submodule-update-in-c'
Junio C Hamano [Mon, 17 Sep 2018 20:53:51 +0000 (13:53 -0700)] 
Merge branch 'sb/submodule-update-in-c'

"git submodule update" is getting rewritten piece-by-piece into C.

* sb/submodule-update-in-c:
  submodule--helper: introduce new update-module-mode helper
  submodule--helper: replace connect-gitdir-workingtree by ensure-core-worktree
  builtin/submodule--helper: factor out method to update a single submodule
  builtin/submodule--helper: store update_clone information in a struct
  builtin/submodule--helper: factor out submodule updating
  git-submodule.sh: rename unused variables
  git-submodule.sh: align error reporting for update mode to use path

5 years agoMerge branch 'tg/rerere'
Junio C Hamano [Mon, 17 Sep 2018 20:53:51 +0000 (13:53 -0700)] 
Merge branch 'tg/rerere'

Fixes to "git rerere" corner cases, especially when conflict
markers cannot be parsed in the file.

* tg/rerere:
  rerere: recalculate conflict ID when unresolved conflict is committed
  rerere: teach rerere to handle nested conflicts
  rerere: return strbuf from handle path
  rerere: factor out handle_conflict function
  rerere: only return whether a path has conflicts or not
  rerere: fix crash with files rerere can't handle
  rerere: add documentation for conflict normalization
  rerere: mark strings for translation
  rerere: wrap paths in output in sq
  rerere: lowercase error messages
  rerere: unify error messages when read_cache fails

5 years agoMerge branch 'ds/multi-pack-index'
Junio C Hamano [Mon, 17 Sep 2018 20:53:50 +0000 (13:53 -0700)] 
Merge branch 'ds/multi-pack-index'

When there are too many packfiles in a repository (which is not
recommended), looking up an object in these would require
consulting many pack .idx files; a new mechanism to have a single
file that consolidates all of these .idx files is introduced.

* ds/multi-pack-index: (32 commits)
  pack-objects: consider packs in multi-pack-index
  midx: test a few commands that use get_all_packs
  treewide: use get_all_packs
  packfile: add all_packs list
  midx: fix bug that skips midx with alternates
  midx: stop reporting garbage
  midx: mark bad packed objects
  multi-pack-index: store local property
  multi-pack-index: provide more helpful usage info
  midx: clear midx on repack
  packfile: skip loading index if in multi-pack-index
  midx: prevent duplicate packfile loads
  midx: use midx in approximate_object_count
  midx: use existing midx when writing new one
  midx: use midx in abbreviation calculations
  midx: read objects from multi-pack-index
  config: create core.multiPackIndex setting
  midx: write object offsets
  midx: write object id fanout chunk
  midx: write object ids in a chunk
  ...

5 years agoMerge branch 'jk/branch-l-1-repurpose'
Junio C Hamano [Mon, 17 Sep 2018 20:53:50 +0000 (13:53 -0700)] 
Merge branch 'jk/branch-l-1-repurpose'

Updated plan to repurpose the "-l" option to "git branch".

* jk/branch-l-1-repurpose:
  doc/git-branch: remove obsolete "-l" references
  branch: make "-l" a synonym for "--list"

5 years agoMerge branch 'tg/conflict-marker-size'
Junio C Hamano [Mon, 17 Sep 2018 20:53:49 +0000 (13:53 -0700)] 
Merge branch 'tg/conflict-marker-size'

Developer aid.

* tg/conflict-marker-size:
  .gitattributes: add conflict-marker-size for relevant files

5 years agoMerge branch 'ts/doc-build-manpage-xsl-quietly'
Junio C Hamano [Mon, 17 Sep 2018 20:53:49 +0000 (13:53 -0700)] 
Merge branch 'ts/doc-build-manpage-xsl-quietly'

Build tweak.

* ts/doc-build-manpage-xsl-quietly:
  Documentation/Makefile: make manpage-base-url.xsl generation quieter

5 years agoMerge branch 'jk/rev-list-stdin-noop-is-ok'
Junio C Hamano [Mon, 17 Sep 2018 20:53:48 +0000 (13:53 -0700)] 
Merge branch 'jk/rev-list-stdin-noop-is-ok'

"git rev-list --stdin </dev/null" used to be an error; it now shows
no output without an error.  "git rev-list --stdin --default HEAD"
still falls back to the given default when nothing is given on the
standard input.

* jk/rev-list-stdin-noop-is-ok:
  rev-list: make empty --stdin not an error

5 years agoMerge branch 'bp/checkout-new-branch-optim'
Junio C Hamano [Mon, 17 Sep 2018 20:53:48 +0000 (13:53 -0700)] 
Merge branch 'bp/checkout-new-branch-optim'

"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:
  checkout: optimize "git checkout -b <new_branch>"

5 years agoMerge branch 'sg/t1404-update-ref-test-timeout'
Junio C Hamano [Mon, 17 Sep 2018 20:53:47 +0000 (13:53 -0700)] 
Merge branch 'sg/t1404-update-ref-test-timeout'

An attempt to unflake a test a bit.

* sg/t1404-update-ref-test-timeout:
  t1404: increase core.packedRefsTimeout to avoid occasional test failure

5 years agoMerge branch 'nd/clone-case-smashing-warning'
Junio C Hamano [Mon, 17 Sep 2018 20:53:47 +0000 (13:53 -0700)] 
Merge branch 'nd/clone-case-smashing-warning'

Running "git clone" against a project that contain two files with
pathnames that differ only in cases on a case insensitive
filesystem would result in one of the files lost because the
underlying filesystem is incapable of holding both at the same
time.  An attempt is made to detect such a case and warn.

* nd/clone-case-smashing-warning:
  clone: report duplicate entries on case-insensitive filesystems

5 years agoMerge branch 'mk/http-backend-content-length'
Junio C Hamano [Mon, 17 Sep 2018 20:53:46 +0000 (13:53 -0700)] 
Merge branch 'mk/http-backend-content-length'

Test update.

* mk/http-backend-content-length:
  http-backend test: make empty CONTENT_LENGTH test more realistic

5 years agoRevert "doc/Makefile: drop doc-diff worktree and temporary files on "make clean""
Junio C Hamano [Mon, 17 Sep 2018 19:46:18 +0000 (12:46 -0700)] 
Revert "doc/Makefile: drop doc-diff worktree and temporary files on "make clean""

This reverts commit 6f924265a0bf6efa677e9a684cebdde958e5ba06, which
started to require that we have an executable git available in order
to say "make clean", which gives us a chicken-and-egg problem.

Having to have Git installed, or be in a repository, in order to be
able to run an optional "doc-diff" tool is fine.  Requiring either
in order to run "make clean" is a different story.

Reported by Jonathan Nieder <jrnieder@gmail.com>.

5 years agosequencer: fix --allow-empty-message behavior, make it smarter
Elijah Newren [Wed, 12 Sep 2018 21:18:48 +0000 (14:18 -0700)] 
sequencer: fix --allow-empty-message behavior, make it smarter

In commit b00bf1c9a8dd ("git-rebase: make --allow-empty-message the
default", 2018-06-27), several arguments were given for transplanting
empty commits without halting and asking the user for confirmation on
each commit.  These arguments were incomplete because the logic clearly
assumed the only cases under consideration were transplanting of commits
with empty messages (see the comment about "There are two sources for
commits with empty messages).  It didn't discuss or even consider
rewords, squashes, etc. where the user is explicitly asked for a new
commit message and provides an empty one.  (My bad, I totally should
have thought about that at the time, but just didn't.)

Rewords and squashes are significantly different, though, as described
by SZEDER:

    Let's suppose you start an interactive rebase, choose a commit to
    squash, save the instruction sheet, rebase fires up your editor, and
    then you notice that you mistakenly chose the wrong commit to
    squash.  What do you do, how do you abort?

    Before [that commit] you could clear the commit message, exit the
    editor, and then rebase would say "Aborting commit due to empty
    commit message.", and you get to run 'git rebase --abort', and start
    over.

    But [since that commit, ...] saving the commit message as is would
    let rebase continue and create a bunch of unnecessary objects, and
    then you would have to use the reflog to return to the pre-rebase
    state.

Also, he states:

    The instructions in the commit message template, which is shown for
    'reword' and 'squash', too, still say...

    # Please enter the commit message for your changes. Lines starting
    # with '#' will be ignored, and an empty message aborts the commit.

These are sound arguments that when editing commit messages during a
sequencer operation, that if the commit message is empty then the
operation should halt and ask the user to correct.  The arguments in
commit b00bf1c9a8dd (referenced above) still apply when transplanting
previously created commits with empty commit messages, so the sequencer
should not halt for those.

Furthermore, all rationale so far applies equally for cherry-pick as for
rebase.  Therefore, make the code default to --allow-empty-message when
transplanting an existing commit, and to default to halting when the
user is asked to edit a commit message and provides an empty one -- for
both rebase and cherry-pick.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMake git_check_attr() a void function
Torsten Bögershausen [Wed, 12 Sep 2018 19:32:02 +0000 (21:32 +0200)] 
Make git_check_attr() a void function

git_check_attr() returns always 0.
Remove all the error handling code of the callers, which is never executed.
Change git_check_attr() to be a void function.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot3206-range-diff.sh: cover single-patch case
Derrick Stolee [Wed, 12 Sep 2018 14:31:03 +0000 (07:31 -0700)] 
t3206-range-diff.sh: cover single-patch case

The commit 40ce4160 "format-patch: allow --range-diff to apply to
a lone-patch" added the ability to see a range-diff as commentary
after the commit message of a single patch series (i.e. [PATCH]
instead of [PATCH X/N]). However, this functionality was not
covered by a test case.

Add a simple test case that checks that a range-diff is written as
commentary to the patch.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agogit-mv: allow submodules and fsmonitor to work together
Ben Peart [Mon, 10 Sep 2018 16:29:29 +0000 (16:29 +0000)] 
git-mv: allow submodules and fsmonitor to work together

It was reported that

   GIT_FSMONITOR_TEST=$PWD/t7519/fsmonitor-all ./t7411-submodule-config.sh

breaks as the fsmonitor data is out of sync with the state of the .gitmodules
file. Update is_staging_gitmodules_ok() so that it no longer tells
ie_match_stat() to ignore refreshing the fsmonitor data.

Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Helped-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Ben Peart <benpeart@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agohttp-backend test: make empty CONTENT_LENGTH test more realistic
Max Kirillov [Tue, 11 Sep 2018 20:33:36 +0000 (23:33 +0300)] 
http-backend test: make empty CONTENT_LENGTH test more realistic

This is a test of smart HTTP, so it should use the smart HTTP endpoints
(e.g. /info/refs?service=git-receive-pack), not dumb HTTP (HEAD).

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Max Kirillov <max@max630.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agomingw: fix mingw_open_append to work with named pipes
Jeff Hostetler [Tue, 11 Sep 2018 20:06:02 +0000 (13:06 -0700)] 
mingw: fix mingw_open_append to work with named pipes

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot0051: test GIT_TRACE to a windows named pipe
Jeff Hostetler [Tue, 11 Sep 2018 20:06:01 +0000 (13:06 -0700)] 
t0051: test GIT_TRACE to a windows named pipe

Create a test-tool helper to create the server side of
a windows named pipe, wait for a client connection, and
copy data written to the pipe to stdout.

Create t0051 test to route GIT_TRACE output of a command
to a named pipe using the above test-tool helper.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agorerere: avoid buffer overrun
Elijah Newren [Tue, 11 Sep 2018 18:55:46 +0000 (11:55 -0700)] 
rerere: avoid buffer overrun

check_one_conflict() compares `i` to `active_nr` in two places to avoid
buffer overruns, but left out an important third location.

The code did used to have a check here comparing i to active_nr, back
before commit fb70a06da2f1 ("rerere: fix an off-by-one non-bug",
2015-06-28), however the code at the time used an 'if' rather than a
'while' meaning back then that this loop could not have read past the
end of the array, making the check unnecessary and it was removed.
Unfortunately, in commit 5eda906b2873 ("rerere: handle conflicts with
multiple stage #1 entries", 2015-07-24), the 'if' was changed to a
'while' and the check comparing i and active_nr was not re-instated,
leading to this problem.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot4200: demonstrate rerere segfault on specially crafted merge
Elijah Newren [Tue, 11 Sep 2018 18:55:45 +0000 (11:55 -0700)] 
t4200: demonstrate rerere segfault on specially crafted merge

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff: fix --color-moved-ws=allow-indentation-change
Phillip Wood [Tue, 4 Sep 2018 13:52:58 +0000 (14:52 +0100)] 
diff: fix --color-moved-ws=allow-indentation-change

If there is more than one potential moved block and the longest block
is not the first element of the array of potential blocks then the
block is cut short. With --color-moved=blocks this can leave moved
lines unpainted if the shortened block does not meet the block length
requirement. With --color-moved=zebra then in addition to the
unpainted lines the moved color can change in the middle of a single
block.

Fix this by freeing the whitespace delta of the match we're discarding
rather than the one we're keeping.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Acked-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot3701-add-interactive: tighten the check of trace output
SZEDER Gábor [Mon, 10 Sep 2018 14:07:14 +0000 (16:07 +0200)] 
t3701-add-interactive: tighten the check of trace output

The test 'add -p does not expand argument lists' in
't3701-add-interactive.sh', added in 7288e12cce (add--interactive: do
not expand pathspecs with ls-files, 2017-03-14), checks the GIT_TRACE
of 'git add -p' to ensure that the name of a tracked file wasn't
passed around as argument to any of the commands executed as a result
of undesired pathspec expansion.  This check is done with 'grep' using
the filename on its own as the pattern, which is too loose a pattern,
and would match any occurrences of the filename in the trace output,
not just those as command arguments.  E.g. if a developer were to
litter the index handling code with trace_printf()s printing, among
other things, the name of the just processed cache entry, then that
pattern would mistakenly match these as well, and would fail the test.

Tighten this 'grep' pattern to only match trace lines that show the
executed commands.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoconfig.mak.dev: add -Wformat-security
Jeff King [Sat, 8 Sep 2018 16:23:31 +0000 (12:23 -0400)] 
config.mak.dev: add -Wformat-security

We currently build cleanly with -Wformat-security, and it's
a good idea to make sure we continue to do so (since calls
that trigger the warning may be security vulnerabilities).

Note that we cannot use the stronger -Wformat-nonliteral, as
there are case where we are clever with passing around
pointers to string literals. E.g., bisect_rev_setup() takes
bad_format and good_format parameters. These ultimately come
from literals, but they still trigger the warning.

Some of these might be fixable (e.g., by passing flags from
which we locally select a format), and might even be worth
fixing (not because of security, but just because it's an
easy mistake to pass the wrong format). But there are other
cases which are likely quite hard to fix (we actually
generate formats in a local buffer in some cases). So let's
punt on that for now and start with -Wformat-security, which
is supposed to catch the most important cases.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agostring-list: remove unused function print_string_list
Stefan Beller [Tue, 11 Sep 2018 18:48:50 +0000 (11:48 -0700)] 
string-list: remove unused function print_string_list

A removal of this helper function was proposed 3 years ago [1]; the
function was never used since it was introduced in 2006 back then,
and there is no new callers since.  Now time has proven we really do
not need the function.

[1] https://public-inbox.org/git/1421343725-3973-1-git-send-email-kuleshovmail@gmail.com/

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoconfig: document value 2 for protocol.version
Brandon Williams [Mon, 10 Sep 2018 21:21:57 +0000 (14:21 -0700)] 
config: document value 2 for protocol.version

Update the config documentation to note the value `2` as an acceptable
value for the protocol.version config.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Josh Steadmon <steadmon@google.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoGit 2.19 v2.19.0
Junio C Hamano [Mon, 10 Sep 2018 17:41:56 +0000 (10:41 -0700)] 
Git 2.19

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge tag 'l10n-2.19.0-rnd2' of git://github.com/git-l10n/git-po
Junio C Hamano [Mon, 10 Sep 2018 17:41:11 +0000 (10:41 -0700)] 
Merge tag 'l10n-2.19.0-rnd2' of git://github.com/git-l10n/git-po

l10n for Git 2.19.0 round 2

* tag 'l10n-2.19.0-rnd2' of git://github.com/git-l10n/git-po:
  l10n: zh_CN: for git v2.19.0 l10n round 1 to 2
  l10n: bg.po: Updated Bulgarian translation (3958t)
  l10n: vi.po(3958t): updated Vietnamese translation v2.19.0 round 2
  l10n: es.po v2.19.0 round 2
  l10n: fr.po v2.19.0 rnd 2
  l10n: fr.po v2.19.0 rnd 1
  l10n: fr: fix a message seen in git bisect
  l10n: sv.po: Update Swedish translation (3958t0f0u)
  l10n: git.pot: v2.19.0 round 2 (3 new, 5 removed)
  l10n: ru.po: update Russian translation
  l10n: git.pot: v2.19.0 round 1 (382 new, 30 removed)
  l10n: de.po: translate 108 new messages
  l10n: zh_CN: review for git 2.18.0
  l10n: sv.po: Update Swedish translation(3608t0f0u)

5 years agoMerge branch 'jn/submodule-core-worktree-revert'
Junio C Hamano [Mon, 10 Sep 2018 17:38:58 +0000 (10:38 -0700)] 
Merge branch 'jn/submodule-core-worktree-revert'

* jn/submodule-core-worktree-revert:
  Revert "Merge branch 'sb/submodule-core-worktree'"

5 years agoMerge branch 'mk/http-backend-content-length'
Junio C Hamano [Mon, 10 Sep 2018 17:29:16 +0000 (10:29 -0700)] 
Merge branch 'mk/http-backend-content-length'

The earlier attempt barfed when given a CONTENT_LENGTH that is
set to an empty string.  RFC 3875 is fairly clear that in this
case we should not read any message body, but we've been reading
through to the EOF in previous versions (which did not even pay
attention to the environment variable), so keep that behaviour for
now in this late update.

* mk/http-backend-content-length:
  http-backend: allow empty CONTENT_LENGTH

5 years agol10n: zh_CN: for git v2.19.0 l10n round 1 to 2
Jiang Xin [Tue, 21 Aug 2018 00:40:05 +0000 (08:40 +0800)] 
l10n: zh_CN: for git v2.19.0 l10n round 1 to 2

Translate 382 new messages (3958t0f0u) for git 2.19.0.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
5 years agoMerge branch 'master' of git://github.com/alshopov/git-po
Jiang Xin [Sun, 9 Sep 2018 11:05:41 +0000 (19:05 +0800)] 
Merge branch 'master' of git://github.com/alshopov/git-po

* 'master' of git://github.com/alshopov/git-po:
  l10n: bg.po: Updated Bulgarian translation (3958t)

5 years agol10n: bg.po: Updated Bulgarian translation (3958t)
Alexander Shopov [Thu, 9 Aug 2018 15:04:10 +0000 (17:04 +0200)] 
l10n: bg.po: Updated Bulgarian translation (3958t)

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
5 years agoRevert "Merge branch 'sb/submodule-core-worktree'"
Jonathan Nieder [Sat, 8 Sep 2018 00:09:46 +0000 (17:09 -0700)] 
Revert "Merge branch 'sb/submodule-core-worktree'"

This reverts commit 7e25437d35a70791b345872af202eabfb3e1a8bc, reversing
changes made to 00624d608cc69bd62801c93e74d1ea7a7ddd6598.

v2.19.0-rc0~165^2~1 (submodule: ensure core.worktree is set after
update, 2018-06-18) assumes an "absorbed" submodule layout, where the
submodule's Git directory is in the superproject's .git/modules/
directory and .git in the submodule worktree is a .git file pointing
there.  In particular, it uses $GIT_DIR/modules/$name to find the
submodule to find out whether it already has core.worktree set, and it
uses connect_work_tree_and_git_dir if not, resulting in

fatal: could not open sub/.git for writing

The context behind that patch: v2.19.0-rc0~165^2~2 (submodule: unset
core.worktree if no working tree is present, 2018-06-12) unsets
core.worktree when running commands like "git checkout
--recurse-submodules" to switch to a branch without the submodule.  If
a user then uses "git checkout --no-recurse-submodules" to switch back
to a branch with the submodule and runs "git submodule update", this
patch is needed to ensure that commands using the submodule directly
are aware of the path to the worktree.

It is late in the release cycle, so revert the whole 3-patch series.
We can try again later for 2.20.

Reported-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Helped-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agohttp-backend: allow empty CONTENT_LENGTH
Max Kirillov [Fri, 7 Sep 2018 03:36:07 +0000 (06:36 +0300)] 
http-backend: allow empty CONTENT_LENGTH

According to RFC3875, empty environment variable is equivalent to unset,
and for CONTENT_LENGTH it should mean zero body to read.

However, unset CONTENT_LENGTH is also used for chunked encoding to indicate
reading until EOF. At least, the test "large fetch-pack requests can be split
across POSTs" from t5551 starts faliing, if unset or empty CONTENT_LENGTH is
treated as zero length body. So keep the existing behavior as much as possible.

Add a test for the case.

Reported-By: Jelmer Vernooij <jelmer@jelmer.uk>
Signed-off-by: Max Kirillov <max@max630.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agol10n: vi.po(3958t): updated Vietnamese translation v2.19.0 round 2
Tran Ngoc Quan [Fri, 7 Sep 2018 06:41:08 +0000 (13:41 +0700)] 
l10n: vi.po(3958t): updated Vietnamese translation v2.19.0 round 2

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
5 years agol10n: es.po v2.19.0 round 2
Christopher Diaz Riveros [Thu, 6 Sep 2018 09:27:56 +0000 (04:27 -0500)] 
l10n: es.po v2.19.0 round 2

Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org>
5 years agoMerge branch 'fr_2.19.0_rnd1' of git://github.com/jnavila/git
Jiang Xin [Thu, 6 Sep 2018 01:17:55 +0000 (09:17 +0800)] 
Merge branch 'fr_2.19.0_rnd1' of git://github.com/jnavila/git

* 'fr_2.19.0_rnd1' of git://github.com/jnavila/git:
  l10n: fr.po v2.19.0 rnd 2
  l10n: fr.po v2.19.0 rnd 1
  l10n: fr: fix a message seen in git bisect

5 years agol10n: fr.po v2.19.0 rnd 2
Jean-Noël Avila [Wed, 5 Sep 2018 20:19:13 +0000 (22:19 +0200)] 
l10n: fr.po v2.19.0 rnd 2

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
5 years agol10n: fr.po v2.19.0 rnd 1
Jean-Noël Avila [Thu, 23 Aug 2018 20:50:52 +0000 (22:50 +0200)] 
l10n: fr.po v2.19.0 rnd 1

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
5 years agol10n: fr: fix a message seen in git bisect
Raphaël Hertzog [Wed, 4 Jul 2018 15:43:56 +0000 (17:43 +0200)] 
l10n: fr: fix a message seen in git bisect

"cette" can be only be used before a word (like in "cette bouteille" for
"this bottle"), but here "this" refers to the current step and we have
to use "ceci" in French.

Signed-off-by: Raphaël Hertzog <hertzog@debian.org>
5 years agodoc-diff: force worktree add
Jeff King [Thu, 30 Aug 2018 07:54:31 +0000 (03:54 -0400)] 
doc-diff: force worktree add

We avoid re-creating our temporary worktree if it's already
there. But we may run into a situation where the worktree
has been deleted, but an entry still exists in
$GIT_DIR/worktrees.

Older versions of git-worktree would annoyingly create a
series of duplicate entries. Recent versions now detect and
prevent this, allowing you to override with "-f". Since we
know that the worktree in question was just our temporary
workspace, it's safe for us to always pass "-f".

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoRemove superfluous trailing semicolons
Elijah Newren [Wed, 5 Sep 2018 17:03:07 +0000 (10:03 -0700)] 
Remove superfluous trailing semicolons

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoreopen_tempfile(): truncate opened file
Jeff King [Tue, 4 Sep 2018 23:36:43 +0000 (19:36 -0400)] 
reopen_tempfile(): truncate opened file

We provide a reopen_tempfile() function, which is in turn
used by reopen_lockfile().  The idea is that a caller may
want to rewrite the tempfile without letting go of the lock.
And that's what our one caller does: after running
add--interactive, "commit -p" will update the cache-tree
extension of the index and write out the result, all while
holding the lock.

However, because we open the file with only the O_WRONLY
flag, the existing index content is left in place, and we
overwrite it starting at position 0. If the new index after
updating the cache-tree is smaller than the original, those
final bytes are not overwritten and remain in the file. This
results in a corrupt index, since those cruft bytes are
interpreted as part of the trailing hash (or even as an
extension, if there are enough bytes).

This bug actually pre-dates reopen_tempfile(); the original
code from 9c4d6c0297 (cache-tree: Write updated cache-tree
after commit, 2014-07-13) has the same bug, and those lines
were eventually refactored into the tempfile module. Nobody
noticed until now for two reasons:

 - the bug can only be triggered in interactive mode
   ("commit -p" or "commit -i")

 - the size of the index must shrink after updating the
   cache-tree, which implies a non-trivial deletion. Notice
   that the included test actually has to create a 2-deep
   hierarchy. A single level is not enough to actually cause
   shrinkage.

The fix is to truncate the file before writing out the
second index. We can do that at the caller by using
ftruncate(). But we shouldn't have to do that. There is no
other place in Git where we want to open a file and
overwrite bytes, making reopen_tempfile() a confusing and
error-prone interface. Let's pass O_TRUNC there, which gives
callers the same state they had after initially opening the
file or lock.

It's possible that we could later add a caller that wants
something else (e.g., to open with O_APPEND). But this is
the only caller we've had in the history of the codebase.
Let's punt on doing anything more clever until another one
comes along.

Reported-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agol10n: sv.po: Update Swedish translation (3958t0f0u)
Peter Krefting [Tue, 4 Sep 2018 21:34:09 +0000 (22:34 +0100)] 
l10n: sv.po: Update Swedish translation (3958t0f0u)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
5 years agoGit 2.19-rc2 v2.19.0-rc2
Junio C Hamano [Tue, 4 Sep 2018 21:33:27 +0000 (14:33 -0700)] 
Git 2.19-rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'es/chain-lint-more'
Junio C Hamano [Tue, 4 Sep 2018 21:31:40 +0000 (14:31 -0700)] 
Merge branch 'es/chain-lint-more'

The test linter code has learned that the end of here-doc mark
"EOF" can be quoted in a double-quote pair, not just in a
single-quote pair.

* es/chain-lint-more:
  chainlint: match "quoted" here-doc tags

5 years agoMerge branch 'ab/portable-more'
Junio C Hamano [Tue, 4 Sep 2018 21:31:40 +0000 (14:31 -0700)] 
Merge branch 'ab/portable-more'

Portability fix.

* ab/portable-more:
  tests: fix non-portable iconv invocation
  tests: fix non-portable "${var:-"str"}" construct
  tests: fix and add lint for non-portable grep --file
  tests: fix version-specific portability issue in Perl JSON
  tests: use shorter labels in chainlint.sed for AIX sed
  tests: fix comment syntax in chainlint.sed for AIX sed
  tests: fix and add lint for non-portable seq
  tests: fix and add lint for non-portable head -c N

5 years agoMerge branch 'es/freebsd-iconv-portability'
Junio C Hamano [Tue, 4 Sep 2018 21:31:39 +0000 (14:31 -0700)] 
Merge branch 'es/freebsd-iconv-portability'

Build fix.

* es/freebsd-iconv-portability:
  config.mak.uname: resolve FreeBSD iconv-related compilation warning

5 years agoMerge branch 'ds/commit-graph-lockfile-fix'
Junio C Hamano [Tue, 4 Sep 2018 21:31:39 +0000 (14:31 -0700)] 
Merge branch 'ds/commit-graph-lockfile-fix'

"git merge-base" in 2.19-rc1 has performance regression when the
(experimental) commit-graph feature is in use, which has been
mitigated.

* ds/commit-graph-lockfile-fix:
  commit: don't use generation numbers if not needed

5 years agoMerge branch 'en/directory-renames-nothanks'
Junio C Hamano [Tue, 4 Sep 2018 21:31:38 +0000 (14:31 -0700)] 
Merge branch 'en/directory-renames-nothanks'

Recent addition of "directory rename" heuristics to the
merge-recursive backend makes the command susceptible to false
positives and false negatives.  In the context of "git am -3",
which does not know about surrounding unmodified paths and thus
cannot inform the merge machinery about the full trees involved,
this risk is particularly severe.  As such, the heuristic is
disabled for "git am -3" to keep the machinery "more stupid but
predictable".

* en/directory-renames-nothanks:
  am: avoid directory rename detection when calling recursive merge machinery
  merge-recursive: add ability to turn off directory rename detection
  t3401: add another directory rename testcase for rebase and am

5 years agoMerge branch 'pw/rebase-i-author-script-fix'
Junio C Hamano [Tue, 4 Sep 2018 21:31:38 +0000 (14:31 -0700)] 
Merge branch 'pw/rebase-i-author-script-fix'

Recent "git rebase -i" update started to write bogusly formatted
author-script, with a matching broken reading code.  These are
fixed.

* pw/rebase-i-author-script-fix:
  sequencer: fix quoting in write_author_script
  sequencer: handle errors from read_author_ident()

5 years agoDocumentation/git.txt: clarify that GIT_TRACE=/path appends
SZEDER Gábor [Tue, 4 Sep 2018 00:05:44 +0000 (02:05 +0200)] 
Documentation/git.txt: clarify that GIT_TRACE=/path appends

The current wording of the description of GIT_TRACE=/path/to/file
("... will try to write the trace messages into it") might be
misunderstood as "overwriting"; at least I interpreted it that way on
a cursory first read.

State it more explicitly that the trace messages are appended.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agobisect.c: make show_list() build again
Nguyễn Thái Ngọc Duy [Sun, 2 Sep 2018 07:42:50 +0000 (09:42 +0200)] 
bisect.c: make show_list() build again

This function only compiles when DEBUG_BISECT is 1, which is often not
the case. As a result there are two commits [1] [2] that break it but
the breakages went unnoticed because the code did not compile by
default. Update the function and include the new header file to make this
function build again.

In order to stop this from happening again, the function is now
compiled unconditionally but exits early unless DEBUG_BISECT is
non-zero. A smart compiler generates no extra code (not even a
function call). But even if it does not, this function does not seem
to be in a hot path that the extra cost becomes a big problem.

[1] bb408ac95d (bisect.c: use commit-slab for commit weight instead of
    commit->util - 2018-05-19)

[2] cbd53a2193 (object-store: move object access functions to
    object-store.h - 2018-05-15)

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agorebase -i: be careful to wrap up fixup/squash chains
Johannes Schindelin [Fri, 31 Aug 2018 23:45:04 +0000 (16:45 -0700)] 
rebase -i: be careful to wrap up fixup/squash chains

When an interactive rebase was stopped at the end of a fixup/squash
chain, the user might have edited the commit manually before continuing
(with either `git rebase --skip` or `git rebase --continue`, it does not
really matter which).

We need to be very careful to wrap up the fixup/squash chain also in
this scenario: otherwise the next fixup/squash chain would try to pick
up where the previous one was left.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
5 years agorebase -i --autosquash: demonstrate a problem skipping the last squash
Johannes Schindelin [Fri, 31 Aug 2018 23:45:02 +0000 (16:45 -0700)] 
rebase -i --autosquash: demonstrate a problem skipping the last squash

The `git commit --squash` command can be used not only to amend commit
messages and changes, but also to record notes for an upcoming rebase.

For example, when the author information of a given commit is incorrect,
a user might call `git commit --allow-empty -m "Fix author" --squash
<commit>`, to remind them to fix that during the rebase. When the editor
would pop up, the user would simply delete the commit message to abort
the rebase at this stage, fix the author information, and continue with
`git rebase --skip`. (This is a real-world example from the rebase of
Git for Windows onto v2.19.0-rc1.)

However, there is a bug in `git rebase` that will cause the squash
message *not* to be forgotten in this case. It will therefore be reused
in the next fixup/squash chain (if any).

This patch adds a test case to demonstrate this breakage.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>