gitweb.git
Merge branch 'cb/fsmonitor-intfix' into maintJunio C Hamano Mon, 29 Jul 2019 19:38:15 +0000 (12:38 -0700)

Merge branch 'cb/fsmonitor-intfix' into maint

Variable type fix.

* cb/fsmonitor-intfix:
fsmonitor: avoid signed integer overflow / infinite loop

Merge branch 'rs/copy-array' into maintJunio C Hamano Mon, 29 Jul 2019 19:38:15 +0000 (12:38 -0700)

Merge branch 'rs/copy-array' into maint

Code clean-up.

* rs/copy-array:
use COPY_ARRAY for copying arrays
coccinelle: use COPY_ARRAY for copying arrays

Merge branch 'js/t3404-typofix' into maintJunio C Hamano Mon, 29 Jul 2019 19:38:14 +0000 (12:38 -0700)

Merge branch 'js/t3404-typofix' into maint

Typofix.

* js/t3404-typofix:
t3404: fix a typo

Merge branch 'cb/mkstemps-uint-type-fix' into maintJunio C Hamano Mon, 29 Jul 2019 19:38:14 +0000 (12:38 -0700)

Merge branch 'cb/mkstemps-uint-type-fix' into maint

Variable type fix.

* cb/mkstemps-uint-type-fix:
wrapper: avoid undefined behaviour in macOS

Merge branch 'js/t0001-case-insensitive' into maintJunio C Hamano Mon, 29 Jul 2019 19:38:14 +0000 (12:38 -0700)

Merge branch 'js/t0001-case-insensitive' into maint

Test update.

* js/t0001-case-insensitive:
t0001: fix on case-insensitive filesystems

Merge branch 'jw/gitweb-sample-update' into maintJunio C Hamano Mon, 29 Jul 2019 19:38:13 +0000 (12:38 -0700)

Merge branch 'jw/gitweb-sample-update' into maint

Doc update.

* jw/gitweb-sample-update:
doc: don't use git.kernel.org as example gitweb URL

Merge branch 'sg/t5551-fetch-smart-error-is-translated... Junio C Hamano Mon, 29 Jul 2019 19:38:13 +0000 (12:38 -0700)

Merge branch 'sg/t5551-fetch-smart-error-is-translated' into maint

Test update.

* sg/t5551-fetch-smart-error-is-translated:
t5551: use 'test_i18ngrep' to check translated output

Merge branch 'jt/t5551-test-chunked' into maintJunio C Hamano Mon, 29 Jul 2019 19:38:13 +0000 (12:38 -0700)

Merge branch 'jt/t5551-test-chunked' into maint

Update smart-http test.

* jt/t5551-test-chunked:
t5551: test usage of chunked encoding explicitly

Merge branch 'sg/git-C-empty-doc' into maintJunio C Hamano Mon, 29 Jul 2019 19:38:13 +0000 (12:38 -0700)

Merge branch 'sg/git-C-empty-doc' into maint

Doc update.

* sg/git-C-empty-doc:
Document that 'git -C ""' works and doesn't change directory

Merge branch 'sg/ci-brew-gcc-workaround' into maintJunio C Hamano Mon, 29 Jul 2019 19:38:12 +0000 (12:38 -0700)

Merge branch 'sg/ci-brew-gcc-workaround' into maint

Dev support update.

* sg/ci-brew-gcc-workaround:
ci/lib.sh: update a comment about installed P4 and Git-LFS versions
ci: disable Homebrew's auto cleanup
ci: don't update Homebrew

Merge branch 'js/trace2-signo-typofix' into maintJunio C Hamano Mon, 29 Jul 2019 19:38:12 +0000 (12:38 -0700)

Merge branch 'js/trace2-signo-typofix' into maint

Documentation fix.

* js/trace2-signo-typofix:
trace2: correct trace2 field name documentation

Merge branch 'di/readme-markup-fix' into maintJunio C Hamano Mon, 29 Jul 2019 19:38:12 +0000 (12:38 -0700)

Merge branch 'di/readme-markup-fix' into maint

Docfix.

* di/readme-markup-fix:
README: fix rendering of text in angle brackets

Merge branch 'vn/xmmap-gently' into maintJunio C Hamano Mon, 29 Jul 2019 19:38:12 +0000 (12:38 -0700)

Merge branch 'vn/xmmap-gently' into maint

Clean-up an error codepath.

* vn/xmmap-gently:
read-cache.c: do not die if mmap fails

Merge branch 'rm/gpg-program-doc-fix' into maintJunio C Hamano Mon, 29 Jul 2019 19:38:12 +0000 (12:38 -0700)

Merge branch 'rm/gpg-program-doc-fix' into maint

Docfix.

* rm/gpg-program-doc-fix:
gpg(docs): use correct --verify syntax

Merge branch 'js/unmap-before-ext-diff' into maintJunio C Hamano Mon, 29 Jul 2019 19:38:11 +0000 (12:38 -0700)

Merge branch 'js/unmap-before-ext-diff' into maint

Windows update.

* js/unmap-before-ext-diff:
diff: munmap() file contents before running external diff

Merge branch 'js/gcc-8-and-9' into maintJunio C Hamano Mon, 29 Jul 2019 19:38:11 +0000 (12:38 -0700)

Merge branch 'js/gcc-8-and-9' into maint

Code clean-up for new compilers.
The 'kwset' one may get a wholesale replacement, either with new
version of kwset from upstream or removal of its users, but in the
meantime, it is probably OK to merge it down.

* js/gcc-8-and-9:
config: avoid calling `labs()` on too-large data type
winansi: simplify loading the GetCurrentConsoleFontEx() function
kwset: allow building with GCC 8
poll (mingw): allow compiling with GCC 8 and DEVELOPER=1

