]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
5 years agorebase: fix regression in rebase.useBuiltin=false test mode
Ævar Arnfjörð Bjarmason [Wed, 13 Feb 2019 21:49:08 +0000 (22:49 +0100)] 
rebase: fix regression in rebase.useBuiltin=false test mode

Fix a recently introduced regression in c762aada1a ("rebase -x: sanity
check command", 2019-01-29) triggered when running the tests with
GIT_TEST_REBASE_USE_BUILTIN=false. See 62c23938fa ("tests: add a
special setup where rebase.useBuiltin is off", 2018-11-14) for how
that test mode works.

As discussed on-list[1] it's not worth it to implement the sanity
check in the legacy rebase code, we plan to remove it after the 2.21
release. So let's do the bare minimum to make the tests pass under the
GIT_TEST_REBASE_USE_BUILTIN=false special setup.

1. https://public-inbox.org/git/xmqqva1nbeno.fsf@gitster-ct.c.googlers.com/

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoRelNotes/2.21: misc typo/English fixups
Jeff King [Tue, 12 Feb 2019 06:33:04 +0000 (01:33 -0500)] 
RelNotes/2.21: misc typo/English fixups

These are just some small fixes I noticed doing a complete read-through
(there are a few cases I left that are incomplete or abbreviated
sentences, but I think those are OK in this sort of bullet-list style).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoRelNotes/2.21: tweak "--date=auto" mention
Jeff King [Tue, 12 Feb 2019 06:32:48 +0000 (01:32 -0500)] 
RelNotes/2.21: tweak "--date=auto" mention

In the feature that was eventually committed, "--date=auto" doesn't do
anything. It was generalized to "--date=auto:<format>".

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'nd/imap-send-typofix'
Junio C Hamano [Tue, 12 Feb 2019 17:00:25 +0000 (09:00 -0800)] 
Merge branch 'nd/imap-send-typofix'

* nd/imap-send-typofix:
  imap-send.c: add a missing space in error message

5 years agoimap-send.c: add a missing space in error message
Nguyễn Thái Ngọc Duy [Mon, 11 Feb 2019 09:40:11 +0000 (16:40 +0700)] 
imap-send.c: add a missing space in error message

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoconfig.mak.uname: add FREAD_READS_DIRECTORIES for NonStop platform
Randall S. Becker [Sun, 10 Feb 2019 00:20:16 +0000 (19:20 -0500)] 
config.mak.uname: add FREAD_READS_DIRECTORIES for NonStop platform

The NonStop platform needs this configuration item specified as
UnfortunatelyYes so that config directory files are correctly processed.

Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoFix typos in translatable strings for v2.21.0
Jean-Noël Avila [Mon, 11 Feb 2019 06:44:53 +0000 (07:44 +0100)] 
Fix typos in translatable strings for v2.21.0

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoSeventh batch for 2.21
Junio C Hamano [Sat, 9 Feb 2019 04:45:48 +0000 (20:45 -0800)] 
Seventh batch for 2.21

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'js/mingw-host-cpu'
Junio C Hamano [Sat, 9 Feb 2019 04:44:53 +0000 (20:44 -0800)] 
Merge branch 'js/mingw-host-cpu'

Windows update.

* js/mingw-host-cpu:
  mingw: fix CPU reporting in `git version --build-options`

5 years agoMerge branch 'js/fuzz-commit-graph-update'
Junio C Hamano [Sat, 9 Feb 2019 04:44:53 +0000 (20:44 -0800)] 
Merge branch 'js/fuzz-commit-graph-update'

Update to the fuzzer.

* js/fuzz-commit-graph-update:
  object: fix leak of shallow_stat
  fuzz-commit-graph: initialize repo object

5 years agoMerge branch 'kl/pretty-doc-markup-fix'
Junio C Hamano [Sat, 9 Feb 2019 04:44:52 +0000 (20:44 -0800)] 
Merge branch 'kl/pretty-doc-markup-fix'

Doc update.

* kl/pretty-doc-markup-fix:
  doc: prevent overflowing <code> tag in rendered HTML

5 years agoMerge branch 'sg/ci-parallel-build'
Junio C Hamano [Sat, 9 Feb 2019 04:44:52 +0000 (20:44 -0800)] 
Merge branch 'sg/ci-parallel-build'

Build update.

* sg/ci-parallel-build:
  ci: clear and mark MAKEFLAGS exported just once
  ci: make sure we build Git parallel

5 years agoMerge branch 'ld/git-p4-remove-flakey-test'
Junio C Hamano [Sat, 9 Feb 2019 04:44:52 +0000 (20:44 -0800)] 
Merge branch 'ld/git-p4-remove-flakey-test'

A flakey "p4" test has been removed.

* ld/git-p4-remove-flakey-test:
  git-p4: remove ticket expiry test

5 years agoMerge branch 'js/rebase-i-redo-exec-fix'
Junio C Hamano [Sat, 9 Feb 2019 04:44:52 +0000 (20:44 -0800)] 
Merge branch 'js/rebase-i-redo-exec-fix'

For "rebase -i --reschedule-failed-exec", we do not want the "-y"
shortcut after all.

* js/rebase-i-redo-exec-fix:
  Revert "rebase: introduce a shortcut for --reschedule-failed-exec"

5 years agoMerge branch 'nd/checkout-noisy-unmerge'
Junio C Hamano [Sat, 9 Feb 2019 04:44:51 +0000 (20:44 -0800)] 
Merge branch 'nd/checkout-noisy-unmerge'

"git checkout [<tree-ish>] <pathspec>" started reporting the number
of paths that have got updated recently, but the same messages were
given when "git checkout -m <pathspec>" to unresolve conflicts that
have just been resolved.  The message now reports these unresolved
paths separately from the paths that are checked out from the index.

* nd/checkout-noisy-unmerge:
  checkout: count and print -m paths separately
  checkout: update count-checkouts messages

5 years agoMerge branch 'js/smart-http-detect-remote-error'
Junio C Hamano [Sat, 9 Feb 2019 04:44:51 +0000 (20:44 -0800)] 
Merge branch 'js/smart-http-detect-remote-error'

Some errors from the other side coming over smart HTTP transport
were not noticed, which has been corrected.

* js/smart-http-detect-remote-error:
  t5551: test server-side ERR packet
  remote-curl: tighten "version 2" check for smart-http
  remote-curl: refactor smart-http discovery

5 years agoMerge branch 'ds/coverage-prove'
Junio C Hamano [Sat, 9 Feb 2019 04:44:51 +0000 (20:44 -0800)] 
Merge branch 'ds/coverage-prove'

A new target "coverage-prove" to run the coverage test under
"prove" has been added.

* ds/coverage-prove:
  Makefile: add coverage-prove target

5 years agoMerge branch 'tz/gpg-test-fix'
Junio C Hamano [Sat, 9 Feb 2019 04:44:50 +0000 (20:44 -0800)] 
Merge branch 'tz/gpg-test-fix'

Test fix.

* tz/gpg-test-fix:
  t/lib-gpg: drop redundant killing of gpg-agent
  t/lib-gpg: quote path to ${GNUPGHOME}/trustlist.txt

5 years agoMerge branch 'os/rebase-runs-post-checkout-hook'
Junio C Hamano [Sat, 9 Feb 2019 04:44:50 +0000 (20:44 -0800)] 
Merge branch 'os/rebase-runs-post-checkout-hook'

Test fix.

* os/rebase-runs-post-checkout-hook:
  t5403: correct bash ambiguous redirect error in subtest 8 by quoting $GIT_DIR

5 years agot5403: correct bash ambiguous redirect error in subtest 8 by quoting $GIT_DIR
Randall S. Becker [Fri, 8 Feb 2019 11:32:33 +0000 (06:32 -0500)] 
t5403: correct bash ambiguous redirect error in subtest 8 by quoting $GIT_DIR

The embedded blanks in the full path of the test git repository cased bash
to generate an ambugious redirect error.

Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years ago.mailmap: map Clemens Buchacher's mail addresses
Johannes Schindelin [Fri, 8 Feb 2019 10:01:20 +0000 (02:01 -0800)] 
.mailmap: map Clemens Buchacher's mail addresses

We have three email addresses for Clemens in our commit history, two of
them bouncing. Let's map the latter to the only one that still works.

Pointed out by Gábor Szeder.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot/lib-gpg: drop redundant killing of gpg-agent
Todd Zullinger [Fri, 8 Feb 2019 03:17:46 +0000 (22:17 -0500)] 
t/lib-gpg: drop redundant killing of gpg-agent

In 53fc999306 ("gpg-interface t: extend the existing GPG tests with
GPGSM", 2018-07-20), the gpgconf call which kills gpg-agent was copied
from the existing gpg setup code.

The reason for killing gpg-agent is given in 29ff1f8f74 ("t: lib-gpg:
flush gpg agent on startup", 2017-07-20):

  When running gpg-relevant tests, a gpg-daemon is spawned for each
  GNUPGHOME used. This daemon may stay running after the test and cache
  file descriptors for the trash directories, even after the trash
  directory is removed. This leads to ENOENT errors when attempting to
  create files if tests are run multiple times.

  Add a cleanup script to force flushing the gpg-agent for that GNUPGHOME
  (if any) before setting up the GPG relevant-environment.

Killing gpg-agent once per test is sufficient.

Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot/lib-gpg: quote path to ${GNUPGHOME}/trustlist.txt
Todd Zullinger [Fri, 8 Feb 2019 03:17:45 +0000 (22:17 -0500)] 
t/lib-gpg: quote path to ${GNUPGHOME}/trustlist.txt

When gpgsm is installed, lib-gpg.sh attempts to update trustlist.txt to
relax the checking of some root certificate requirements.  The path to
"${GNUPGHOME}" contains spaces which cause an "ambiguous redirect"
warning when bash is used to run the tests:

  $ bash t7030-verify-tag.sh
  /git/t/lib-gpg.sh: line 66: ${GNUPGHOME}/trustlist.txt: ambiguous redirect
  ok 1 - create signed tags
  ok 2 # skip create signed tags x509  (missing GPGSM)
  ...

No warning is issued when using bash called as /bin/sh, dash, or mksh.

Quote the path to ensure the redirect works as intended and sets the
GPGSM prereq.  While we're here, drop the space after ">>".

Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agomingw: fix CPU reporting in `git version --build-options`
Johannes Schindelin [Thu, 7 Feb 2019 10:46:06 +0000 (02:46 -0800)] 
mingw: fix CPU reporting in `git version --build-options`

We cannot rely on `uname -m` in Git for Windows' SDK to tell us what
architecture we are compiling for, as we can compile both 32-bit and
64-bit `git.exe` from a 64-bit SDK, but the `uname -m` in that SDK will
always report `x86_64`.

So let's go back to our original design. And make it explicitly
Windows-specific.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoobject: fix leak of shallow_stat
Josh Steadmon [Thu, 7 Feb 2019 20:05:54 +0000 (12:05 -0800)] 
object: fix leak of shallow_stat

In eee4502baaf ("shallow: migrate shallow information into the object
parser", 2018-05-17), we added a stat_validity pointer into the
parsed_object_pool struct, but did not add code to free this in
parsed_object_pool_clear(). This leak was found by fuzz-commit-graph.

Clear the struct and then free it in parsed_object_pool_clear() to
prevent the leak.

Signed-off-by: Josh Steadmon <steadmon@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agofuzz-commit-graph: initialize repo object
Josh Steadmon [Thu, 7 Feb 2019 20:05:53 +0000 (12:05 -0800)] 
fuzz-commit-graph: initialize repo object

Various #DEFINE "constants" in commit-graph.c now depend on
the_hash_algo->rawsz, but this object must be initialized before it can
be used.

Signed-off-by: Josh Steadmon <steadmon@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodoc: prevent overflowing <code> tag in rendered HTML
Katrin Leinweber [Thu, 7 Feb 2019 19:16:37 +0000 (20:16 +0100)] 
doc: prevent overflowing <code> tag in rendered HTML

Add an apparently missing back-tick to fix a multi-line <code> section
on https://git-scm.com/docs/git-log which seems to have been caused by
commit 18fb7ffc ("pretty: respect color settings [...]", 2017-07-13).

Signed-off-by: Katrin Leinweber <katrin.leinweber@uni-konstanz.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoci: clear and mark MAKEFLAGS exported just once
Junio C Hamano [Thu, 7 Feb 2019 19:36:28 +0000 (11:36 -0800)] 
ci: clear and mark MAKEFLAGS exported just once

Clearing it once upfront, and turning all the assignment into
appending, would future-proof the code even more, to prevent
mistakes the previous one fixed from happening again.

Also, mark the variable exported just once at the beginning.  There
is no point in marking it exported repeatedly.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoci: make sure we build Git parallel
SZEDER Gábor [Thu, 7 Feb 2019 18:37:36 +0000 (19:37 +0100)] 
ci: make sure we build Git parallel

Commit 2c8921db2b (travis-ci: build with the right compiler,
2019-01-17) started to use MAKEFLAGS to specify which compiler to use
to build Git.  A bit later, and in a different topic branch commit
eaa62291ff (ci: inherit --jobs via MAKEFLAGS in run-build-and-tests,
2019-01-27) started to use MAKEFLAGS as well.  Unfortunately, there is
a semantic conflict between these two commits: both of them set
MAKEFLAGS, and since the line adding CC from 2c8921db2b comes later in
'ci/lib.sh', it overwrites the number of parallel jobs added in
eaa62291ff.

Consequently, since both commits have been merged all our CI jobs have
been building Git, building its documentation, and applying semantic
patches sequentially, making all build jobs a bit slower.  Running
the test suite is unaffected, because the number of test jobs comes
from GIT_PROVE_OPTS.

Append to MAKEFLAGS when setting the compiler to use, to ensure that
the number of parallel jobs to use is preserved.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoGit 2.21-rc0 v2.21.0-rc0
Junio C Hamano [Thu, 7 Feb 2019 05:30:09 +0000 (21:30 -0800)] 
Git 2.21-rc0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'jk/add-ignore-errors-bit-assignment-fix'
Junio C Hamano [Thu, 7 Feb 2019 06:05:30 +0000 (22:05 -0800)] 
Merge branch 'jk/add-ignore-errors-bit-assignment-fix'

A hotfix to an incomplete fix made earlier.

* jk/add-ignore-errors-bit-assignment-fix:
  add_to_index(): convert forgotten HASH_RENORMALIZE check

5 years agoMerge branch 'rj/sparse-flags'
Junio C Hamano [Thu, 7 Feb 2019 06:05:30 +0000 (22:05 -0800)] 
Merge branch 'rj/sparse-flags'

Use of the sparse tool got easier to customize from the command
line to help developers.

* rj/sparse-flags:
  Makefile: improve SPARSE_FLAGS customisation
  config.mak.uname: remove obsolete SPARSE_FLAGS setting

5 years agoMerge branch 'bc/fetch-pack-clear-alternate-shallow'
Junio C Hamano [Thu, 7 Feb 2019 06:05:30 +0000 (22:05 -0800)] 
Merge branch 'bc/fetch-pack-clear-alternate-shallow'

"git fetch" over protocol v2 that needs to make a second connection
to backfill tags did not clear a variable that holds shallow
repository information correctly, leading to an access of freed
piece of memory.

* bc/fetch-pack-clear-alternate-shallow:
  fetch-pack: clear alternate shallow in one more place
  fetch-pack: clear alternate shallow when complete

5 years agoMerge branch 'ma/doc-diff-usage-fix'
Junio C Hamano [Thu, 7 Feb 2019 06:05:29 +0000 (22:05 -0800)] 
Merge branch 'ma/doc-diff-usage-fix'

Running "Documentation/doc-diff x" from anywhere other than the
top-level of the working tree did not show the usage string
correctly, which has been fixed.

* ma/doc-diff-usage-fix:
  doc-diff: don't `cd_to_toplevel`

5 years agoMerge branch 'ab/diff-tree-doc-fix'
Junio C Hamano [Thu, 7 Feb 2019 06:05:29 +0000 (22:05 -0800)] 
Merge branch 'ab/diff-tree-doc-fix'

Doc fix.

* ab/diff-tree-doc-fix:
  diff-tree doc: correct & remove wrong documentation

5 years agoMerge branch 'ss/describe-dirty-in-the-right-directory'
Junio C Hamano [Thu, 7 Feb 2019 06:05:29 +0000 (22:05 -0800)] 
Merge branch 'ss/describe-dirty-in-the-right-directory'

"git --work-tree=$there --git-dir=$here describe --dirty" did not
work correctly as it did not pay attention to the location of the
worktree specified by the user by mistake, which has been
corrected.

* ss/describe-dirty-in-the-right-directory:
  t6120: test for describe with a bare repository
  describe: setup working tree for --dirty

5 years agoMerge branch 'sg/travis-osx-brew-breakage-workaround'
Junio C Hamano [Thu, 7 Feb 2019 06:05:28 +0000 (22:05 -0800)] 
Merge branch 'sg/travis-osx-brew-breakage-workaround'

The way the OSX build jobs updates its build environment used the
"--quiet" option to "brew update" command, but it wasn't all that
quiet to be useful.  The use of the option has been replaced with
an explicit redirection to the /dev/null (which incidentally would
have worked around a breakage by recent updates to homebrew, which
has fixed itself already).

* sg/travis-osx-brew-breakage-workaround:
  travis-ci: make the OSX build jobs' 'brew update' more quiet

5 years agoMerge branch 'nd/commit-doc'
Junio C Hamano [Thu, 7 Feb 2019 06:05:28 +0000 (22:05 -0800)] 
Merge branch 'nd/commit-doc'

Doc update.

* nd/commit-doc:
  git-commit.txt: better description what it does

5 years agoMerge branch 'sl/const'
Junio C Hamano [Thu, 7 Feb 2019 06:05:27 +0000 (22:05 -0800)] 
Merge branch 'sl/const'

Code cleanup.

* sl/const:
  various: tighten constness of some local variables

5 years agoMerge branch 'sh/submodule-summary-abbrev-fix'
Junio C Hamano [Thu, 7 Feb 2019 06:05:27 +0000 (22:05 -0800)] 
Merge branch 'sh/submodule-summary-abbrev-fix'

The "git submodule summary" subcommand showed shortened commit
object names by mechanically truncating them at 7-hexdigit, which
has been improved to let "rev-parse --short" scale the length of
the abbreviation with the size of the repository.

* sh/submodule-summary-abbrev-fix:
  git-submodule.sh: shorten submodule SHA-1s using rev-parse

5 years agoMerge branch 'nd/help-align-command-desc'
Junio C Hamano [Thu, 7 Feb 2019 06:05:27 +0000 (22:05 -0800)] 
Merge branch 'nd/help-align-command-desc'

Output from "git help" was not correctly aligned, which has been
fixed.

* nd/help-align-command-desc:
  help: align the longest command in the command listing

5 years agoMerge branch 'jk/loose-object-cache-oid'
Junio C Hamano [Thu, 7 Feb 2019 06:05:27 +0000 (22:05 -0800)] 
Merge branch 'jk/loose-object-cache-oid'

Code clean-up.

* jk/loose-object-cache-oid:
  prefer "hash mismatch" to "sha1 mismatch"
  sha1-file: avoid "sha1 file" for generic use in messages
  sha1-file: prefer "loose object file" to "sha1 file" in messages
  sha1-file: drop has_sha1_file()
  convert has_sha1_file() callers to has_object_file()
  sha1-file: convert pass-through functions to object_id
  sha1-file: modernize loose header/stream functions
  sha1-file: modernize loose object file functions
  http: use struct object_id instead of bare sha1
  update comment references to sha1_object_info()
  sha1-file: fix outdated sha1 comment references

5 years agoMerge branch 'pw/rebase-x-sanity-check'
Junio C Hamano [Thu, 7 Feb 2019 06:05:26 +0000 (22:05 -0800)] 
Merge branch 'pw/rebase-x-sanity-check'

"git rebase -x $cmd" did not reject multi-line command, even though
the command is incapable of handling such a command.  It now is
rejected upfront.

* pw/rebase-x-sanity-check:
  rebase -x: sanity check command

5 years agoMerge branch 'js/vsts-ci'
Junio C Hamano [Thu, 7 Feb 2019 06:05:26 +0000 (22:05 -0800)] 
Merge branch 'js/vsts-ci'

Prepare to run test suite on Azure Pipeline.

* js/vsts-ci: (22 commits)
  test-date: drop unused parameter to getnanos()
  ci: parallelize testing on Windows
  ci: speed up Windows phase
  tests: optionally skip bin-wrappers/
  t0061: workaround issues with --with-dashes and RUNTIME_PREFIX
  tests: add t/helper/ to the PATH with --with-dashes
  mingw: try to work around issues with the test cleanup
  tests: include detailed trace logs with --write-junit-xml upon failure
  tests: avoid calling Perl just to determine file sizes
  README: add a build badge (status of the Azure Pipelines build)
  mingw: be more generous when wrapping up the setitimer() emulation
  ci: use git-sdk-64-minimal build artifact
  ci: add a Windows job to the Azure Pipelines definition
  Add a build definition for Azure DevOps
  ci/lib.sh: add support for Azure Pipelines
  tests: optionally write results as JUnit-style .xml
  test-date: add a subcommand to measure times in shell scripts
  ci: use a junction on Windows instead of a symlink
  ci: inherit --jobs via MAKEFLAGS in run-build-and-tests
  ci/lib.sh: encapsulate Travis-specific things
  ...

5 years agoMerge branch 'br/commit-tree-fully-spelled-gpg-sign-option'
Junio C Hamano [Thu, 7 Feb 2019 06:05:25 +0000 (22:05 -0800)] 
Merge branch 'br/commit-tree-fully-spelled-gpg-sign-option'

The documentation of "git commit-tree" said that the command
understands "--gpg-sign" in addition to "-S", but the command line
parser did not know about the longhand, which has been corrected.

* br/commit-tree-fully-spelled-gpg-sign-option:
  commit-tree: add missing --gpg-sign flag
  t7510: invoke git as part of &&-chain

5 years agoMerge branch 'sb/submodule-abort-update-upon-config-failure'
Junio C Hamano [Thu, 7 Feb 2019 06:05:25 +0000 (22:05 -0800)] 
Merge branch 'sb/submodule-abort-update-upon-config-failure'

"git submodule update" learned to abort early when core.worktree
for the submodule is not set correctly to prevent spreading damage.

* sb/submodule-abort-update-upon-config-failure:
  git-submodule: abort if core.worktree could not be set correctly

5 years agoMerge branch 'sg/travis-specific-cc'
Junio C Hamano [Thu, 7 Feb 2019 06:05:25 +0000 (22:05 -0800)] 
Merge branch 'sg/travis-specific-cc'

The travis CI scripts have been corrected to build Git with the
compiler(s) of our choice.

* sg/travis-specific-cc:
  travis-ci: build with the right compiler
  travis-ci: switch to Xcode 10.1 macOS image
  travis-ci: don't be '--quiet' when running the tests
  .gitignore: ignore external debug symbols from GCC on macOS

5 years agoMerge branch 'ds/push-sparse-tree-walk'
Junio C Hamano [Thu, 7 Feb 2019 06:05:24 +0000 (22:05 -0800)] 
Merge branch 'ds/push-sparse-tree-walk'

"git pack-objects" learned another algorithm to compute the set of
objects to send, that trades the resulting packfile off to save
traversal cost to favor small pushes.

* ds/push-sparse-tree-walk:
  pack-objects: create GIT_TEST_PACK_SPARSE
  pack-objects: create pack.useSparse setting
  revision: implement sparse algorithm
  list-objects: consume sparse tree walk
  revision: add mark_tree_uninteresting_sparse

5 years agoMerge branch 'tb/test-lint-sed-options'
Junio C Hamano [Thu, 7 Feb 2019 06:05:24 +0000 (22:05 -0800)] 
Merge branch 'tb/test-lint-sed-options'

The test lint learned to catch non-portable "sed" options.

* tb/test-lint-sed-options:
  test-lint: only use only sed [-n] [-e command] [-f command_file]

5 years agoMerge branch 'lt/date-human'
Junio C Hamano [Thu, 7 Feb 2019 06:05:24 +0000 (22:05 -0800)] 
Merge branch 'lt/date-human'

A new date format "--date=human" that morphs its output depending
on how far the time is from the current time has been introduced.
"--date=auto" can be used to use this new format when the output is
going to the pager or to the terminal and otherwise the default
format.

* lt/date-human:
  Add `human` date format tests.
  Add `human` format to test-tool
  Add 'human' date format documentation
  Replace the proposed 'auto' mode with 'auto:'
  Add 'human' date format

5 years agoMerge branch 'jk/autocrlf-overrides-eol-doc'
Junio C Hamano [Thu, 7 Feb 2019 06:05:23 +0000 (22:05 -0800)] 
Merge branch 'jk/autocrlf-overrides-eol-doc'

Documentation around core.crlf has been updated.

* jk/autocrlf-overrides-eol-doc:
  docs/config: clarify "text property" in core.eol
  doc/gitattributes: clarify "autocrlf overrides eol"

5 years agoMerge branch 'jk/unused-parameter-cleanup'
Junio C Hamano [Thu, 7 Feb 2019 06:05:23 +0000 (22:05 -0800)] 
Merge branch 'jk/unused-parameter-cleanup'

Code cleanup.

* jk/unused-parameter-cleanup:
  convert: drop path parameter from actual conversion functions
  convert: drop len parameter from conversion checks
  config: drop unused parameter from maybe_remove_section()
  show_date_relative(): drop unused "tz" parameter
  column: drop unused "opts" parameter in item_length()
  create_bundle(): drop unused "header" parameter
  apply: drop unused "def" parameter from find_name_gnu()
  match-trees: drop unused path parameter from score functions

5 years agoMerge branch 'nd/the-index-final'
Junio C Hamano [Thu, 7 Feb 2019 06:05:22 +0000 (22:05 -0800)] 
Merge branch 'nd/the-index-final'

The assumption to work on the single "in-core index" instance has
been reduced from the library-ish part of the codebase.

* nd/the-index-final:
  cache.h: flip NO_THE_INDEX_COMPATIBILITY_MACROS switch
  read-cache.c: remove the_* from index_has_changes()
  merge-recursive.c: remove implicit dependency on the_repository
  merge-recursive.c: remove implicit dependency on the_index
  sha1-name.c: remove implicit dependency on the_index
  read-cache.c: replace update_index_if_able with repo_&
  read-cache.c: kill read_index()
  checkout: avoid the_index when possible
  repository.c: replace hold_locked_index() with repo_hold_locked_index()
  notes-utils.c: remove the_repository references
  grep: use grep_opt->repo instead of explict repo argument

5 years agoMerge branch 'js/rebase-am'
Junio C Hamano [Thu, 7 Feb 2019 06:05:22 +0000 (22:05 -0800)] 
Merge branch 'js/rebase-am'

Instead of going through "git-rebase--am" scriptlet to use the "am"
backend, the built-in version of "git rebase" learned to drive the
"am" backend directly.

* js/rebase-am:
  built-in rebase: call `git am` directly
  rebase: teach `reset_head()` to optionally skip the worktree
  rebase: avoid double reflog entry when switching branches
  rebase: move `reset_head()` into a better spot

5 years agoMerge branch 'tt/bisect-in-c'
Junio C Hamano [Thu, 7 Feb 2019 06:05:22 +0000 (22:05 -0800)] 
Merge branch 'tt/bisect-in-c'

More code in "git bisect" has been rewritten in C.

* tt/bisect-in-c:
  bisect--helper: `bisect_start` shell function partially in C
  bisect--helper: `get_terms` & `bisect_terms` shell function in C
  bisect--helper: `bisect_next_check` shell function in C
  bisect--helper: `check_and_set_terms` shell function in C
  wrapper: move is_empty_file() and rename it as is_empty_or_missing_file()
  bisect--helper: `bisect_write` shell function in C
  bisect--helper: `bisect_reset` shell function in C

5 years agoMerge branch 'tb/utf-16-le-with-explicit-bom'
Junio C Hamano [Thu, 7 Feb 2019 06:05:21 +0000 (22:05 -0800)] 
Merge branch 'tb/utf-16-le-with-explicit-bom'

A new encoding UTF-16LE-BOM has been invented to force encoding to
UTF-16 with BOM in little endian byte order, which cannot be directly
generated by using iconv.

* tb/utf-16-le-with-explicit-bom:
  Support working-tree-encoding "UTF-16LE-BOM"

5 years agoMerge branch 'dt/cat-file-batch-ambiguous'
Junio C Hamano [Thu, 7 Feb 2019 06:05:21 +0000 (22:05 -0800)] 
Merge branch 'dt/cat-file-batch-ambiguous'

"git cat-file --batch" reported a dangling symbolic link by
mistake, when it wanted to report that a given name is ambiguous.

* dt/cat-file-batch-ambiguous:
  t1512: test ambiguous cat-file --batch and --batch-output
  Do not print 'dangling' for cat-file in case of ambiguity

5 years agoMerge branch 'km/init-doc-typofix'
Junio C Hamano [Thu, 7 Feb 2019 06:05:21 +0000 (22:05 -0800)] 
Merge branch 'km/init-doc-typofix'

Docfix.

* km/init-doc-typofix:
  init docs: correct a punctuation typo

5 years agoMerge branch 'en/rebase-merge-on-sequencer'
Junio C Hamano [Thu, 7 Feb 2019 06:05:20 +0000 (22:05 -0800)] 
Merge branch 'en/rebase-merge-on-sequencer'

"git rebase --merge" as been reimplemented by reusing the internal
machinery used for "git rebase -i".

* en/rebase-merge-on-sequencer:
  rebase: implement --merge via the interactive machinery
  rebase: define linearization ordering and enforce it
  git-legacy-rebase: simplify unnecessary triply-nested if
  git-rebase, sequencer: extend --quiet option for the interactive machinery
  am, rebase--merge: do not overlook --skip'ed commits with post-rewrite
  t5407: add a test demonstrating how interactive handles --skip differently
  rebase: fix incompatible options error message
  rebase: make builtin and legacy script error messages the same

5 years agoadd_to_index(): convert forgotten HASH_RENORMALIZE check
Jeff King [Thu, 7 Feb 2019 02:00:22 +0000 (21:00 -0500)] 
add_to_index(): convert forgotten HASH_RENORMALIZE check

Commit 9e5da3d055 (add: use separate ADD_CACHE_RENORMALIZE flag,
2019-01-17) switched out using HASH_RENORMALIZE in our flags field for a
new ADD_CACHE_RENORMALIZE flag. However, it forgot to convert one of the
checks for HASH_RENORMALIZE into the new flag, which totally broke "git
add --renormalize".

To make matters even more confusing, the resulting code would racily
pass the tests!  The forgotten check was responsible for defeating the
up-to-date check of the index entry. That meant that "git add
--renormalize" would refuse to renormalize things that appeared
stat-clean. But most of the time the test commands run fast enough that
the file mtime is the same as the index mtime. And thus we err on the
conservative side and re-hash the file, which is what "--renormalize"
would have wanted.

But if you're unlucky and cross that one-second boundary between writing
the file and writing the index (which is more likely to happen on a slow
or heavily-loaded system), then the file appears stat-clean. And
"--renormalize" would effectively do nothing.

The fix is straightforward: convert this check to use the right flag.

Noticed-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agofetch-pack: clear alternate shallow in one more place
brian m. carlson [Wed, 6 Feb 2019 23:59:37 +0000 (23:59 +0000)] 
fetch-pack: clear alternate shallow in one more place

The previous one did not clear the variable in one codepath,
but we should aim to be complete.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
[jc: made a reroll into incremental, as the previous one already is
 in the next branch]
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agogit-p4: remove ticket expiry test
Luke Diamand [Wed, 6 Feb 2019 15:11:53 +0000 (15:11 +0000)] 
git-p4: remove ticket expiry test

The git-p4 login ticket expiry test causes unreliable test
runs. Since the handling of ticket expiry in git-p4 is far
from polished anyway, let's remove it for now.

A better way to actually run the test is to create a python
"fake" version of "p4" which returns whatever expiry results
the test requires.

Ideally git-p4 would look at the expiry time before starting
any long operations, and cleanup gracefully if there is not
enough time left. But that's quite hard to do.

Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocheckout: count and print -m paths separately
Nguyễn Thái Ngọc Duy [Wed, 6 Feb 2019 02:51:15 +0000 (09:51 +0700)] 
checkout: count and print -m paths separately

Since 0f086e6dca (checkout: print something when checking out paths -
2018-11-13), this command reports how many paths have been updated
from what source (either from a tree, or from the index). I forget
that there's a third source: when -m is used, the merge conflict is
re-created (granted, also from the index, but it's not a straight copy
from the index).

Count and report unmerged paths separately. There's a bit more update
to avoid reporting:

   Recreated X merge conflicts
   Updated 0 paths from the index

The second line is unnecessary. Though if there's no conflict
recreation, we still report

   Updated 0 paths from the index

to make it clear we're not really doing anything.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocheckout: update count-checkouts messages
Nguyễn Thái Ngọc Duy [Wed, 6 Feb 2019 02:51:14 +0000 (09:51 +0700)] 
checkout: update count-checkouts messages

Commit 0f086e6dca [1] counts the number of files updated by "git
checkout -- <paths>" command and prints it. Later on 536ec1839d [2]
adds the ability to remove files in "git checkout -- <paths>". This is
still an update on worktree and should be reported to the user.

To prepare for such an update since that commit is on track to
'master' now, the messages are rephrased to avoid "checked out" which
does not imply file deletion.

[1] 0f086e6dca (checkout: print something when checking out paths -
    2018-11-13)
[2] 536ec1839d (entry: support CE_WT_REMOVE flag in checkout_entry -
    2018-12-20)

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot5551: test server-side ERR packet
Josh Steadmon [Wed, 6 Feb 2019 19:19:10 +0000 (14:19 -0500)] 
t5551: test server-side ERR packet

When a smart HTTP server sends an error message via pkt-line, we detect
the error due to using PACKET_READ_DIE_ON_ERR_PACKET. This case was
added by 2d103c31c2 (pack-protocol.txt: accept error packets in any
context, 2018-12-29), but not covered by tests.

Signed-off-by: Josh Steadmon <steadmon@google.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoremote-curl: tighten "version 2" check for smart-http
Jeff King [Wed, 6 Feb 2019 19:18:58 +0000 (14:18 -0500)] 
remote-curl: tighten "version 2" check for smart-http

In a v2 smart-http conversation, the server should reply to our initial
request with a pkt-line saying "version 2". We check that with
starts_with(), but really that should be the only thing in that packet.
A response of "version 20" should not match.

Let's tighten this check to use strcmp(). Note that we don't need to
worry about a trailing newline here, because the ptk-line code will have
chomped it for us already.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoremote-curl: refactor smart-http discovery
Jeff King [Wed, 6 Feb 2019 19:18:48 +0000 (14:18 -0500)] 
remote-curl: refactor smart-http discovery

After making initial contact with an http server, we have to decide if
the server supports smart-http, and if so, which version. Our rules are
a bit inconsistent:

  1. For v0, we require that the content-type indicates a smart-http
     response. We also require the response to look vaguely like a
     pkt-line starting with "#". If one of those does not match, we fall
     back to dumb-http.

     But according to our http protocol spec[1]:

       Dumb servers MUST NOT return a return type starting with
       `application/x-git-`.

     If we see the expected content-type, we should consider it
     smart-http. At that point we can parse the pkt-line for real, and
     complain if it is not syntactically valid.

  2. For v2, we do not actually check the content-type. Our v2 protocol
     spec says[2]:

       When using the http:// or https:// transport a client makes a
       "smart" info/refs request as described in `http-protocol.txt`[...]

     and the http spec is clear that for a smart-http response[3]:

       The Content-Type MUST be `application/x-$servicename-advertisement`.

     So it is required according to the spec.

These inconsistencies were easy to miss because of the way the original
code was written as an inline conditional. Let's pull it out into its
own function for readability, and improve a few things:

 - we now predicate the smart/dumb decision entirely on the presence of
   the correct content-type

 - we do a real pkt-line parse before deciding how to proceed (and die
   if it isn't valid)

 - use skip_prefix() for comparing service strings, instead of
   constructing expected output in a strbuf; this avoids dealing with
   memory cleanup

Note that this _is_ tightening what the client will allow. It's all
according to the spec, but it's possible that other implementations
might violate these. However, violating these particular rules seems
like an odd choice for a server to make.

[1] Documentation/technical/http-protocol.txt, l. 166-167
[2] Documentation/technical/protocol-v2.txt, l. 63-64
[3] Documentation/technical/http-protocol.txt, l. 247

Helped-by: Josh Steadmon <steadmon@google.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agotest-date: drop unused parameter to getnanos()
Jeff King [Wed, 6 Feb 2019 19:35:52 +0000 (14:35 -0500)] 
test-date: drop unused parameter to getnanos()

The getnanos() helper always gets the current time from our
getnanotime() facility. The caller cannot override it via TEST_DATE_NOW,
and hence we simply ignore the "now" parameter to the function. Let's
remove it, as it may mislead callers into thinking it does something.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoRevert "rebase: introduce a shortcut for --reschedule-failed-exec"
Johannes Schindelin [Wed, 6 Feb 2019 18:45:17 +0000 (10:45 -0800)] 
Revert "rebase: introduce a shortcut for --reschedule-failed-exec"

This patch was contributed only as a tentative "we could introduce a
convenient short option if we do not want to change the default behavior
in the long run" patch, opening the discussion whether other people
agree with deprecating the current behavior in favor of the rescheduling
behavior.

But the consensus on the Git mailing list was that it would make sense
to show a warning in the near future, and flip the default
rebase.rescheduleFailedExec to reschedule failed `exec` commands by
default. See e.g.
<CAGZ79kZL5CRqCDRb6B-EedUm8Z_i4JuSF2=UtwwdRXMitrrOBw@mail.gmail.com>

So let's back out that patch that added the `-y` short option that we
agreed was not necessary or desirable.

This reverts commit 81ef8ee75d5f348d3c71ff633d13d302124e1a5e.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoFifth batch for 2.21
Junio C Hamano [Tue, 5 Feb 2019 22:27:34 +0000 (14:27 -0800)] 
Fifth batch for 2.21

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'sg/object-as-type-commit-graph-fix'
Junio C Hamano [Tue, 5 Feb 2019 22:26:19 +0000 (14:26 -0800)] 
Merge branch 'sg/object-as-type-commit-graph-fix'

The commit-graph facility did not work when in-core objects that
are promoted from unknown type to commit (e.g. a commit that is
accessed via a tag that refers to it) were involved, which has been
corrected.

* sg/object-as-type-commit-graph-fix:
  object_as_type: initialize commit-graph-related fields of 'struct commit'

5 years agoMerge branch 'nd/fetch-compact-update'
Junio C Hamano [Tue, 5 Feb 2019 22:26:18 +0000 (14:26 -0800)] 
Merge branch 'nd/fetch-compact-update'

"git fetch" output cleanup.

* nd/fetch-compact-update:
  fetch: prefer suffix substitution in compact fetch.output

5 years agoMerge branch 'sg/strbuf-addbuf-cocci'
Junio C Hamano [Tue, 5 Feb 2019 22:26:18 +0000 (14:26 -0800)] 
Merge branch 'sg/strbuf-addbuf-cocci'

Cocci rule update.

* sg/strbuf-addbuf-cocci:
  strbuf.cocci: suggest strbuf_addbuf() to add one strbuf to an other

5 years agoMerge branch 'az/instaweb-py3-http-server'
Junio C Hamano [Tue, 5 Feb 2019 22:26:18 +0000 (14:26 -0800)] 
Merge branch 'az/instaweb-py3-http-server'

"git instaweb" learned to drive http.server that comes with
"batteries included" Python installation (both Python2 & 3).

* az/instaweb-py3-http-server:
  git-instaweb: add Python builtin http.server support

5 years agoMerge branch 'pw/no-editor-in-rebase-i-implicit'
Junio C Hamano [Tue, 5 Feb 2019 22:26:17 +0000 (14:26 -0800)] 
Merge branch 'pw/no-editor-in-rebase-i-implicit'

When GIT_SEQUENCE_EDITOR is set, the command was incorrectly
started when modes of "git rebase" that implicitly uses the
machinery for the interactive rebase are run, which has been
corrected.

* pw/no-editor-in-rebase-i-implicit:
  implicit interactive rebase: don't run sequence editor

5 years agoMerge branch 'jk/diff-cc-stat-fixes'
Junio C Hamano [Tue, 5 Feb 2019 22:26:17 +0000 (14:26 -0800)] 
Merge branch 'jk/diff-cc-stat-fixes'

"git diff --color-moved --cc --stat -p" did not work well due to
funny interaction between a bug in color-moved and the rest, which
has been fixed.

* jk/diff-cc-stat-fixes:
  combine-diff: treat --dirstat like --stat
  combine-diff: treat --summary like --stat
  combine-diff: treat --shortstat like --stat
  combine-diff: factor out stat-format mask
  diff: clear emitted_symbols flag after use
  t4006: resurrect commented-out tests

5 years agoMerge branch 'bp/checkout-new-branch-optim'
Junio C Hamano [Tue, 5 Feb 2019 22:26:17 +0000 (14:26 -0800)] 
Merge branch 'bp/checkout-new-branch-optim'

"git checkout -b <new> [HEAD]" to create a new branch from the
current commit and check it out ought to be a no-op in the index
and the working tree in normal cases, but there are corner cases
that do require updates to the index and the working tree.  Running
it immediately after "git clone --no-checkout" is one of these
cases that an earlier optimization kicked in incorrectly, which has
been fixed.

* bp/checkout-new-branch-optim:
  checkout: fix regression in checkout -b on intitial checkout
  checkout: add test demonstrating regression with checkout -b on initial commit

5 years agoMerge branch 'ja/doc-style-fix'
Junio C Hamano [Tue, 5 Feb 2019 22:26:16 +0000 (14:26 -0800)] 
Merge branch 'ja/doc-style-fix'

Doc typo/stylo fixes.

* ja/doc-style-fix:
  doc: tidy asciidoc style

5 years agoMerge branch 'ph/pack-objects-mutex-fix'
Junio C Hamano [Tue, 5 Feb 2019 22:26:16 +0000 (14:26 -0800)] 
Merge branch 'ph/pack-objects-mutex-fix'

"git pack-objects" incorrectly used uninitialized mutex, which has
been corrected.

* ph/pack-objects-mutex-fix:
  pack-objects: merge read_lock and lock in packing_data struct
  pack-objects: move read mutex to packing_data struct

5 years agoMerge branch 'jk/attr-macro-fix'
Junio C Hamano [Tue, 5 Feb 2019 22:26:16 +0000 (14:26 -0800)] 
Merge branch 'jk/attr-macro-fix'

Asking "git check-attr" about a macro (e.g. "binary") on a specific
path did not work correctly, even though "git check-attr -a" listed
such a macro correctly.  This has been corrected.

* jk/attr-macro-fix:
  attr: do not mark queried macros as unset

5 years agoMerge branch 'js/test-git-installed'
Junio C Hamano [Tue, 5 Feb 2019 22:26:15 +0000 (14:26 -0800)] 
Merge branch 'js/test-git-installed'

Test fix for Windows.

* js/test-git-installed:
  tests: explicitly use `test-tool.exe` on Windows

5 years agoMerge branch 'js/abspath-part-inside-repo'
Junio C Hamano [Tue, 5 Feb 2019 22:26:15 +0000 (14:26 -0800)] 
Merge branch 'js/abspath-part-inside-repo'

On a case-insensitive filesystem, we failed to compare the part of
the path that is above the worktree directory in an absolute
pathname, which has been corrected.

* js/abspath-part-inside-repo:
  abspath_part_inside_repo: respect core.ignoreCase

5 years agoMerge branch 'jt/namespaced-ls-refs-fix'
Junio C Hamano [Tue, 5 Feb 2019 22:26:15 +0000 (14:26 -0800)] 
Merge branch 'jt/namespaced-ls-refs-fix'

Fix namespace support in protocol v2.

* jt/namespaced-ls-refs-fix:
  ls-refs: filter refs using namespace-stripped name

5 years agoMerge branch 'ab/commit-graph-write-progress'
Junio C Hamano [Tue, 5 Feb 2019 22:26:14 +0000 (14:26 -0800)] 
Merge branch 'ab/commit-graph-write-progress'

The codepath to show progress meter while writing out commit-graph
file has been improved.

* ab/commit-graph-write-progress:
  commit-graph write: emit a percentage for all progress
  commit-graph write: add itermediate progress
  commit-graph write: remove empty line for readability
  commit-graph write: add more descriptive progress output
  commit-graph write: show progress for object search
  commit-graph write: more descriptive "writing out" output
  commit-graph write: add "Writing out" progress output
  commit-graph: don't call write_graph_chunk_extra_edges() unnecessarily
  commit-graph: rename "large edges" to "extra edges"

5 years agoMerge branch 'ab/commit-graph-write-optim'
Junio C Hamano [Tue, 5 Feb 2019 22:26:14 +0000 (14:26 -0800)] 
Merge branch 'ab/commit-graph-write-optim'

The codepath to write out commit-graph has been optimized by
following the usual pattern of visiting objects in in-pack order.

* ab/commit-graph-write-optim:
  commit-graph write: use pack order when finding commits

5 years agoMerge branch 'js/t6042-timing-fix'
Junio C Hamano [Tue, 5 Feb 2019 22:26:14 +0000 (14:26 -0800)] 
Merge branch 'js/t6042-timing-fix'

Test update.

* js/t6042-timing-fix:
  t6042: work around speed optimization on Windows

5 years agoMerge branch 'jk/add-ignore-errors-bit-assignment-fix'
Junio C Hamano [Tue, 5 Feb 2019 22:26:13 +0000 (14:26 -0800)] 
Merge branch 'jk/add-ignore-errors-bit-assignment-fix'

"git add --ignore-errors" did not work as advertised and instead
worked as an unintended synonym for "git add --renormalize", which
has been fixed.

* jk/add-ignore-errors-bit-assignment-fix:
  add: use separate ADD_CACHE_RENORMALIZE flag

5 years agoMerge branch 'js/mingw-unc-path-w-backslashes'
Junio C Hamano [Tue, 5 Feb 2019 22:26:13 +0000 (14:26 -0800)] 
Merge branch 'js/mingw-unc-path-w-backslashes'

In Git for Windows, "git clone \\server\share\path" etc. that uses
UNC paths from command line had bad interaction with its shell
emulation.

* js/mingw-unc-path-w-backslashes:
  mingw: special-case arguments to `sh`
  mingw (t5580): document bug when cloning from backslashed UNC paths

5 years agoMerge branch 'cc/test-ref-store-typofix'
Junio C Hamano [Tue, 5 Feb 2019 22:26:12 +0000 (14:26 -0800)] 
Merge branch 'cc/test-ref-store-typofix'

An obvious typo in an assertion error message has been fixed.

* cc/test-ref-store-typofix:
  helper/test-ref-store: fix "new-sha1" vs "old-sha1" typo

5 years agoMerge branch 'jt/fetch-v2-sideband'
Junio C Hamano [Tue, 5 Feb 2019 22:26:11 +0000 (14:26 -0800)] 
Merge branch 'jt/fetch-v2-sideband'

"git fetch" and "git upload-pack" learned to send all exchange over
the sideband channel while talking the v2 protocol.

* jt/fetch-v2-sideband:
  tests: define GIT_TEST_SIDEBAND_ALL
  {fetch,upload}-pack: sideband v2 fetch response
  sideband: reverse its dependency on pkt-line
  pkt-line: introduce struct packet_writer
  pack-protocol.txt: accept error packets in any context
  Use packet_reader instead of packet_read_line

5 years agoMerge branch 'sg/obstack-cast-function-type-fix'
Junio C Hamano [Tue, 5 Feb 2019 22:26:11 +0000 (14:26 -0800)] 
Merge branch 'sg/obstack-cast-function-type-fix'

The compat/obstack code had casts that -Wcast-function-type
compilation option found questionable.

* sg/obstack-cast-function-type-fix:
  compat/obstack: fix -Wcast-function-type warnings

5 years agoMerge branch 'js/commit-graph-chunk-table-fix'
Junio C Hamano [Tue, 5 Feb 2019 22:26:11 +0000 (14:26 -0800)] 
Merge branch 'js/commit-graph-chunk-table-fix'

The codepath to read from the commit-graph file attempted to read
past the end of it when the file's table-of-contents was corrupt.

* js/commit-graph-chunk-table-fix:
  Makefile: correct example fuzz build
  commit-graph: fix buffer read-overflow
  commit-graph, fuzz: add fuzzer for commit-graph

5 years agoMerge branch 'ld/git-p4-shelve-update-fix'
Junio C Hamano [Tue, 5 Feb 2019 22:26:10 +0000 (14:26 -0800)] 
Merge branch 'ld/git-p4-shelve-update-fix'

"git p4" failed to update a shelved change when there were moved
files, which has been corrected.

* ld/git-p4-shelve-update-fix:
  git-p4: handle update of moved/copied files when updating a shelve
  git-p4: add failing test for shelved CL update involving move/copy

5 years agoMerge branch 'jt/get-reference-with-commit-graph'
Junio C Hamano [Tue, 5 Feb 2019 22:26:10 +0000 (14:26 -0800)] 
Merge branch 'jt/get-reference-with-commit-graph'

Micro-optimize the code that prepares commit objects to be walked
by "git rev-list" when the commit-graph is available.

* jt/get-reference-with-commit-graph:
  revision: use commit graph in get_reference()

5 years agoMerge branch 'js/filter-options-should-use-plain-int'
Junio C Hamano [Tue, 5 Feb 2019 22:26:09 +0000 (14:26 -0800)] 
Merge branch 'js/filter-options-should-use-plain-int'

Update the protocol message specification to allow only the limited
use of scaled quantities.  This is ensure potential compatibility
issues will not go out of hand.

* js/filter-options-should-use-plain-int:
  filter-options: expand scaled numbers
  tree:<depth>: skip some trees even when collecting omits
  list-objects-filter: teach tree:# how to handle >0

5 years agoMerge branch 'sb/more-repo-in-api'
Junio C Hamano [Tue, 5 Feb 2019 22:26:09 +0000 (14:26 -0800)] 
Merge branch 'sb/more-repo-in-api'

The in-core repository instances are passed through more codepaths.

* sb/more-repo-in-api: (23 commits)
  t/helper/test-repository: celebrate independence from the_repository
  path.h: make REPO_GIT_PATH_FUNC repository agnostic
  commit: prepare free_commit_buffer and release_commit_memory for any repo
  commit-graph: convert remaining functions to handle any repo
  submodule: don't add submodule as odb for push
  submodule: use submodule repos for object lookup
  pretty: prepare format_commit_message to handle arbitrary repositories
  commit: prepare logmsg_reencode to handle arbitrary repositories
  commit: prepare repo_unuse_commit_buffer to handle any repo
  commit: prepare get_commit_buffer to handle any repo
  commit-reach: prepare in_merge_bases[_many] to handle any repo
  commit-reach: prepare get_merge_bases to handle any repo
  commit-reach.c: allow get_merge_bases_many_0 to handle any repo
  commit-reach.c: allow remove_redundant to handle any repo
  commit-reach.c: allow merge_bases_many to handle any repo
  commit-reach.c: allow paint_down_to_common to handle any repo
  commit: allow parse_commit* to handle any repo
  object: parse_object to honor its repository argument
  object-store: prepare has_{sha1, object}_file to handle any repo
  object-store: prepare read_object_file to deal with any repo
  ...

5 years agoMakefile: improve SPARSE_FLAGS customisation
Ramsay Jones [Tue, 5 Feb 2019 02:27:48 +0000 (02:27 +0000)] 
Makefile: improve SPARSE_FLAGS customisation

In order to enable greater user customisation of the SPARSE_FLAGS
variable, we introduce a new SP_EXTRA_FLAGS variable to use for
target specific settings. Without using the new variable, setting
the SPARSE_FLAGS on the 'make' command-line would also override the
value set by the target-specific rules in the Makefile (effectively
making them useless). Also, this enables the SP_EXTRA_FLAGS to be
used in the future for any other internal customisations, such as
for some platform specific values.

In addition, we initialise the SPARSE_FLAGS to the default (empty)
value using a conditional assignment (?=). This allows SPARSE_FLAGS
to be set from the environment as well as from the command-line.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoconfig.mak.uname: remove obsolete SPARSE_FLAGS setting
Ramsay Jones [Tue, 5 Feb 2019 02:25:53 +0000 (02:25 +0000)] 
config.mak.uname: remove obsolete SPARSE_FLAGS setting

An upcoming commit will change the semantics of the SPARSE_FLAGS
variable from an internal to a user only customisation variable.
The MinGW configuration section contains an obsolete setting for
this variable which was used (some years ago) to cater to an error
in the Win32 system header files. Since 'sparse' does not currently
support the MinGW platform, nobody on that platform can be relying
on this setting today. Remove this use of the SPARSE_FLAGS variable.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agogit-submodule.sh: shorten submodule SHA-1s using rev-parse
Sven van Haastregt [Sun, 3 Feb 2019 21:00:27 +0000 (21:00 +0000)] 
git-submodule.sh: shorten submodule SHA-1s using rev-parse

Until now, `git submodule summary` was always emitting 7-character
SHA-1s that have a higher chance of being ambiguous for larger
repositories.  Use `git rev-parse --short` instead, which will
determine suitable short SHA-1 lengths.

When a submodule hasn't been initialized with "submodule init" or
not cloned, `git rev-parse` would not work in it yet; as a fallback,
use the original method of cutting at 7 hexdigits.

Signed-off-by: Sven van Haastregt <svenvh@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agofetch-pack: clear alternate shallow when complete
brian m. carlson [Mon, 4 Feb 2019 00:06:50 +0000 (00:06 +0000)] 
fetch-pack: clear alternate shallow when complete

When we write an alternate shallow file in update_shallow, we write it
into the lock file. The string stored in alternate_shallow_file is
copied from the lock file path, but it is freed the moment that the lock
file is closed, since we call strbuf_release to free that path.

This used to work, since we did not invoke git index-pack more than
once, but now that we do, we reuse the freed memory. Ensure we reset the
value to NULL to avoid using freed memory. git index-pack will read the
repository's shallow file, which will have been updated with the correct
information.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>