]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
5 years agocommit-reach: fix first-parent heuristic
Derrick Stolee [Thu, 18 Oct 2018 17:24:40 +0000 (10:24 -0700)] 
commit-reach: fix first-parent heuristic

The algorithm in can_all_from_reach_with_flags() performs a depth-
first-search, terminated by generation number, intending to use
a hueristic that "important" commits are found in the first-parent
history. This heuristic is valuable in scenarios like fetch
negotiation.

However, there is a problem! After the search finds a target commit,
it should pop all commits off the stack and mark them as "can reach".
This logic is incorrect, so the algorithm instead walks all reachable
commits above the generation-number cutoff.

The existing algorithm is still an improvement over the previous
algorithm, as the worst-case complexity went from quadratic to linear.
The performance measurement at the time was good, but not dramatic.
By fixing this heuristic, we reduce the number of walked commits.

We can also re-run the performance tests from commit 4fbcca4e
"commit-reach: make can_all_from_reach... linear".

Performance was measured on the Linux repository using
'test-tool reach can_all_from_reach'. The input included rows seeded by
tag values. The "small" case included X-rows as v4.[0-9]* and Y-rows as
v3.[0-9]*. This mimics a (very large) fetch that says "I have all major
v3 releases and want all major v4 releases." The "large" case included
X-rows as "v4.*" and Y-rows as "v3.*". This adds all release-candidate
tags to the set, which does not greatly increase the number of objects
that are considered, but does increase the number of 'from' commits,
demonstrating the quadratic nature of the previous code.

Small Case:

4fbcca4e~1: 0.85 s
  4fbcca4e: 0.26 s (num_walked: 1,011,035)
      HEAD: 0.14 s (num_walked:     8,601)

Large Case:

4fbcca4e~1: 24.0  s
  4fbcca4e:  0.12 s (num_walked:  503,925)
      HEAD:  0.06 s (num_walked:  217,243)

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoFourth batch for 2.20
Junio C Hamano [Tue, 16 Oct 2018 07:21:17 +0000 (16:21 +0900)] 
Fourth batch for 2.20

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'sf/complete-stash-list'
Junio C Hamano [Tue, 16 Oct 2018 07:16:09 +0000 (16:16 +0900)] 
Merge branch 'sf/complete-stash-list'

The completion script (in contrib/) learned to complete a handful of
options "git stash list" command takes.

* sf/complete-stash-list:
  git-completion.bash: add completion for stash list

5 years agoMerge branch 'mw/doc-typofixes'
Junio C Hamano [Tue, 16 Oct 2018 07:16:09 +0000 (16:16 +0900)] 
Merge branch 'mw/doc-typofixes'

Typofixes.