Flush fixes up to the third batch post 2.22.0Junio C Hamano Thu, 25 Jul 2019 21:32:36 +0000 (14:32 -0700)

Flush fixes up to the third batch post 2.22.0

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'ab/hash-object-doc' into maintJunio C Hamano Thu, 25 Jul 2019 21:27:16 +0000 (14:27 -0700)

Merge branch 'ab/hash-object-doc' into maint

Doc update.

* ab/hash-object-doc:
hash-object doc: stop mentioning git-cvsimport

Merge branch 'cm/send-email-document-req-modules' into... Junio C Hamano Thu, 25 Jul 2019 21:27:15 +0000 (14:27 -0700)

Merge branch 'cm/send-email-document-req-modules' into maint

A doc update.

* cm/send-email-document-req-modules:
send-email: update documentation of required Perl modules

Merge branch 'sw/git-p4-unshelve-branched-files' into... Junio C Hamano Thu, 25 Jul 2019 21:27:15 +0000 (14:27 -0700)

Merge branch 'sw/git-p4-unshelve-branched-files' into maint

"git p4" update.

* sw/git-p4-unshelve-branched-files:
git-p4: allow unshelving of branched files

Merge branch 'js/bisect-helper-check-get-oid-return... Junio C Hamano Thu, 25 Jul 2019 21:27:14 +0000 (14:27 -0700)

Merge branch 'js/bisect-helper-check-get-oid-return-value' into maint

Code cleanup.

* js/bisect-helper-check-get-oid-return-value:
bisect--helper: verify HEAD could be parsed before continuing

Merge branch 'es/git-debugger-doc' into maintJunio C Hamano Thu, 25 Jul 2019 21:27:14 +0000 (14:27 -0700)

Merge branch 'es/git-debugger-doc' into maint

Doc update.

* es/git-debugger-doc:
doc: hint about GIT_DEBUGGER in CodingGuidelines

Merge branch 'mo/clang-format-for-each-update' into... Junio C Hamano Thu, 25 Jul 2019 21:27:14 +0000 (14:27 -0700)

Merge branch 'mo/clang-format-for-each-update' into maint

The list of for-each like macros used by clang-format has been
updated.

* mo/clang-format-for-each-update:
clang-format: use git grep to generate the ForEachMacros list

Merge branch 'md/url-parse-harden' into maintJunio C Hamano Thu, 25 Jul 2019 21:27:13 +0000 (14:27 -0700)

Merge branch 'md/url-parse-harden' into maint

The URL decoding code has been updated to avoid going past the end
of the string while parsing %-<hex>-<hex> sequence.

* md/url-parse-harden:
url: do not allow %00 to represent NUL in URLs
url: do not read past end of buffer

Merge branch 'an/ignore-doc-update' into maintJunio C Hamano Thu, 25 Jul 2019 21:27:13 +0000 (14:27 -0700)

Merge branch 'an/ignore-doc-update' into maint

The description about slashes in gitignore patterns (used to
indicate things like "anchored to this level only" and "only
matches directories") has been revamped.

* an/ignore-doc-update:
gitignore.txt: make slash-rules more readable

Merge branch 'md/list-objects-filter-memfix' into maintJunio C Hamano Thu, 25 Jul 2019 21:27:12 +0000 (14:27 -0700)

Merge branch 'md/list-objects-filter-memfix' into maint

The filter_data used in the list-objects-filter (which manages a
lazily sparse clone repository) did not use the dynamic array API
correctly---'nr' is supposed to point at one past the last element
of the array in use. This has been corrected.

* md/list-objects-filter-memfix:
list-objects-filter: correct usage of ALLOC_GROW

Merge branch 'jt/partial-clone-missing-ref-delta-base... Junio C Hamano Thu, 25 Jul 2019 21:27:12 +0000 (14:27 -0700)

Merge branch 'jt/partial-clone-missing-ref-delta-base' into maint

"git fetch" into a lazy clone forgot to fetch base objects that are
necessary to complete delta in a thin packfile, which has been
corrected.

* jt/partial-clone-missing-ref-delta-base:
t5616: cover case of client having delta base
t5616: use correct flag to check object is missing
index-pack: prefetch missing REF_DELTA bases
t5616: refactor packfile replacement

Merge branch 'xl/record-partial-clone-origin' into... Junio C Hamano Thu, 25 Jul 2019 21:27:12 +0000 (14:27 -0700)

Merge branch 'xl/record-partial-clone-origin' into maint

When creating a partial clone, the object filtering criteria is
recorded for the origin of the clone, but this incorrectly used a
hardcoded name "origin" to name that remote; it has been corrected
to honor the "--origin <name>" option.

* xl/record-partial-clone-origin:
clone: respect user supplied origin name when setting up partial clone

Merge branch 'pb/request-pull-verify-remote-ref' into... Junio C Hamano Thu, 25 Jul 2019 21:27:11 +0000 (14:27 -0700)

Merge branch 'pb/request-pull-verify-remote-ref' into maint

"git request-pull" learned to warn when the ref we ask them to pull
from in the local repository and in the published repository are
different.

* pb/request-pull-verify-remote-ref:
request-pull: warn if the remote object is not the same as the local one
request-pull: quote regex metacharacters in local ref

Merge branch 'mm/p4-unshelve-windows-fix' into maintJunio C Hamano Thu, 25 Jul 2019 21:27:11 +0000 (14:27 -0700)

Merge branch 'mm/p4-unshelve-windows-fix' into maint

The command line to invoke a "git cat-file" command from inside
"git p4" was not properly quoted to protect a caret and running a
broken command on Windows, which has been corrected.

* mm/p4-unshelve-windows-fix:
p4 unshelve: fix "Not a valid object name HEAD0" on Windows

Merge branch 'bb/unicode-12.1-reiwa' into maintJunio C Hamano Thu, 25 Jul 2019 21:27:10 +0000 (14:27 -0700)

Merge branch 'bb/unicode-12.1-reiwa' into maint

Update to Unicode 12.1 width table.

* bb/unicode-12.1-reiwa:
unicode: update the width tables to Unicode 12.1

Merge branch 'js/fsmonitor-unflake' into maintJunio C Hamano Thu, 25 Jul 2019 21:27:10 +0000 (14:27 -0700)

Merge branch 'js/fsmonitor-unflake' into maint

The data collected by fsmonitor was not properly written back to
the on-disk index file, breaking t7519 tests occasionally, which
has been corrected.

* js/fsmonitor-unflake:
mark_fsmonitor_valid(): mark the index as changed if needed
fill_stat_cache_info(): prepare for an fsmonitor fix

Merge branch 'vv/merge-squash-with-explicit-commit... Junio C Hamano Thu, 25 Jul 2019 21:27:10 +0000 (14:27 -0700)

Merge branch 'vv/merge-squash-with-explicit-commit' into maint

"git merge --squash" is designed to update the working tree and the
index without creating the commit, and this cannot be countermanded
by adding the "--commit" option; the command now refuses to work
when both options are given.

* vv/merge-squash-with-explicit-commit:
merge: refuse --commit with --squash

Merge branch 'js/bundle-verify-require-object-store... Junio C Hamano Thu, 25 Jul 2019 21:27:09 +0000 (14:27 -0700)

Merge branch 'js/bundle-verify-require-object-store' into maint

"git bundle verify" needs to see if prerequisite objects exist in
the receiving repository, but the command did not check if we are
in a repository upfront, which has been corrected.

* js/bundle-verify-require-object-store:
bundle verify: error out if called without an object database

Merge branch 'jk/am-i-resolved-fix' into maintJunio C Hamano Thu, 25 Jul 2019 21:27:09 +0000 (14:27 -0700)

Merge branch 'jk/am-i-resolved-fix' into maint

"git am -i --resolved" segfaulted after trying to see a commit as
if it were a tree, which has been corrected.

* jk/am-i-resolved-fix:
am: fix --interactive HEAD tree resolution
am: drop tty requirement for --interactive
am: read interactive input from stdin
am: simplify prompt response handling

Merge branch 'jk/HEAD-symref-in-xfer-namespaces' into... Junio C Hamano Thu, 25 Jul 2019 21:27:09 +0000 (14:27 -0700)

Merge branch 'jk/HEAD-symref-in-xfer-namespaces' into maint

The server side support for "git fetch" used to show incorrect
value for the HEAD symbolic ref when the namespace feature is in
use, which has been corrected.

* jk/HEAD-symref-in-xfer-namespaces:
upload-pack: strip namespace from symref data

Merge branch 'ew/server-info-remove-crufts' into maintJunio C Hamano Thu, 25 Jul 2019 21:27:08 +0000 (14:27 -0700)

Merge branch 'ew/server-info-remove-crufts' into maint

"git update-server-info" used to leave stale packfiles in its
output, which has been corrected.

* ew/server-info-remove-crufts:
server-info: do not list unlinked packs

Merge branch 'es/grep-require-name-when-needed' into... Junio C Hamano Thu, 25 Jul 2019 21:27:08 +0000 (14:27 -0700)

Merge branch 'es/grep-require-name-when-needed' into maint

More parameter validation.

* es/grep-require-name-when-needed:
grep: fail if call could output and name is null

Merge branch 'ds/object-info-for-prefetch-fix' into... Junio C Hamano Thu, 25 Jul 2019 21:27:08 +0000 (14:27 -0700)

Merge branch 'ds/object-info-for-prefetch-fix' into maint

Code cleanup and futureproof.

* ds/object-info-for-prefetch-fix:
sha1-file: split OBJECT_INFO_FOR_PREFETCH

Merge branch 'mh/import-transport-fd-fix' into maintJunio C Hamano Thu, 25 Jul 2019 21:27:07 +0000 (14:27 -0700)

Merge branch 'mh/import-transport-fd-fix' into maint

The ownership rule for the file descriptor to fast-import remote
backend was mixed up, leading to unrelated file descriptor getting
closed, which has been fixed.

* mh/import-transport-fd-fix:
Use xmmap_gently instead of xmmap in use_pack
dup() the input fd for fast-import used for remote helpers

Merge branch 'nd/corrupt-worktrees' into maintJunio C Hamano Thu, 25 Jul 2019 21:27:07 +0000 (14:27 -0700)

Merge branch 'nd/corrupt-worktrees' into maint

"git worktree add" used to fail when another worktree connected to
the same repository was corrupt, which has been corrected.

* nd/corrupt-worktrees:
worktree add: be tolerant of corrupt worktrees

Merge branch 'nd/init-relative-template-fix' into maintJunio C Hamano Thu, 25 Jul 2019 21:27:06 +0000 (14:27 -0700)

Merge branch 'nd/init-relative-template-fix' into maint

A relative pathname given to "git init --template=<path> <repo>"
ought to be relative to the directory "git init" gets invoked in,
but it instead was made relative to the repository, which has been
corrected.

* nd/init-relative-template-fix:
init: make --template path relative to $CWD

README: fix rendering of text in angle bracketsDoug Ilijev Thu, 18 Jul 2019 19:08:45 +0000 (12:08 -0700)

README: fix rendering of text in angle brackets

Markdown incorrectly interpreted `<commandname>` as an HTML tag;
use backticks to escape `Documentation/git-<commandname>.txt` to ensure
that it renders the text as intended.

Signed-off-by: Doug Ilijev <doug.ilijev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

read-cache.c: do not die if mmap failsVarun Naik Sun, 14 Jul 2019 03:01:53 +0000 (20:01 -0700)

read-cache.c: do not die if mmap fails

do_read_index() mmaps the index, or tries to die with an error message
on failure. It should call xmmap_gently(), which returns MAP_FAILED,
rather than xmmap(), which dies with its own error message.

An easy way to cause this mmap to fail is by setting $GIT_INDEX_FILE to
a path to a directory and then invoking any command that reads from the
index.

Signed-off-by: Varun Naik <vcnaik94@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gpg(docs): use correct --verify syntaxRobert Morgan Fri, 12 Jul 2019 15:33:57 +0000 (08:33 -0700)

gpg(docs): use correct --verify syntax

The gpg --verify usage example within the 'gpg.program' variable
reference provides an incorrect example of the gpg --verify command
arguments.

The command argument order, when providing both a detached signature
and data, should be signature first and data second:
https://gnupg.org/documentation/manuals/gnupg/Operational-GPG-Commands.html

Signed-off-by: Robert Morgan <robert.thomas.morgan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff: munmap() file contents before running external... Johannes Schindelin Thu, 11 Jul 2019 08:23:41 +0000 (01:23 -0700)

diff: munmap() file contents before running external diff

When running an external diff from, say, a diff tool, it is safe to
assume that we want to write the files in question. On Windows, that
means that there cannot be any other process holding an open handle to
said files, or even just a mapped region.

So let's make sure that `git diff` itself is not holding any open handle
to the files in question.

In fact, we will just release the file pair right away, as the external
diff uses the files we just wrote, so we do not need to hold the file
contents in memory anymore.

This fixes https://github.com/git-for-windows/git/issues/1315

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

trace2: correct trace2 field name documentationJosh Steadmon Tue, 9 Jul 2019 23:09:01 +0000 (16:09 -0700)

trace2: correct trace2 field name documentation

Correct the api-trace2 documentation, which lists "signal" as an
expected field for the signal event type, but which actually outputs
"signo" as the field name.

Signed-off-by: Josh Steadmon <steadmon@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ci/lib.sh: update a comment about installed P4 and... SZEDER Gábor Sat, 6 Jul 2019 16:21:14 +0000 (18:21 +0200)

ci/lib.sh: update a comment about installed P4 and Git-LFS versions

A comment in 'ci/lib.sh' claims that the "OS X build installs the
latest available versions" of P4 and Git-LFS, but since f2f47150
("ci: don't update Homebrew", 2019-07-03) that's no longer the case,
as it will install the versions which were recorded in the image's
Homebrew database when the image was created.

Update this comment accordingly.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ci: disable Homebrew's auto cleanupSZEDER Gábor Wed, 3 Jul 2019 10:47:48 +0000 (12:47 +0200)

ci: disable Homebrew's auto cleanup

Lately Homebrew learned to automagically clean up information about
outdated packages during other 'brew' commands, which might be useful
for the avarage user, but is a waste of time in CI build jobs, because
the next build jobs will start from the exact same image containing
the same outdated packages anyway.

Export HOMEBREW_NO_INSTALL_CLEANUP=1 to disable this auto cleanup feature,
shaving off about 20-30s from the time needed to install dependencies
in our macOS build jobs on Travis CI.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ci: don't update HomebrewSZEDER Gábor Wed, 3 Jul 2019 10:47:47 +0000 (12:47 +0200)

ci: don't update Homebrew

Lately our GCC macOS build job on Travis CI has been erroring out
while installing dependencies with:

+brew link gcc@8
Error: No such keg: /usr/local/Cellar/gcc@8
The command "ci/install-dependencies.sh" failed and exited with 1 during .

Now, while gcc@8 is still pre-installed (but not linked) and would be
perfectly usable in the Travis CI macOS image we use [1], it's at
version 8.2. However, when installing dependencies we first
explicitly run 'brew update', which spends over two minutes to update
itself and information about the available packages, and it learns
about GCC 8.3. After that point gcc@8 exclusively refers to v8.3,
and, unfortunately, 'brew' is just too dumb to be able to do anything
with the still installed 8.2 package, and the subsequent 'brew link
gcc@8' fails. (Even 'brew uninstall gcc@8' fails with the same
error!)