* mw/doc-typofixes:
  docs: typo: s/isimilar/similar/
  docs: graph: remove unnecessary `graph_update()' call
  docs: typo: s/go/to/

5 years agoMerge branch 'js/mingw-wants-vista-or-above'
Junio C Hamano [Tue, 16 Oct 2018 07:16:08 +0000 (16:16 +0900)] 
Merge branch 'js/mingw-wants-vista-or-above'

The minimum version of Windows supported by Windows port fo Git is
now set to Vista.

* js/mingw-wants-vista-or-above:
  mingw: bump the minimum Windows version to Vista
  mingw: set _WIN32_WINNT explicitly for Git for Windows
  compat/poll: prepare for targeting Windows Vista

5 years agoMerge branch 'rs/sequencer-oidset-insert-avoids-dups'
Junio C Hamano [Tue, 16 Oct 2018 07:16:08 +0000 (16:16 +0900)] 
Merge branch 'rs/sequencer-oidset-insert-avoids-dups'

Code clean-up.

* rs/sequencer-oidset-insert-avoids-dups:
  sequencer: use return value of oidset_insert()

5 years agoMerge branch 'jk/oideq-hasheq-cleanup'
Junio C Hamano [Tue, 16 Oct 2018 07:16:07 +0000 (16:16 +0900)] 
Merge branch 'jk/oideq-hasheq-cleanup'

Code clean-up.

* jk/oideq-hasheq-cleanup:
  more oideq/hasheq conversions

5 years agoMerge branch 'ma/mailing-list-address-in-git-help'
Junio C Hamano [Tue, 16 Oct 2018 07:16:07 +0000 (16:16 +0900)] 
Merge branch 'ma/mailing-list-address-in-git-help'

Doc update.

* ma/mailing-list-address-in-git-help:
  git doc: direct bug reporters to mailing list archive

5 years agoMerge branch 'nd/packobjectshook-doc-fix'
Junio C Hamano [Tue, 16 Oct 2018 07:16:07 +0000 (16:16 +0900)] 
Merge branch 'nd/packobjectshook-doc-fix'

Doc update.

* nd/packobjectshook-doc-fix:
  config.txt: correct the note about uploadpack.packObjectsHook

5 years agoMerge branch 'rt/rebase-typofix'
Junio C Hamano [Tue, 16 Oct 2018 07:16:06 +0000 (16:16 +0900)] 
Merge branch 'rt/rebase-typofix'

Typofix.

* rt/rebase-typofix:
  git-rebase.sh: fix typos in error messages

5 years agoMerge branch 'ma/t1400-undebug-test'
Junio C Hamano [Tue, 16 Oct 2018 07:16:06 +0000 (16:16 +0900)] 
Merge branch 'ma/t1400-undebug-test'

Test fix.

* ma/t1400-undebug-test:
  t1400: drop debug `echo` to actually execute `test`

5 years agoMerge branch 'ma/commit-graph-docs'
Junio C Hamano [Tue, 16 Oct 2018 07:16:05 +0000 (16:16 +0900)] 
Merge branch 'ma/commit-graph-docs'

Doc update.

* ma/commit-graph-docs:
  Doc: refer to the "commit-graph file" with dash
  git-commit-graph.txt: refer to "*commit*-graph file"
  git-commit-graph.txt: typeset more in monospace
  git-commit-graph.txt: fix bullet lists

5 years agoMerge branch 'dz/credential-doc-url-matching-rules'
Junio C Hamano [Tue, 16 Oct 2018 07:16:05 +0000 (16:16 +0900)] 
Merge branch 'dz/credential-doc-url-matching-rules'

Doc update.

* dz/credential-doc-url-matching-rules:
  doc: clarify gitcredentials path component matching

5 years agoMerge branch 'en/status-multiple-renames-to-the-same-target-fix'
Junio C Hamano [Tue, 16 Oct 2018 07:16:05 +0000 (16:16 +0900)] 
Merge branch 'en/status-multiple-renames-to-the-same-target-fix'

The code in "git status" sometimes hit an assertion failure.  This
was caused by a structure that was reused without cleaning the data
used for the first run, which has been corrected.

* en/status-multiple-renames-to-the-same-target-fix:
  commit: fix erroneous BUG, 'multiple renames on the same target? how?'

5 years agoMerge branch 'ds/reachable-final-cleanup'
Junio C Hamano [Tue, 16 Oct 2018 07:16:04 +0000 (16:16 +0900)] 
Merge branch 'ds/reachable-final-cleanup'

Code already in 'master' is further cleaned-up by this patch.

* ds/reachable-final-cleanup:
  commit-reach: cleanups in can_all_from_reach...

5 years agoMerge branch 'jk/check-everything-connected-is-long-gone'
Junio C Hamano [Tue, 16 Oct 2018 07:16:04 +0000 (16:16 +0900)] 
Merge branch 'jk/check-everything-connected-is-long-gone'

Comment fix.

* jk/check-everything-connected-is-long-gone:
  receive-pack: update comment with check_everything_connected

5 years agoMerge branch 'jn/gc-auto'
Junio C Hamano [Tue, 16 Oct 2018 07:16:02 +0000 (16:16 +0900)] 
Merge branch 'jn/gc-auto'

"gc --auto" ended up calling exit(-1) upon error, which has been
corrected to use exit(1).  Also the error reporting behaviour when
daemonized has been updated to exit with zero status when stopping
due to a previously discovered error (which implies there is no
point running gc to improve the situation); we used to exit with
failure in such a case.

* jn/gc-auto:
  gc: do not return error for prior errors in daemonized mode

5 years agoMerge branch 'jn/gc-auto-prep'
Junio C Hamano [Tue, 16 Oct 2018 07:16:02 +0000 (16:16 +0900)] 
Merge branch 'jn/gc-auto-prep'

Code clean-up.

* jn/gc-auto-prep:
  gc: exit with status 128 on failure
  gc: improve handling of errors reading gc.log

5 years agoMerge branch 'md/test-cleanup'
Junio C Hamano [Tue, 16 Oct 2018 07:16:01 +0000 (16:16 +0900)] 
Merge branch 'md/test-cleanup'

Various test scripts have been updated for style and also correct
handling of exit status of various commands.

* md/test-cleanup:
  tests: order arguments to git-rev-list properly
  t9109: don't swallow Git errors upstream of pipes
  tests: don't swallow Git errors upstream of pipes
  t/*: fix ordering of expected/observed arguments
  tests: standardize pipe placement
  Documentation: add shell guidelines
  t/README: reformat Do, Don't, Keep in mind lists

5 years agoMerge branch 'fe/doc-updates'
Junio C Hamano [Tue, 16 Oct 2018 07:16:01 +0000 (16:16 +0900)] 
Merge branch 'fe/doc-updates'

Doc updates.

* fe/doc-updates:
  git-describe.1: clarify that "human readable" is also git-readable
  git-column.1: clarify initial description, provide examples
  git-archimport.1: specify what kind of Arch we're talking about

5 years agoMerge branch 'jn/mailmap-update'
Junio C Hamano [Tue, 16 Oct 2018 07:16:01 +0000 (16:16 +0900)] 
Merge branch 'jn/mailmap-update'

The mailmap file update.

* jn/mailmap-update:
  mailmap: consistently normalize brian m. carlson's name

5 years agoMerge branch 'tg/t5551-with-curl-7.61.1'
Junio C Hamano [Tue, 16 Oct 2018 07:16:00 +0000 (16:16 +0900)] 
Merge branch 'tg/t5551-with-curl-7.61.1'

Test update.

* tg/t5551-with-curl-7.61.1:
  t5551: compare sorted cookies files
  t5551: move setup code inside test_expect blocks

5 years agoMerge branch 'en/merge-cleanup'
Junio C Hamano [Tue, 16 Oct 2018 07:16:00 +0000 (16:16 +0900)] 
Merge branch 'en/merge-cleanup'

Code clean-up.

* en/merge-cleanup:
  merge-recursive: rename merge_file_1() and merge_content()
  merge-recursive: remove final remaining caller of merge_file_one()
  merge-recursive: avoid wrapper function when unnecessary and wasteful
  merge-recursive: set paths correctly when three-way merging content

5 years agoMerge branch 'rj/header-check'
Junio C Hamano [Tue, 16 Oct 2018 07:16:00 +0000 (16:16 +0900)] 
Merge branch 'rj/header-check'

Header files clean-up.

* rj/header-check:
  delta-islands.h: add missing forward declarations (hdr-check)
  midx.h: add missing forward declarations (hdr-check)
  refs/refs-internal.h: add missing declarations (hdr-check)
  refs/packed-backend.h: add missing declaration (hdr-check)
  refs/ref-cache.h: add missing declarations (hdr-check)
  ewah/ewok_rlw.h: add missing include (hdr-check)
  json-writer.h: add missing include (hdr-check)
  Makefile: add a hdr-check target

5 years agoMerge branch 'ma/config-doc-update'
Junio C Hamano [Tue, 16 Oct 2018 07:16:00 +0000 (16:16 +0900)] 
Merge branch 'ma/config-doc-update'

Doc update.

* ma/config-doc-update:
  git-config.txt: fix 'see: above' note
  Doc: use `--type=bool` instead of `--bool`

5 years agoMerge branch 'jk/delta-islands-with-bitmap-reuse-delta-fix'
Junio C Hamano [Tue, 16 Oct 2018 07:16:00 +0000 (16:16 +0900)] 
Merge branch 'jk/delta-islands-with-bitmap-reuse-delta-fix'

Fix interactions between two recent topics.

* jk/delta-islands-with-bitmap-reuse-delta-fix:
  pack-objects: handle island check for "external" delta base

5 years agoMerge branch 'tq/refs-internal-comment-fix'
Junio C Hamano [Tue, 16 Oct 2018 07:15:59 +0000 (16:15 +0900)] 
Merge branch 'tq/refs-internal-comment-fix'

Fix for typo in a sample code in comment.

* tq/refs-internal-comment-fix:
  refs: docstring typo

5 years agoMerge branch 'ts/alias-of-alias'
Junio C Hamano [Tue, 16 Oct 2018 07:15:59 +0000 (16:15 +0900)] 
Merge branch 'ts/alias-of-alias'

An alias that expands to another alias has so far been forbidden,
but now it is allowed to create such an alias.

* ts/alias-of-alias:
  t0014: introduce an alias testing suite
  alias: show the call history when an alias is looping
  alias: add support for aliases of an alias

5 years agoMerge branch 'ds/commit-graph-with-grafts'
Junio C Hamano [Tue, 16 Oct 2018 07:15:59 +0000 (16:15 +0900)] 
Merge branch 'ds/commit-graph-with-grafts'

The recently introduced commit-graph auxiliary data is incompatible
with mechanisms such as replace & grafts that "breaks" immutable
nature of the object reference relationship.  Disable optimizations
based on its use (and updating existing commit-graph) when these
incompatible features are in use in the repository.

* ds/commit-graph-with-grafts:
  commit-graph: close_commit_graph before shallow walk
  commit-graph: not compatible with uninitialized repo
  commit-graph: not compatible with grafts
  commit-graph: not compatible with replace objects
  test-repository: properly init repo
  commit-graph: update design document
  refs.c: upgrade for_each_replace_ref to be a each_repo_ref_fn callback
  refs.c: migrate internal ref iteration to pass thru repository argument

5 years agoMerge branch 'ab/commit-graph-progress'
Junio C Hamano [Tue, 16 Oct 2018 07:15:58 +0000 (16:15 +0900)] 
Merge branch 'ab/commit-graph-progress'

Generation of (experimental) commit-graph files have so far been
fairly silent, even though it takes noticeable amount of time in a
meaningfully large repository.  The users will now see progress
output.

* ab/commit-graph-progress:
  gc: fix regression in 7b0f229222 impacting --quiet
  commit-graph verify: add progress output
  commit-graph write: add progress output

5 years agoThird batch for 2.20
Junio C Hamano [Wed, 10 Oct 2018 03:38:03 +0000 (12:38 +0900)] 
Third batch for 2.20

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'ab/fsck-skiplist'
Junio C Hamano [Wed, 10 Oct 2018 03:37:16 +0000 (12:37 +0900)] 
Merge branch 'ab/fsck-skiplist'

Update fsck.skipList implementation and documentation.

* ab/fsck-skiplist:
  fsck: support comments & empty lines in skipList
  fsck: use oidset instead of oid_array for skipList
  fsck: use strbuf_getline() to read skiplist file
  fsck: add a performance test for skipList
  fsck: add a performance test
  fsck: document that skipList input must be unabbreviated
  fsck: document and test commented & empty line skipList input
  fsck: document and test sorted skipList input
  fsck tests: add a test for no skipList input
  fsck tests: setup of bogus commit object

5 years agoMerge branch 'ds/multi-pack-verify'
Junio C Hamano [Wed, 10 Oct 2018 03:37:16 +0000 (12:37 +0900)] 
Merge branch 'ds/multi-pack-verify'

"git multi-pack-index" learned to detect corruption in the .midx
file it uses, and this feature has been integrated into "git fsck".

* ds/multi-pack-verify:
  fsck: verify multi-pack-index
  multi-pack-index: report progress during 'verify'
  multi-pack-index: verify object offsets
  multi-pack-index: fix 32-bit vs 64-bit size check
  multi-pack-index: verify oid lookup order
  multi-pack-index: verify oid fanout order
  multi-pack-index: verify missing pack
  multi-pack-index: verify packname order
  multi-pack-index: verify corrupt chunk lookup table
  multi-pack-index: verify bad header
  multi-pack-index: add 'verify' verb

5 years agoMerge branch 'bc/hash-independent-tests'
Junio C Hamano [Wed, 10 Oct 2018 03:37:16 +0000 (12:37 +0900)] 
Merge branch 'bc/hash-independent-tests'

Various tests have been updated to make it easier to swap the
hash function used for object identification.

* bc/hash-independent-tests:
  t5318: use test_oid for HASH_LEN
  t1407: make hash size independent
  t1406: make hash-size independent
  t1405: make hash size independent
  t1400: switch hard-coded object ID to variable
  t1006: make hash size independent
  t0064: make hash size independent
  t0002: abstract away SHA-1 specific constants
  t0000: update tests for SHA-256
  t0000: use hash translation table
  t: add test functions to translate hash-related values

5 years agoMerge branch 'nd/test-tool'
Junio C Hamano [Wed, 10 Oct 2018 03:37:16 +0000 (12:37 +0900)] 
Merge branch 'nd/test-tool'

Test helper binaries clean-up.

* nd/test-tool:
  Makefile: add a hint about TEST_BUILTINS_OBJS
  t/helper: merge test-dump-fsmonitor into test-tool
  t/helper: merge test-parse-options into test-tool
  t/helper: merge test-pkt-line into test-tool
  t/helper: merge test-dump-untracked-cache into test-tool
  t/helper: keep test-tool command list sorted

5 years agoMerge branch 'nd/config-split'
Junio C Hamano [Wed, 10 Oct 2018 03:37:15 +0000 (12:37 +0900)] 
Merge branch 'nd/config-split'

Split Documentation/config.txt for easier maintenance.

* nd/config-split:
  config.txt: move submodule part out to a separate file
  config.txt: move sequence.editor out of "core" part
  config.txt: move sendemail part out to a separate file
  config.txt: move receive part out to a separate file
  config.txt: move push part out to a separate file
  config.txt: move pull part out to a separate file
  config.txt: move gui part out to a separate file
  config.txt: move gitcvs part out to a separate file
  config.txt: move format part out to a separate file
  config.txt: move fetch part out to a separate file
  config.txt: follow camelCase naming

5 years agoDeclare that the next one will be named 2.20
Junio C Hamano [Wed, 10 Oct 2018 00:20:03 +0000 (09:20 +0900)] 
Declare that the next one will be named 2.20

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodocs: typo: s/isimilar/similar/
Michael Witten [Sat, 6 Oct 2018 04:20:22 +0000 (04:20 +0000)] 
docs: typo: s/isimilar/similar/

Signed-off-by: Michael Witten <mfwitten@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodocs: graph: remove unnecessary `graph_update()' call
Michael Witten [Sat, 6 Oct 2018 04:20:16 +0000 (04:20 +0000)] 
docs: graph: remove unnecessary `graph_update()' call

The sample code calls `get_revision()' followed by `graph_update()',
but the documentation and source code indicate that `get_revision()'
already calls `graph_update()' for you.