Don't run 'brew update' to keep the already installed GCC 8.2 'brew
link'-able. Note that in addition we have to 'export
HOMEBREW_NO_AUTO_UPDATE=1' first, because 'brew' is so very helpful
that it would implicitly run update for us on the next 'brew install
<pkg>' otherwise.

Disabling 'brew update' has additional benefits:

- It shaves off 2-3mins from the ~4mins currently spent on
installing dependencies, and the macOS build jobs have always been
prone to exceeding the time limit on Travis CI.

- Our builds won't suddenly break because of the occasional Homebrew
breakages [2].

The drawback is that we'll be stuck with slightly older versions of
the packages that we install via Homebrew (Git-LFS 2.5.2 and Perforce
2018.1; they are currently at 2.7.2 and 2019.1, respectively). We
might want to reconsider this decision as time goes on and/or switch
to a more recent macOS image as they become available.

[1] 2000ac9fbf (travis-ci: switch to Xcode 10.1 macOS image,
2019-01-17)

[2] See e.g. a1ccaedd62 (travis-ci: make the OSX build jobs' 'brew
update' more quiet, 2019-02-02) or

https://public-inbox.org/git/20180907032002.23366-1-szeder.dev@gmail.com/T/#+u

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Document that 'git -C ""' works and doesn't change... SZEDER Gábor Sat, 29 Jun 2019 08:24:57 +0000 (10:24 +0200)

Document that 'git -C ""' works and doesn't change directory

It's been behaving so since 6a536e2076 (git: treat "git -C '<path>'"
as a no-op when <path> is empty, 2015-03-06).

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5551: test usage of chunked encoding explicitlyJonathan Tan Wed, 5 Jun 2019 19:26:24 +0000 (12:26 -0700)

t5551: test usage of chunked encoding explicitly

When run using GIT_TEST_PROTOCOL_VERSION=2, a test in t5551 fails
because 4 POSTs (probe, ls-refs, probe, fetch) are sent instead of 2
(probe, fetch).

One way to resolve this would be to relax the condition (from "= 2" to
greater than 1, say), but upon further inspection, the test probably
shouldn't be counting the number of POSTs. This test states that large
requests are split across POSTs, but this is not correct; the main
change is that chunked transfer encoding is used, but the request is
still contained within one POST. (The test coincidentally works because
Git indeed sends 2 POSTs in the case of a large request, but that is
because, as stated above, the first POST is a probing RPC - see
post_rpc() in remote-curl.c for more information.)

Therefore, instead of counting POSTs, check that chunked transfer
encoding is used. This also has the desirable side effect of passing
with GIT_TEST_PROTOCOL_VERSION=2.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Acked-by: Derrick Stolee <dstolee@microsoft.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5551: use 'test_i18ngrep' to check translated outputSZEDER Gábor Mon, 24 Jun 2019 12:44:46 +0000 (14:44 +0200)

t5551: use 'test_i18ngrep' to check translated output

The two tests 'invalid Content-Type rejected' and 'server-side error
detected' in 't5551-http-fetch-smart.sh' use "plain" 'grep' to check
that 'git clone' failed with the expected error message, but the
messages they are checking are translated, and, consequently, these
tests fail when the test script is run with GIT_TEST_GETTEXT_POISON
enabled.

Use 'test_i18ngrep' instead.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

doc: don't use git. as example gitweb URLJakub Wilk Sat, 22 Jun 2019 16:48:57 +0000 (18:48 +0200)

doc: don't use git. as example gitweb URL

git.kernel.org uses cgit, not gitweb, these days:

$ w3m -dump 'http://git.kernel.org/?p=git/git.git;a=tree;f=gitweb' | grep -w generated
generated by cgit 1.2-0.3.lf.el7 (git 2.18.0) at 2019-06-22 16:14:38 +0000

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t0001: fix on case-insensitive filesystemsJohannes Schindelin Mon, 24 Jun 2019 17:40:05 +0000 (19:40 +0200)

t0001: fix on case-insensitive filesystems

On a case-insensitive filesystem, such as HFS+ or NTFS, it is possible
that the idea Bash has of the current directory differs in case from
what Git thinks it is. That's totally okay, though, and we should not
expect otherwise.

On Windows, for example, when you call

cd C:\GIT-SDK-64

in a PowerShell and there exists a directory called `C:\git-sdk-64`, the
current directory will be reported in all upper-case. Even in a Bash
that you might call from that PowerShell. Git, however, will have
normalized this via `GetFinalPathByHandle()`, and the expectation in
t0001 that the recorded gitdir will match what `pwd` says will be
violated.

Let's address this by comparing these paths in a case-insensitive
manner when `core.ignoreCase` is `true`.

Reported by Jameson Miller.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

wrapper: avoid undefined behaviour in macOSCarlo Marcelo Arenas Belón Sun, 16 Jun 2019 18:40:03 +0000 (11:40 -0700)

wrapper: avoid undefined behaviour in macOS

0620b39b3b ("compat: add a mkstemps() compatibility function", 2009-05-31)
included a function based on code from libiberty which would result in
undefined behaviour in platforms where timeval's tv_usec is a 32-bit signed
type as shown by:

wrapper.c:505:31: runtime error: left shift of 594546 by 16 places cannot be represented in type '__darwin_suseconds_t' (aka 'int')

interestingly the version of this code from gcc never had this bug and the
code had a cast that would had prevented the issue (at least in 64-bit
platforms) but was misapplied.

change the cast to uint64_t so it also works in 32-bit platforms.

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

use COPY_ARRAY for copying arraysRené Scharfe Sat, 15 Jun 2019 18:36:35 +0000 (20:36 +0200)

use COPY_ARRAY for copying arrays

Convert calls of memcpy(3) to use COPY_ARRAY, which shortens and
simplifies the code a bit.

Patch generated by Coccinelle and contrib/coccinelle/array.cocci.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

coccinelle: use COPY_ARRAY for copying arraysRené Scharfe Sat, 15 Jun 2019 18:32:58 +0000 (20:32 +0200)

coccinelle: use COPY_ARRAY for copying arrays

The current semantic patch for COPY_ARRAY transforms memcpy(3) calls on
pointers, but Coccinelle distinguishes them from arrays. It already
contains three rules to handle the options for sizeof (i.e. source,
destination and type), and handling arrays as source and destination
would require four times as many rules if we enumerated all cases.

We also don't handle array subscripts, and supporting that would
increase the number of rules by another factor of four. (An isomorphism
telling Coccinelle that "sizeof x[...]" is equivalent to "sizeof *x"
would be nice..)