Signed-off-by: Michael Witten <mfwitten@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodocs: typo: s/go/to/
Michael Witten [Sat, 6 Oct 2018 04:20:09 +0000 (04:20 +0000)] 
docs: typo: s/go/to/

Signed-off-by: Michael Witten <mfwitten@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agogit-completion.bash: add completion for stash list
Steven Fernandez [Thu, 27 Sep 2018 19:59:00 +0000 (20:59 +0100)] 
git-completion.bash: add completion for stash list

Since stash list accepts git-log options, add the following useful
options that make sense in the context of the `git stash list` command:

  --name-status --oneline --patch-with-stat

Signed-off-by: Steven Fernandez <steve@lonetwin.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agotests: order arguments to git-rev-list properly
Matthew DeVore [Fri, 5 Oct 2018 21:54:07 +0000 (14:54 -0700)] 
tests: order arguments to git-rev-list properly

It is a common mistake to put positional arguments before flags when
invoking git-rev-list. Order the positional arguments last.

This patch skips git-rev-list invocations which include the --not flag,
since the ordering of flags and positional arguments affects the
behavior. This patch also skips invocations of git-rev-list that occur
in command substitution in which the exit code is discarded, since
fixing those properly will require a more involved cleanup.

Signed-off-by: Matthew DeVore <matvore@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot9109: don't swallow Git errors upstream of pipes
Matthew DeVore [Fri, 5 Oct 2018 21:54:06 +0000 (14:54 -0700)] 
t9109: don't swallow Git errors upstream of pipes