Support arrays and array subscripts, but keep the number of rules down
by adding normalization steps: First turn array subscripts into
derefences, then determine the types of expressions used with sizeof and
replace them with these types, and then convert the different possible
combinations of arrays and pointers with memcpy(3) to COPY_ARRAY.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fsmonitor: avoid signed integer overflow / infinite... Carlo Marcelo Arenas Belón Sat, 15 Jun 2019 16:11:35 +0000 (09:11 -0700)

fsmonitor: avoid signed integer overflow / infinite loop

883e248b8a ("fsmonitor: teach git to optionally utilize a file system
monitor to speed up detecting new or changed files.", 2017-09-22) uses
an int in a loop that would wrap if index_state->cache_nr (unsigned)
is bigger than INT_MAX

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t3404: fix a typoJohannes Schindelin Fri, 14 Jun 2019 12:16:08 +0000 (05:16 -0700)

t3404: fix a typo

This one slipped through the review of a9279c678588 (sequencer: do not
squash 'reword' commits when we hit conflicts, 2018-06-19).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

config: avoid calling `labs()` on too-large data typeJohannes Schindelin Thu, 13 Jun 2019 11:49:47 +0000 (04:49 -0700)

config: avoid calling `labs()` on too-large data type

The `labs()` function operates, as the initial `l` suggests, on `long`
parameters. However, in `config.c` we tried to use it on values of type
`intmax_t`.

This problem was found by GCC v9.x.

To fix it, let's just "unroll" the function (i.e. negate the value if it
is negative).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

winansi: simplify loading the GetCurrentConsoleFontEx... Johannes Schindelin Thu, 13 Jun 2019 11:49:46 +0000 (04:49 -0700)

winansi: simplify loading the GetCurrentConsoleFontEx() function

We introduced helper macros to simplify loading functions dynamically.
Might just as well use them.

This also side-steps a compiler warning when building with GCC v8.x: it
would complain about casting between incompatible function pointers.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

kwset: allow building with GCC 8Johannes Schindelin Thu, 13 Jun 2019 11:49:45 +0000 (04:49 -0700)

kwset: allow building with GCC 8

The kwset functionality makes use of the obstack code, which expects to
be handed a function that can allocate large chunks of data. It expects
that function to accept a `size` parameter of type `long`.

This upsets GCC 8 on Windows, because `long` does not have the same
bit size as `size_t` there.

Now, the proper thing to do would be to switch to `size_t`. But this
would make us deviate from the "upstream" code even further, making it
hard to synchronize with newer versions, and also it would be quite
involved because that `long` type is so invasive in that code.

Let's punt, and instead provide a super small wrapper around
`xmalloc()`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

poll (mingw): allow compiling with GCC 8 and DEVELOPER=1Johannes Schindelin Thu, 13 Jun 2019 11:49:44 +0000 (04:49 -0700)

poll (mingw): allow compiling with GCC 8 and DEVELOPER=1

The return type of the `GetProcAddress()` function is `FARPROC` which
evaluates to `long long int (*)()`, i.e. it cannot be cast to the
correct function signature by GCC 8.

To work around that, we first cast to `void *` and go on with our merry
lives.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5616: cover case of client having delta baseJonathan Tan Tue, 11 Jun 2019 21:06:47 +0000 (14:06 -0700)

t5616: cover case of client having delta base

When fetching into a partial clone, Git first prefetches missing
REF_DELTA bases from the promisor remote. (This feature was introduced
in [1].) But as can be seen in a recent test coverage report [2], the
case in which a REF_DELTA base is already present is not covered by
tests.

Extend the tests slightly to cover this case.

[1] 8a30a1efd1 ("index-pack: prefetch missing REF_DELTA bases",
2019-05-15).
[2] https://public-inbox.org/git/396091fc-5572-19a5-4f18-61c258590dd5@gmail.com/

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5616: use correct flag to check object is missingJonathan Tan Tue, 11 Jun 2019 21:06:46 +0000 (14:06 -0700)

t5616: use correct flag to check object is missing

If we want to check whether an object is missing, the correct flag to
pass to rev-list is --ignore-missing; --exclude-promisor-objects will
exclude any object that came from the promisor remote, whether it is
present or missing. Use the correct flag.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 2.22 v2.22.0Junio C Hamano Fri, 7 Jun 2019 16:39:21 +0000 (09:39 -0700)

Git 2.22

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge tag 'l10n-2.22.0-rnd3' of git://github.com/git... Junio C Hamano Fri, 7 Jun 2019 16:36:32 +0000 (09:36 -0700)

Merge tag 'l10n-2.22.0-rnd3' of git://github.com/git-l10n/git-po

l10n-2.22.0-rnd3

* tag 'l10n-2.22.0-rnd3' of git://github.com/git-l10n/git-po: (25 commits)
l10n: fr.po: Review French translation
l10n: de.po: Update German translation
l10n: de.po: improve description of 'git reset --quiet'
l10n: TEAMS: Change German translation team leader
l10n: bg.po: Updated Bulgarian translation (4581t)
l10n: zh_CN: Revision for git v2.22.0 l10n
l10n: zh_CN: for git v2.22.0 l10n round 1~3
l10n: es: 2.22.0 round 3
l10n: it.po: Updated Italian translation
l10n: fr v2.22.0 rnd 3
l10n: vi.po(4581t): Updated Vietnamese translation for v2.22.0 round 3
l10n: git.pot: v2.22.0 round 3 (3 new, 2 removed)
l10n: es: 2.22.0 round 2
l10n: bg.po: Updated Bulgarian translation (4580t)
l10n: vi.po(4580t): Updated Vietnamese translation for v2.22.0 round 2
l10n: fr.po v2.22.0 round 2
l10n: git.pot: v2.22.0 round 2 (6 new, 3 removed)
l10n: bg.po: Updated Bulgarian translation (4577t)
l10n: es: 2.22.0 round 1
l10n: vi.po(4577t): Updated Vietnamese translation for v2.22.0 round 1
...

Merge branch 'fr_review' of git://github.com/jnavila/gitJiang Xin Fri, 7 Jun 2019 08:51:09 +0000 (16:51 +0800)

Merge branch 'fr_review' of git://github.com/jnavila/git

* 'fr_review' of git://github.com/jnavila/git:
l10n: fr.po: Review French translation

Merge branch 'master' of git://github.com/alshopov... Jiang Xin Fri, 7 Jun 2019 08:50:23 +0000 (16:50 +0800)

Merge branch 'master' of git://github.com/alshopov/git-po

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

l10n: fr.po: Review French translationCédric Malard Wed, 5 Jun 2019 21:33:52 +0000 (23:33 +0200)

l10n: fr.po: Review French translation

Signed-off-by: Cédric Malard <c.malard-git@valdun.net>
Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>

Merge branch 'en/merge-directory-renames-fix'Junio C Hamano Thu, 6 Jun 2019 21:03:36 +0000 (14:03 -0700)

Merge branch 'en/merge-directory-renames-fix'

Recent code restructuring of merge-recursive engine introduced a
regression dealing with rename/add conflict.

* en/merge-directory-renames-fix:
merge-recursive: restore accidentally dropped setting of path

l10n: de.po: Update German translationMatthias Rüster Sat, 1 Jun 2019 12:32:49 +0000 (14:32 +0200)

l10n: de.po: Update German translation

Reviewed-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Matthias Rüster <matthias.ruester@gmail.com>

l10n: de.po: improve description of 'git reset --quiet'Ralf Thielow Thu, 28 Feb 2019 18:25:51 +0000 (19:25 +0100)

l10n: de.po: improve description of 'git reset --quiet'

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>

l10n: TEAMS: Change German translation team leaderMatthias Rüster Sat, 1 Jun 2019 12:32:44 +0000 (14:32 +0200)

l10n: TEAMS: Change German translation team leader

Acked-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Matthias Rüster <matthias.ruester@gmail.com>

merge-recursive: restore accidentally dropped setting... Elijah Newren Tue, 4 Jun 2019 20:27:50 +0000 (13:27 -0700)

merge-recursive: restore accidentally dropped setting of path