'git ... | foo' will mask any errors or crashes in git, so split up such
pipes in this file.

One testcase uses several separate pipe sequences in a row which are
awkward to split up. Wrap the split-up pipe in a function so the
awkwardness is not repeated. Also change that testcase's surrounding
quotes from double to single to avoid premature string interpolation.

Signed-off-by: Matthew DeVore <matvore@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agotests: don't swallow Git errors upstream of pipes
Matthew DeVore [Fri, 5 Oct 2018 21:54:05 +0000 (14:54 -0700)] 
tests: don't swallow Git errors upstream of pipes

Some pipes in tests lose the exit code of git processes, which can mask
unexpected behavior like crashes. Split these pipes up so that git
commands are only at the end of pipes rather than the beginning or
middle.

The violations fixed in this patch were found in the process of fixing
pipe placement in a prior patch.

Signed-off-by: Matthew DeVore <matvore@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot/*: fix ordering of expected/observed arguments
Matthew DeVore [Fri, 5 Oct 2018 21:54:04 +0000 (14:54 -0700)] 
t/*: fix ordering of expected/observed arguments

Fix various places where the ordering was obviously wrong, meaning it
was easy to find with grep.

Signed-off-by: Matthew DeVore <matvore@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agotests: standardize pipe placement
Matthew DeVore [Fri, 5 Oct 2018 21:54:03 +0000 (14:54 -0700)] 
tests: standardize pipe placement

Instead of using a line-continuation and pipe on the second line, take
advantage of the shell's implicit line continuation after a pipe
character.  So for example, instead of

some long line \
| next line

use

some long line |
next line

And add a blank line before and after the pipe where it aids readability
(it usually does).

This better matches the coding style documented in
Documentation/CodingGuidelines and used in shell scripts elsewhere in
the tree.

Signed-off-by: Matthew DeVore <matvore@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoDocumentation: add shell guidelines
Matthew DeVore [Fri, 5 Oct 2018 21:54:02 +0000 (14:54 -0700)] 
Documentation: add shell guidelines

Add the following guideline to Documentation/CodingGuidelines:

Break overlong lines after "&&", "||", and "|", not before
them; that way the command can continue to subsequent lines
without backslash at the end.

And the following to t/README (since it is specific to writing tests):

Pipes and $(git ...) should be avoided when they swallow exit
codes of Git processes

Signed-off-by: Matthew DeVore <matvore@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot/README: reformat Do, Don't, Keep in mind lists
Matthew DeVore [Fri, 5 Oct 2018 21:54:01 +0000 (14:54 -0700)] 
t/README: reformat Do, Don't, Keep in mind lists

The list of Don'ts for test writing has grown large such that it is hard
to see at a glance which section an item is in. In other words, if I
ignore a little bit of surrounding context, the "don'ts" look like
"do's."

To make the list more readable, prefix "Don't" in front of every first
sentence in the items.

Also, the "Keep in mind" list is out of place and awkward, because it
was a very short "list" beneath two very long ones, and it seemed easy
to miss under the list of "don'ts," and it only had one item. So move
this item to the list of "do's" and phrase as "Remember..."

Signed-off-by: Matthew DeVore <matvore@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agomingw: bump the minimum Windows version to Vista
Johannes Schindelin [Wed, 3 Oct 2018 19:43:44 +0000 (12:43 -0700)] 
mingw: bump the minimum Windows version to Vista

Quite some time ago, a last plea to the XP users out there who want to
see Windows XP support in Git for Windows, asking them to get engaged
and help, vanished into the depths of the universe.

We tried for a long time to play nice with the last remaining XP users
who somehow manage to build Git from source, but a recent update of
mingw-w64 (7.0.0.5233.e0c09544 -> 7.0.0.5245.edf66197) finally dropped
the last sign of XP support, and Git for Windows' SDK is no longer able
to build core Git's `master` branch as a consequence. (Git for Windows'
`master` branch already bumped the minimum Windows version to Vista a
while ago, so it is fine.)

It is time to require Windows Vista or later to build Git from source.
This, incidentally, lets us use quite a few nice new APIs.

It also means that we no longer need the inet_pton() and inet_ntop()
emulation, which is nice.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agomingw: set _WIN32_WINNT explicitly for Git for Windows
Johannes Schindelin [Wed, 3 Oct 2018 19:43:43 +0000 (12:43 -0700)] 
mingw: set _WIN32_WINNT explicitly for Git for Windows

Previously, we only ever declared a target Windows version if compiling
with Visual C.

Which meant that we were relying on the MinGW headers to guess which
Windows version we want to target...

Let's be explicit about it, in particular because we actually want to
bump the target Windows version to Vista (which we will do in the next
commit).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocompat/poll: prepare for targeting Windows Vista
Johannes Schindelin [Wed, 3 Oct 2018 19:43:41 +0000 (12:43 -0700)] 
compat/poll: prepare for targeting Windows Vista

Windows Vista (and later) actually have a working poll(), but we still
cannot use it because it only works on sockets.

So let's detect when we are targeting Windows Vista and undefine those
constants, and define `pollfd` so that we can declare our own pollfd
struct.

We also need to make sure that we override those constants *after*
`winsock2.h` has been `#include`d (otherwise we would not really
override those constants).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agomore oideq/hasheq conversions
Jeff King [Tue, 2 Oct 2018 21:19:21 +0000 (17:19 -0400)] 
more oideq/hasheq conversions

We added faster equality-comparison functions for hashes in
14438c4497 (introduce hasheq() and oideq(), 2018-08-28). A
few topics were in-flight at the time, and can now be
converted. This covers all spots found by "make coccicheck"
in master (the coccicheck results were tweaked by hand for
style).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agosequencer: use return value of oidset_insert()
René Scharfe [Wed, 3 Oct 2018 13:06:49 +0000 (15:06 +0200)] 
sequencer: use return value of oidset_insert()

oidset_insert() returns 1 if the object ID is already in the set and
doesn't add it again, or 0 if it hadn't been present.  Make use of that
fact instead of checking with an extra oidset_contains() call.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoconfig.txt: correct the note about uploadpack.packObjectsHook
Nguyễn Thái Ngọc Duy [Sat, 29 Sep 2018 06:50:56 +0000 (08:50 +0200)] 
config.txt: correct the note about uploadpack.packObjectsHook

Document for uploadpack.packObjectsHook is added in [1] and consists
of two paragraphs, the second one is quite important about where this
variable can stay.

When the paragraph about uploadpack.allowFilter is added in [2], it's
added in between the two paragraphs. This makes the "this is non-repo
level config" note incorrectly apply to allowFilter instead of
packObjectsHook. Move allowFilter paragraph down to fix this.

[1] 20b20a22f8 (upload-pack: provide a hook for running pack-objects -
    2016-05-18)

[2] 10ac85c785 (upload-pack: add object filtering for partial clone -
    2017-12-08)

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agogit doc: direct bug reporters to mailing list archive
Jonathan Nieder [Fri, 28 Sep 2018 21:20:49 +0000 (14:20 -0700)] 
git doc: direct bug reporters to mailing list archive

The mailing list archive can help a user encountering a bug to tell
whether a recent regression has already been reported and whether a
longstanding bug has already had some discussion to start their
thinking.

Based-on-patch-by: Martin Ågren <martin.agren@gmail.com>
Improved-by: Junio C Hamano <gitster@pobox.com>
Improved-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agogit-rebase.sh: fix typos in error messages
Ralf Thielow [Fri, 28 Sep 2018 19:28:49 +0000 (21:28 +0200)] 
git-rebase.sh: fix typos in error messages

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot1400: drop debug `echo` to actually execute `test`
Martin Ågren [Fri, 28 Sep 2018 15:43:59 +0000 (17:43 +0200)] 
t1400: drop debug `echo` to actually execute `test`

Instead of running `test "foo" = "$(bar)"`, we prefix the whole thing
with `echo`. Comparing to nearby tests makes it clear that this is just
debug leftover. This line has actually been modified four times since it
was introduced in e52290428b (General ref log reading improvements.,
2006-05-19) and the `echo` has always survived. Let's finally drop it.

This script could need some more cleanups. This is just an immediate fix
so that we actually test what we intend to.

All other hits for `git grep "\<echo test " -- t/` seem fine. They want
to create some input or expected output data.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoDoc: refer to the "commit-graph file" with dash
Martin Ågren [Thu, 27 Sep 2018 19:12:22 +0000 (21:12 +0200)] 
Doc: refer to the "commit-graph file" with dash

The file processed by `git commit-graph` is referred to as the
"commit-graph file", also with a dash. We have a few references to the
"commit graph file", though, without the dash. These occur in
git-commit-graph.txt as well as in Doc/technical/commit-graph.txt. Fix
them.

Do not change the references to the "commit graph" (without "... file")
as a data structure.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Reviewed-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agogit-commit-graph.txt: refer to "*commit*-graph file"
Martin Ågren [Thu, 27 Sep 2018 19:12:21 +0000 (21:12 +0200)] 
git-commit-graph.txt: refer to "*commit*-graph file"

This document sometimes refers to the "commit-graph file" as just "the
graph file". This saves a couple of words here and there at the risk of
confusion. In particular, the documentation for `git commit-graph read`
appears to suggest that there are indeed different types of graph files.

Let's just write out the full name everywhere.

The full name, by the way, is not the dash-less "commit graph file".
Use the dashed form. (The next commit will fix the remaining few
instances of the "commit graph file" in this document.)

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Reviewed-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agogit-commit-graph.txt: typeset more in monospace
Martin Ågren [Thu, 27 Sep 2018 19:12:20 +0000 (21:12 +0200)] 
git-commit-graph.txt: typeset more in monospace

While we're here, fix an instance of "folder" to be "directory".

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Reviewed-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agogit-commit-graph.txt: fix bullet lists
Martin Ågren [Thu, 27 Sep 2018 19:12:19 +0000 (21:12 +0200)] 
git-commit-graph.txt: fix bullet lists

We have a couple of bullet items which span multiple lines, and where we
have prefixed each line with a `*`. (This might be the result of a text
editor trying to help.) This results in each line being typeset as a
separate bullet item. Drop the extra `*`.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Reviewed-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodoc: clarify gitcredentials path component matching
David Zych [Wed, 26 Sep 2018 22:23:11 +0000 (22:23 +0000)] 
doc: clarify gitcredentials path component matching

The gitcredentials documentation implied that the config file's
"pattern" URL might include a path component, but did not explain that
it must match exactly (potentially leaving readers with the false hope
that it would support a more flexible prefix match).

Signed-off-by: David Zych <dmrz@illinois.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit: fix erroneous BUG, 'multiple renames on the same target? how?'
Elijah Newren [Thu, 27 Sep 2018 17:36:57 +0000 (10:36 -0700)] 
commit: fix erroneous BUG, 'multiple renames on the same target? how?'

builtin/commit.c:prepare_to_commit() can call run_status() twice if
using the editor, including status, and the user attempts to record a
non-merge empty commit without explicit --allow-empty.  If there is also
a rename involved as well (due to using 'git add -N'), then a BUG in
wt-status.c is triggered:

  BUG: wt-status.c:476: multiple renames on the same target? how?

The reason we hit this bug is that both run_status() calls use the same
struct wt_status * (named s), and s->change is not freed between runs.
Changes are inserted into s with string_list_insert, which usually means
that the second run just recomputes all the same results and overwrites
what was computed the first time.  However, ever since commit
176ea7479309 ("wt-status.c: handle worktree renames", 2017-12-27),
wt-status started checking for renames and copies but also added a
preventative check that d->rename_status wasn't already set and output a
BUG message if it was.  The problem isn't that there are multiple rename
targets to a single path as the error implies, the problem is that 's'
is not freed/cleared between the two run_status() calls.

Ever since commit dc6b1d92ca9c ("wt-status: use settings from
git_diff_ui_config", 2018-05-04), which stopped hardcoding
DIFF_DETECT_RENAME and allowed users to ask for copy detection, this bug
has also been triggerable with a copy instead of a rename.

Fix the bug by clearing s->change.  A better change might be to clean up
all of s between the two run_status() calls.  A good first step towards
such a goal might be writing a function to free the necessary fields in
the wt_status * struct; a cursory glance at the code suggests all of its
allocated data is probably leaked.  However, doing all that cleanup is a
bigger task for someone else interested to tackle; just fix the bug for
now.

Reported-by: Andrea Stacchiotti <andreastacchiotti@gmail.com>
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoSync with 2.19.1
Junio C Hamano [Thu, 27 Sep 2018 18:53:39 +0000 (11:53 -0700)] 
Sync with 2.19.1

* maint:
  Git 2.19.1
  Git 2.18.1
  Git 2.17.2
  fsck: detect submodule paths starting with dash
  fsck: detect submodule urls starting with dash
  Git 2.16.5
  Git 2.15.3
  Git 2.14.5
  submodule-config: ban submodule paths that start with a dash
  submodule-config: ban submodule urls that start with dash
  submodule--helper: use "--" to signal end of clone options

5 years agoGit 2.19.1 v2.19.1
Junio C Hamano [Thu, 27 Sep 2018 18:52:33 +0000 (11:52 -0700)] 
Git 2.19.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoSync with 2.18.1
Junio C Hamano [Thu, 27 Sep 2018 18:50:45 +0000 (11:50 -0700)] 
Sync with 2.18.1

* maint-2.18:
  Git 2.18.1
  Git 2.17.2
  fsck: detect submodule paths starting with dash
  fsck: detect submodule urls starting with dash
  Git 2.16.5
  Git 2.15.3
  Git 2.14.5
  submodule-config: ban submodule paths that start with a dash
  submodule-config: ban submodule urls that start with dash
  submodule--helper: use "--" to signal end of clone options

5 years agoGit 2.18.1 v2.18.1
Junio C Hamano [Thu, 27 Sep 2018 18:48:19 +0000 (11:48 -0700)] 
Git 2.18.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoSync with 2.17.2
Junio C Hamano [Thu, 27 Sep 2018 18:45:01 +0000 (11:45 -0700)] 
Sync with 2.17.2

* maint-2.17:
  Git 2.17.2
  fsck: detect submodule paths starting with dash
  fsck: detect submodule urls starting with dash
  Git 2.16.5
  Git 2.15.3
  Git 2.14.5
  submodule-config: ban submodule paths that start with a dash
  submodule-config: ban submodule urls that start with dash
  submodule--helper: use "--" to signal end of clone options

5 years agoGit 2.17.2 v2.17.2
Junio C Hamano [Thu, 27 Sep 2018 18:44:07 +0000 (11:44 -0700)] 
Git 2.17.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agofsck: detect submodule paths starting with dash
Jeff King [Mon, 24 Sep 2018 08:42:19 +0000 (04:42 -0400)] 
fsck: detect submodule paths starting with dash

As with urls, submodule paths with dashes are ignored by
git, but may end up confusing older versions. Detecting them
via fsck lets us prevent modern versions of git from being a
vector to spread broken .gitmodules to older versions.

Compared to blocking leading-dash urls, though, this
detection may be less of a good idea:

  1. While such paths provide confusing and broken results,
     they don't seem to actually work as option injections
     against anything except "cd". In particular, the
     submodule code seems to canonicalize to an absolute
     path before running "git clone" (so it passes
     /your/clone/-sub).

  2. It's more likely that we may one day make such names
     actually work correctly. Even after we revert this fsck
     check, it will continue to be a hassle until hosting
     servers are all updated.

On the other hand, it's not entirely clear that the behavior
in older versions is safe. And if we do want to eventually
allow this, we may end up doing so with a special syntax
anyway (e.g., writing "./-sub" in the .gitmodules file, and
teaching the submodule code to canonicalize it when
comparing).

So on balance, this is probably a good protection.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agofsck: detect submodule urls starting with dash
Jeff King [Mon, 24 Sep 2018 08:37:17 +0000 (04:37 -0400)] 
fsck: detect submodule urls starting with dash

Urls with leading dashes can cause mischief on older
versions of Git. We should detect them so that they can be
rejected by receive.fsckObjects, preventing modern versions
of git from being a vector by which attacks can spread.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoSync with 2.16.5
Junio C Hamano [Thu, 27 Sep 2018 18:41:02 +0000 (11:41 -0700)] 
Sync with 2.16.5

* maint-2.16:
  Git 2.16.5
  Git 2.15.3
  Git 2.14.5
  submodule-config: ban submodule paths that start with a dash
  submodule-config: ban submodule urls that start with dash
  submodule--helper: use "--" to signal end of clone options

5 years agoGit 2.16.5 v2.16.5
Junio C Hamano [Thu, 27 Sep 2018 18:38:32 +0000 (11:38 -0700)] 
Git 2.16.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoSync with 2.15.3
Junio C Hamano [Thu, 27 Sep 2018 18:35:43 +0000 (11:35 -0700)] 
Sync with 2.15.3

* maint-2.15:
  Git 2.15.3
  Git 2.14.5
  submodule-config: ban submodule paths that start with a dash
  submodule-config: ban submodule urls that start with dash
  submodule--helper: use "--" to signal end of clone options

5 years agoGit 2.15.3 v2.15.3
Junio C Hamano [Thu, 27 Sep 2018 18:33:47 +0000 (11:33 -0700)] 
Git 2.15.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoSync with Git 2.14.4
Junio C Hamano [Thu, 27 Sep 2018 18:20:22 +0000 (11:20 -0700)] 
Sync with Git 2.14.4

* maint-2.14:
  Git 2.14.5
  submodule-config: ban submodule paths that start with a dash
  submodule-config: ban submodule urls that start with dash
  submodule--helper: use "--" to signal end of clone options

5 years agoGit 2.14.5 v2.14.5
Junio C Hamano [Thu, 27 Sep 2018 18:19:11 +0000 (11:19 -0700)] 
Git 2.14.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agosubmodule-config: ban submodule paths that start with a dash
Jeff King [Mon, 24 Sep 2018 08:39:55 +0000 (04:39 -0400)] 
submodule-config: ban submodule paths that start with a dash

We recently banned submodule urls that look like
command-line options. This is the matching change to ban
leading-dash paths.

As with the urls, this should not break any use cases that
currently work. Even with our "--" separator passed to
git-clone, git-submodule.sh gets confused. Without the code
portion of this patch, the clone of "-sub" added in t7417
would yield results like:

    /path/to/git-submodule: 410: cd: Illegal option -s
    /path/to/git-submodule: 417: cd: Illegal option -s
    /path/to/git-submodule: 410: cd: Illegal option -s
    /path/to/git-submodule: 417: cd: Illegal option -s
    Fetched in submodule path '-sub', but it did not contain b56243f8f4eb91b2f1f8109452e659f14dd3fbe4. Direct fetching of that commit failed.

Moreover, naively adding such a submodule doesn't work:

  $ git submodule add $url -sub
  The following path is ignored by one of your .gitignore files:
  -sub

even though there is no such ignore pattern (the test script
hacks around this with a well-placed "git mv").

Unlike leading-dash urls, though, it's possible that such a
path _could_ be useful if we eventually made it work. So
this commit should be seen not as recommending a particular
policy, but rather temporarily closing off a broken and
possibly dangerous code-path. We may revisit this decision
later.

There are two minor differences to the tests in t7416 (that
covered urls):

  1. We don't have a "./-sub" escape hatch to make this
     work, since the submodule code expects to be able to
     match canonical index names to the path field (so you
     are free to add submodule config with that path, but we
     would never actually use it, since an index entry would
     never start with "./").

  2. After this patch, cloning actually succeeds. Since we
     ignore the submodule.*.path value, we fail to find a
     config stanza for our submodule at all, and simply
     treat it as inactive. We still check for the "ignoring"
     message.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agosubmodule-config: ban submodule urls that start with dash
Jeff King [Mon, 24 Sep 2018 08:36:30 +0000 (04:36 -0400)] 
submodule-config: ban submodule urls that start with dash

The previous commit taught the submodule code to invoke our
"git clone $url $path" with a "--" separator so that we
aren't confused by urls or paths that start with dashes.

However, that's just one code path. It's not clear if there
are others, and it would be an easy mistake to add one in
the future. Moreover, even with the fix in the previous
commit, it's quite hard to actually do anything useful with
such an entry. Any url starting with a dash must fall into
one of three categories:

 - it's meant as a file url, like "-path". But then any
   clone is not going to have the matching path, since it's
   by definition relative inside the newly created clone. If
   you spell it as "./-path", the submodule code sees the
   "/" and translates this to an absolute path, so it at
   least works (assuming the receiver has the same
   filesystem layout as you). But that trick does not apply
   for a bare "-path".

 - it's meant as an ssh url, like "-host:path". But this
   already doesn't work, as we explicitly disallow ssh
   hostnames that begin with a dash (to avoid option
   injection against ssh).

 - it's a remote-helper scheme, like "-scheme::data". This
   _could_ work if the receiver bends over backwards and
   creates a funny-named helper like "git-remote--scheme".
   But normally there would not be any helper that matches.

Since such a url does not work today and is not likely to do
anything useful in the future, let's simply disallow them
entirely. That protects the existing "git clone" path (in a
belt-and-suspenders way), along with any others that might
exist.

Our tests cover two cases:

  1. A file url with "./" continues to work, showing that
     there's an escape hatch for people with truly silly
     repo names.

  2. A url starting with "-" is rejected.

Note that we expect case (2) to fail, but it would have done
so even without this commit, for the reasons given above.
So instead of just expecting failure, let's also check for
the magic word "ignoring" on stderr. That lets us know that
we failed for the right reason.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agosubmodule--helper: use "--" to signal end of clone options
Jeff King [Mon, 24 Sep 2018 08:32:15 +0000 (04:32 -0400)] 
submodule--helper: use "--" to signal end of clone options

When we clone a submodule, we call "git clone $url $path".
But there's nothing to say that those components can't begin
with a dash themselves, confusing git-clone into thinking
they're options. Let's pass "--" to make it clear what we
expect.

There's no test here, because it's actually quite hard to
make these names work, even with "git clone" parsing them
correctly. And we're going to restrict these cases even
further in future commits. So we'll leave off testing until
then; this is just the minimal fix to prevent us from doing
something stupid with a badly formed entry.

Reported-by: joernchen <joernchen@phenoelit.de>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agomailmap: consistently normalize brian m. carlson's name
Jonathan Nieder [Mon, 24 Sep 2018 17:39:02 +0000 (10:39 -0700)] 
mailmap: consistently normalize brian m. carlson's name

v2.18.0-rc0~70^2 (mailmap: update brian m. carlson's email address,
2018-05-08) changed the mailmap to map

  sandals@crustytoothpaste.ath.cx
   -> brian m. carlson <sandals@crustytoothpaste.net>

instead of

  sandals@crustytoothpaste.net
    -> brian m. carlson <sandals@crustytoothpaste.ath.cx>

That means the mapping

  Brian M. Carlson <sandals@crustytoothpaste.ath.cx>
    -> brian m. carlson <sandals@crustytoothpaste.net>

is redundant, so we can remove it.  More importantly, it means that
the identity "Brian M. Carlson <sandals@crustytoothpaste.net>" used in
some commits is not normalized any more.  Add a mapping for it.

Noticed while updating Debian's Git packaging, which uses "git
shortlog --no-merges" to produce a list of changes in each version,
grouped by author's (normalized) name.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoreceive-pack: update comment with check_everything_connected
Jeff King [Fri, 21 Sep 2018 23:04:45 +0000 (19:04 -0400)] 
receive-pack: update comment with check_everything_connected

That function is now called "check_connected()", but we forgot to update
this comment in 7043c7071c (check_everything_connected: use a struct
with named options, 2016-07-15).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-reach: cleanups in can_all_from_reach...
Derrick Stolee [Tue, 25 Sep 2018 13:27:41 +0000 (13:27 +0000)] 
commit-reach: cleanups in can_all_from_reach...

Due to a regression introduced by 4fbcca4e "commit-reach: make
can_all_from_reach... linear" the series including b67f6b26
"commit-reach: properly peel tags" was merged to master quickly.

There were a few more cleanups left to apply in the series, which
are included by this change:

1. Clean up a comment that is in the incorrect style.

2. Replace multiple calls to clear_commit_marks() with one call to
   clear_commit_marks_many().

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoSecond batch post 2.19
Junio C Hamano [Mon, 24 Sep 2018 17:31:26 +0000 (10:31 -0700)] 
Second batch post 2.19

5 years agoMerge branch 'tg/range-diff-corner-case-fix'
Junio C Hamano [Mon, 24 Sep 2018 17:30:53 +0000 (10:30 -0700)] 
Merge branch 'tg/range-diff-corner-case-fix'

Recently added "range-diff" had a corner-case bug to cause it
segfault, which has been corrected.

* tg/range-diff-corner-case-fix:
  linear-assignment: fix potential out of bounds memory access

5 years agoMerge branch 'sg/split-index-test'
Junio C Hamano [Mon, 24 Sep 2018 17:30:53 +0000 (10:30 -0700)] 
Merge branch 'sg/split-index-test'

Test updates.

* sg/split-index-test:
  t0090: disable GIT_TEST_SPLIT_INDEX for the test checking split index
  t1700-split-index: drop unnecessary 'grep'

5 years agoMerge branch 'en/update-ref-no-deref-stdin'
Junio C Hamano [Mon, 24 Sep 2018 17:30:53 +0000 (10:30 -0700)] 
Merge branch 'en/update-ref-no-deref-stdin'

"git update-ref" learned to make both "--no-deref" and "--stdin"
work at the same time.

* en/update-ref-no-deref-stdin:
  update-ref: allow --no-deref with --stdin
  update-ref: fix type of update_flags variable to match its usage

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

Update error messages given by "git remote" and make them consistent.

* ms/remote-error-message-update:
  builtin/remote: quote remote name on error to display empty name

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

The code to backfill objects in lazily cloned repository did not
work correctly, which has been corrected.

* jt/lazy-object-fetch-fix:
  fetch-object: set exact_oid when fetching
  fetch-object: unify fetch_object[s] functions

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