In commit 8daec1df03de ("merge-recursive: switch from (oid,mode) pairs
to a diff_filespec", 2019-04-05), we actually switched from
(oid,mode,path) triplets to a diff_filespec -- but most callsites in the
patch only needed to worry about oid and mode so the commit message
focused on that. The oversight in the commit message apparently spilled
over to the code as well; one of the dozen or so callsites accidentally
dropped the setting of the path in the conversion. Restore the path
setting in that location.

Also, this pointed out that our testsuite was lacking a good rename/add
test, at least one that involved the need for merge content with the
rename. Add such a test, and since rename/add vs. add/rename could
possibly be important, redo the merge the opposite direction to make
sure we don't have issues with the direction of the merge. These
testcases failed before restoring the setting of path, but with the
paths appropriately set the testcases both pass.

Reported-by: Ben Humphreys <behumphreys@atlassian.com>
Based-on-patch-by: SZEDER Gábor <szeder.dev@gmail.com>
Tested-by: Ben Humphreys <behumphreys@atlassian.com>
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

l10n: bg.po: Updated Bulgarian translation (4581t)Alexander Shopov Wed, 5 Jun 2019 06:51:15 +0000 (08:51 +0200)

l10n: bg.po: Updated Bulgarian translation (4581t)

Signed-off-by: Alexander Shopov <ash@kambanaria.org>

l10n: zh_CN: Revision for git v2.22.0 l10nFangyi Zhou Sun, 2 Jun 2019 21:41:45 +0000 (22:41 +0100)

l10n: zh_CN: Revision for git v2.22.0 l10n

Revise 51 translations, improving consistency for some phrased.
Update email address for Fangyi Zhou

Signed-off-by: Fangyi Zhou <me@fangyi.io>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>

l10n: zh_CN: for git v2.22.0 l10n round 1~3Jiang Xin Tue, 16 Apr 2019 00:56:12 +0000 (08:56 +0800)

l10n: zh_CN: for git v2.22.0 l10n round 1~3

Translate 274 new messages (4581t0f0u) for git 2.22.0.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>

Merge branch '2.22' of https://github.com/ChrisADR... Jiang Xin Wed, 5 Jun 2019 00:35:35 +0000 (08:35 +0800)

Merge branch '2.22' of https://github.com/ChrisADR/git-po

* '2.22' of https://github.com/ChrisADR/git-po:
l10n: es: 2.22.0 round 3

Merge branch 'it-l10n-wip' of github.com:AlessandroMent... Jiang Xin Wed, 5 Jun 2019 00:17:28 +0000 (08:17 +0800)

Merge branch 'it-l10n-wip' of github.com:AlessandroMenti/git-po

* 'it-l10n-wip' of github.com:AlessandroMenti/git-po:
l10n: it.po: Updated Italian translation

l10n: es: 2.22.0 round 3Christopher Diaz Riveros Tue, 4 Jun 2019 23:52:28 +0000 (18:52 -0500)

l10n: es: 2.22.0 round 3

Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org>

clang-format: use git grep to generate the ForEachMacro... Miguel Ojeda Mon, 3 Jun 2019 22:48:14 +0000 (00:48 +0200)

clang-format: use git grep to generate the ForEachMacros list

The ForEachMacros list can reasonably be generated grepping
the C source code for macros with 'for_each' in their name.

Taken almost verbatim from the .clang-format file in the Linux kernel.

Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

url: do not allow %00 to represent NUL in URLsMatthew DeVore Tue, 4 Jun 2019 17:57:05 +0000 (10:57 -0700)

url: do not allow %00 to represent NUL in URLs

There is no reason to allow %00 to terminate a string, so do not allow it.
Otherwise, we end up returning arbitrary content in the string (that which is
after the %00) which is effectively hidden from callers and can escape sanity
checks and validation, and possible be used in tandem with a security
vulnerability to introduce a payload.

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

url: do not read past end of bufferMatthew DeVore Tue, 4 Jun 2019 17:57:04 +0000 (10:57 -0700)

url: do not read past end of buffer

url_decode_internal could have been tricked into reading past the length
of the **query buffer if there are fewer than 2 characters after a % (in
a null-terminated string, % would have to be the last character).
Prevent this from happening by checking len before decoding the %
sequence.

Helped-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Matthew DeVore <matvore@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitignore.txt: make slash-rules more readableDr. Adam Nielsen Tue, 4 Jun 2019 17:34:46 +0000 (19:34 +0200)

gitignore.txt: make slash-rules more readable

Renew paragraphs relevant for pattern with slash.
Aim to make it more clear and to avoid possible
pitfalls for the reader. Add some examples.

Signed-off-by: Dr. Adam Nielsen <admin@in-ici.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

l10n: it.po: Updated Italian translationAlessandro Menti Sun, 19 May 2019 06:51:55 +0000 (08:51 +0200)

l10n: it.po: Updated Italian translation

Signed-off-by: Alessandro Menti <alessandro.menti@alessandromenti.it>

l10n: fr v2.22.0 rnd 3Jean-Noël Avila Tue, 4 Jun 2019 17:53:32 +0000 (19:53 +0200)

l10n: fr v2.22.0 rnd 3

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>

l10n: vi.po(4581t): Updated Vietnamese translation... Tran Ngoc Quan Tue, 4 Jun 2019 01:10:46 +0000 (08:10 +0700)

l10n: vi.po(4581t): Updated Vietnamese translation for v2.22.0 round 3

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>

l10n: git.pot: v2.22.0 round 3 (3 new, 2 removed)Jiang Xin Tue, 4 Jun 2019 00:27:36 +0000 (08:27 +0800)

l10n: git.pot: v2.22.0 round 3 (3 new, 2 removed)

Generate po/git.pot from v2.22.0-rc3 for git v2.22.0 l10n round 3.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>

Merge branch 'master' of git://git./git/gitJiang Xin Tue, 4 Jun 2019 00:24:28 +0000 (08:24 +0800)

Merge branch 'master' of git://git./git/git

* 'master' of git://git.kernel.org/pub/scm/git/git:
Git 2.22-rc3
i18n: fix typos found during l10n for git 2.22.0
RelNotes: minor typo fixes in 2.22.0 draft
list-objects-filter: disable 'sparse:path' filters

Git 2.22-rc3 v2.22.0-rc3Junio C Hamano Mon, 3 Jun 2019 18:25:12 +0000 (11:25 -0700)

Git 2.22-rc3

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'cc/list-objects-filter-wo-sparse-path'Junio C Hamano Mon, 3 Jun 2019 18:18:54 +0000 (11:18 -0700)

Merge branch 'cc/list-objects-filter-wo-sparse-path'

Disable "--filter=sparse:path=<path>" that would allow reading from
paths on the filesystem.

* cc/list-objects-filter-wo-sparse-path:
list-objects-filter: disable 'sparse:path' filters

i18n: fix typos found during l10n for git 2.22.0Jiang Xin Sun, 2 Jun 2019 15:11:22 +0000 (23:11 +0800)

i18n: fix typos found during l10n for git 2.22.0

Fix two typos introduced by the following commits:

+ 31fba9d3b4 (diff-parseopt: convert --[src|dst]-prefix, 2019-03-24)
+ ed8b4132c8 (remote-curl: mark all error messages for translation,
2019-03-05)

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

RelNotes: minor typo fixes in 2.22.0 draftTodd Zullinger Sat, 1 Jun 2019 15:51:06 +0000 (11:51 -0400)

RelNotes: minor typo fixes in 2.22.0 draft

Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

l10n: es: 2.22.0 round 2Christopher Diaz Riveros Mon, 3 Jun 2019 14:34:50 +0000 (09:34 -0500)

l10n: es: 2.22.0 round 2

Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org>

Merge branch 'master' of https://github.com/vnwildman/gitJiang Xin Sun, 2 Jun 2019 14:35:11 +0000 (22:35 +0800)

Merge branch 'master' of https://github.com/vnwildman/git

* 'master' of https://github.com/vnwildman/git:
l10n: vi.po(4580t): Updated Vietnamese translation for v2.22.0 round 2

Merge branch 'master' of git://github.com/alshopov... Jiang Xin Sun, 2 Jun 2019 14:09:35 +0000 (22:09 +0800)

Merge branch 'master' of git://github.com/alshopov/git-po

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

l10n: bg.po: Updated Bulgarian translation (4580t)Alexander Shopov Sun, 2 Jun 2019 07:26:52 +0000 (09:26 +0200)

l10n: bg.po: Updated Bulgarian translation (4580t)

Signed-off-by: Alexander Shopov <ash@kambanaria.org>

l10n: vi.po(4580t): Updated Vietnamese translation... Tran Ngoc Quan Sat, 1 Jun 2019 01:36:37 +0000 (08:36 +0700)

l10n: vi.po(4580t): Updated Vietnamese translation for v2.22.0 round 2

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>