summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-04-19Turn `git serve` into a test helperLibravatar Johannes Schindelin9-30/+36
The `git serve` built-in was introduced in ed10cb952d31 (serve: introduce git-serve, 2018-03-15) as a backend to serve Git protocol v2, probably originally intended to be spawned by `git upload-pack`. However, in the version that the protocol v2 patches made it into core Git, `git upload-pack` calls the `serve()` function directly instead of spawning `git serve`; The only reason in life for `git serve` to survive as a built-in command is to provide a way to test the protocol v2 functionality. Meaning that it does not even have to be a built-in that is installed with end-user facing Git installations, but it can be a test helper instead. Let's make it so. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-19test-tool: handle the `-C <directory>` option just like `git`Libravatar Johannes Schindelin1-0/+19
In preparation for moving `git serve` into `test-tool` (because it really is only used by the test suite), we teach the `test-tool` the useful trick to change the working directory before running the test command, which will avoid introducing subshells in the test code. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-19check-docs: do not bother checking for legacy scripts' documentationLibravatar Johannes Schindelin1-1/+1
In the recent years, there has been a big push to convert more and more of Git's commands that are implemented as scripts to built-ins written in pure, portable C, for robustness, speed and portability. One strategy that served us well is to convert those scripts incrementally, starting by renaming the scripts to `git-legacy-<command>`, then introducing a built-in that does nothing else at first than checking the config setting `<command>.useBuiltin` (which defaults to `false` at the outset) and handing off to the legacy script if so asked. Obviously, those `git-legacy-<command>` commands share the documentation with the built-in `git-<command>`, and are not intended to be called directly anyway. So let's not try to ensure that they are documented separately from their built-in versions. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-19docs: exclude documentation for commands that have been excludedLibravatar Johannes Schindelin3-0/+13
When building with certain build options, some commands are excluded from the build. For example, `git-credential-cache` is skipped when building with `NO_UNIX_SOCKETS`. Let's not build or package documentation for those excluded commands. This issue was pointed out rightfully when running `make check-docs` on Windows, where we do not yet have Unix sockets, and therefore the `credential-cache` command is excluded (yet its documentation was built and shipped). Note: building the documentation via `make -C Documentation` leaves the build system with no way to determine which commands have been excluded. If called thusly, we gracefully fail to exclude their documentation. Only when building the documentation via the top-level Makefile will it get excluded properly, or after building `Documentation/GIT-EXCLUDED-PROGRAMS` manually. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-19check-docs: allow command-list.txt to contain excluded commandsLibravatar Johannes Schindelin1-1/+1
Among other things, the `check-docs` target ensures that `command-list.txt` no longer contains commands that were dropped (or that were never added in the first place). To do so, it compares the list of commands from that file to the commands listed in `$(ALL_COMMANDS)`. However, some build options exclude commands from the latter. Fix the target to handle this situation correctly by taking the just-introduced `$(EXCLUDED_PROGRAMS)` into account. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-19help -a: do not list commands that are excluded from the buildLibravatar Johannes Schindelin2-3/+21
When built with NO_CURL or with NO_UNIX_SOCKETS, some commands are skipped from the build. It does not make sense to list them in the output of `git help -a`, so let's just not. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-19Makefile: drop the NO_INSTALL variableLibravatar Johannes Schindelin1-13/+8
The last user was just removed; There is no longer any need to carry it around. Should we ever run into a need for it again, it is easy enough to revert this commit. It is unlikely, though, that we need `NO_INSTALL` again: as we saw with the just-removed item, `git-remote-testgit`, we have better locations to put executables and scripts that we do not want to install, e.g. a subdirectory in `t/`, or `contrib/`. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-15remote-testgit: move it into the support directory for t5801Libravatar Johannes Schindelin4-4/+2
The `git-remote-testgit` script is really only used in `t5801-remote-helpers.sh`. It does not even contain any `@@<MAGIC>@@` placeholders that would need to be interpolated via `make git-remote-testgit`. Let's just move it to a new home, decluttering the top-level directory and clarifying that this is just a test helper, not an official Git command that we would want to ever support. Suggested by Ævar Arnfjörð Bjarmason. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-01check-docs: fix for setups where executables have an extensionLibravatar Johannes Schindelin1-2/+2
On Windows, for example, executables (must) have the extension `.exe`. Our `check-docs` target was not prepared for that. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-01check-docs: do not expect guide pages to correspond to commandsLibravatar Johannes Schindelin1-0/+1
When we want to see what commands are listed in `command-list.txt` but not installed, we currently include lines that refer to guides, e.g. `gitattributes` or `gitcli`. Let's not include those lines, as they are not referring to commands. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-01check-docs: really look at the documented commands againLibravatar Johannes Schindelin1-1/+1
As part of the `check-docs` target, we verify that commands that are documented are actually in the current list of commands to be built. However, this logic broke in 5fafce0b78 (check-docs: get documented command list from Makefile, 2012-08-08), when we tried to make the logic safer by not looking at the files in the worktree, but at the list of files to be generated in `Documentation/Makefile`. While this was the right thing to do, it failed to accommodate for the fact that `make -C Documentation/ print-man1`, unlike `ls Documentation/*.txt`, would *not* print lines starting with the prefix `Documentation/`. At long last, let's fix this. Note: This went undetected due to a funny side effect of the `ALL_PROGRAMS` variable starting with a space. That space, together with the extra space we inserted before `$(ALL_PROGRAMS)` in the case " $(ALL_PROGRAMS)" in *" $$cmd ") [...] construct, is responsible that this case arm is used when `cmd` is empty (which was clearly not intended to be the case). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-01docs: do not document the `git remote-testgit` commandLibravatar Johannes Schindelin2-32/+0
Since 7ded055401 (build: do not install git-remote-testgit, 2013-06-07), we do not install it. Therefore it makes no sense to document it, either. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-01docs: move gitremote-helpers into section 7Libravatar Johannes Schindelin7-7/+7
It is currently in section 1, but that section is intended for "Executable programs or shell commands". A more appropriate place is section 7: "Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7)". This issue should have been detected earlier by `make check-docs`, but was missed due to a bug in that Makefile target (that we are about to fix). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-03-11mingw: allow building with an MSYS2 runtime v3.xLibravatar Johannes Schindelin1-1/+1
Recently the Git for Windows project started the upgrade process to a MSYS2 runtime version based on Cygwin v3.x. This has the very notable consequence that `$(uname -r)` no longer reports a version starting with "2", but a version with "3". That breaks our build, as df5218b4c30b (config.mak.uname: support MSys2, 2016-01-13) simply did not expect the version reported by `uname -r` to depend on the underlying Cygwin version: it expected the reported version to match the "2" in "MSYS2". So let's invert that test case to test for *anything else* than a version starting with "1" (for MSys). That should safeguard us for the future, even if Cygwin ends up releasing versionsl like 314.272.65536. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-03-05Merge tag 'l10n-2.21.0-rnd2.1' of git://github.com/git-l10n/git-poLibravatar Junio C Hamano3-4481/+3979
L10n for Git 2.21.0 round 2.1 * tag 'l10n-2.21.0-rnd2.1' of git://github.com/git-l10n/git-po: l10n: Fixes to Catalan translation l10n: Updated Vietnamese translation for v2.21 rd2 l10n: fr.po remove obsolete entries
2019-03-02l10n: Fixes to Catalan translationLibravatar Jordi Mas1-3/+3
Signed-off-by: Jordi Mas <jmas@softcatala.org>
2019-03-01l10n: Updated Vietnamese translation for v2.21 rd2Libravatar Tran Ngoc Quan1-2978/+3976
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
2019-02-26l10n: fr.po remove obsolete entriesLibravatar Jean-Noël Avila1-1500/+0
On NetBSD, the version of msgfmt is still 0.14.4. There's no hope for an upgrade due to some GPLv3 allergy of NetBSD's. This version chokes on heavily decorated commented entries in po files. It's safer to get rid of all these obsolete entries. Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
2019-02-24Git 2.21Libravatar Junio C Hamano1-1/+1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-24Merge branch 'yn/checkout-doc-fix'Libravatar Junio C Hamano1-1/+1
Doc fix. * yn/checkout-doc-fix: checkout doc: fix an unmatched double-quote pair
2019-02-24Merge tag 'l10n-2.21.0-rnd2' of git://github.com/git-l10n/git-poLibravatar Junio C Hamano11-23235/+68407
l10n-2.21.0-rnd2 * tag 'l10n-2.21.0-rnd2' of git://github.com/git-l10n/git-po: l10n: bg.po: Updated Bulgarian translation (4363t) l10n: update German translation l10n: zh_CN: Revision for git v2.21.0 l10n l10n: zh_CN: for git v2.21.0 l10n round 1~2 l10n: bg.po: correct typo l10n: Update Swedish translation (4363t0f0u) l10n: de.po: fix grammar in message for tag.c l10n: de.po: fix a message for index-pack.c l10n: de.po: consistent translation of 'root commit' l10n: it: update the Italian translation l10n: es: 2.21.0 round 2 l10n: el: add Greek l10n team and essential translations l10n: fr.po v2.21.0 rnd 2 l10n: fr.po Fix some typos from round3 l10n: fr.po Fix some typos l10n: Fixes to Catalan translation l10n: git.pot: v2.21.0 round 2 (3 new, 3 removed) l10n: git.pot: v2.21.0 round 1 (214 new, 38 removed) l10n: zh_CN: fix typo of submodule init message l10n: Update Catalan translation
2019-02-23README: adjust for final Azure Pipeline IDLibravatar Johannes Schindelin1-1/+1
During the six months of development of the Azure Pipelines support, the patches went through quite a few iterations of changes, and to test those iterations, a temporary build definition was used. In the meantime, Azure Pipelines support made it to `master`, and we now have a regular Azure Pipeline, installed via the common GitHub App workflow. This new pipeline has a different name (git.git instead of test-git.git), and a new ID (11 instead of 2). Let's adjust the badge in our README to reflect that final shape of the Azure Pipeline. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-23checkout doc: fix an unmatched double-quote pairLibravatar Yoichi Nakayama1-1/+1
Signed-off-by: Yoichi Nakayama <yoichi.nakayama@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-23l10n: bg.po: Updated Bulgarian translation (4363t)Libravatar Alexander Shopov1-2909/+3884
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
2019-02-22Merge branch 'ab/bsd-fixes'Libravatar Junio C Hamano2-5/+5
Test portability fix. * ab/bsd-fixes: commit-graph tests: fix unportable "dd" invocation tests: fix unportable "\?" and "\+" regex syntax
2019-02-22Merge branch 'ab/workaround-dash-bug-in-test'Libravatar Junio C Hamano1-0/+1
* ab/workaround-dash-bug-in-test: tests: avoid syntax triggering old dash bug
2019-02-22commit-graph tests: fix unportable "dd" invocationLibravatar Ævar Arnfjörð Bjarmason1-1/+1
Change an unportable invocation of "dd" with count=0, that wanted to truncate the commit-graph file. In POSIX it is unspecified what happens when count=0 is provided[1]. The NetBSD "dd" behavior differs from GNU (and seemingly other BSDs), which has left this test broken since d2b86fbaa1 ("commit-graph: fix buffer read-overflow", 2019-01-15). Copying from /dev/null would seek/truncate to seek=$zero_pos and stop immediately after that (without being able to copy anything), which is the right way to truncate the file. 1. http://pubs.opengroup.org/onlinepubs/9699919799/utilities/dd.html Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Helped-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-22Merge branch 'master' of https://github.com/ralfth/git-po-deLibravatar Jiang Xin1-3304/+3899
2019-02-22l10n: update German translationLibravatar Ralf Thielow1-3301/+3896
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Reviewed-by: Matthias Rüster <matthias.ruester@gmail.com>
2019-02-21tests: fix unportable "\?" and "\+" regex syntaxLibravatar Ævar Arnfjörð Bjarmason1-4/+4
Fix widely supported but non-POSIX basic regex syntax introduced in [1] and [2]. On GNU, NetBSD and FreeBSD the following works: $ echo xy >f $ grep 'xy\?' f; echo $? xy 0 The same goes for "\+". The "?" and "+" syntax is not in the BRE syntax, just in ERE, but on some implementations it can be invoked by prefixing the meta-operator with "\", but not on OpenBSD: $ uname -a OpenBSD obsd.my.domain 6.2 GENERIC#132 amd64 $ grep --version grep version 0.9 $ grep 'xy\?' f; echo $? 1 Let's fix this by moving to ERE syntax instead, where "?" and "+" are universally supported: $ grep -E 'xy?' f; echo $? xy 0 1. 2ed5c8e174 ("describe: setup working tree for --dirty", 2019-02-03) 2. c801170b0c ("t6120: test for describe with a bare repository", 2019-02-03) Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-20Merge branch 'bg-submodule-helper-typo' of github.com:pclouds/git-poLibravatar Jiang Xin1-1/+1
2019-02-20l10n: zh_CN: Revision for git v2.21.0 l10nLibravatar Fangyi Zhou1-15/+15
Signed-off-by: Fangyi Zhou <fangyi.zhou@yuriko.moe>
2019-02-20l10n: zh_CN: for git v2.21.0 l10n round 1~2Libravatar Jiang Xin1-2886/+3828
Translate 214 new messages (4363t0f0u) for git 2.21.0. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2019-02-20l10n: bg.po: correct typoLibravatar Nguyễn Thái Ngọc Duy1-1/+1
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
2019-02-20l10n: Update Swedish translation (4363t0f0u)Libravatar Peter Krefting1-2909/+3902
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2019-02-19Git 2.21-rc2Libravatar Junio C Hamano1-1/+1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-19Merge branch 'js/test-tool-gen-nuls'Libravatar Junio C Hamano5-7/+25
* js/test-tool-gen-nuls: tests: teach the test-tool to generate NUL bytes and use it
2019-02-19Merge branch 'mk/t5562-no-input-to-too-large-an-input-test'Libravatar Junio C Hamano1-2/+2
* mk/t5562-no-input-to-too-large-an-input-test: t5562: do not depend on /dev/zero Revert "t5562: replace /dev/zero with a pipe from generate_zero_bytes"
2019-02-19Merge branch 'mk/t5562-do-not-reuse-output-files'Libravatar Junio C Hamano1-4/+4
* mk/t5562-do-not-reuse-output-files: t5562: do not reuse output files
2019-02-19t5562: do not reuse output filesLibravatar Max Kirillov1-4/+4
Some expected failures of git-http-backend leaves running its children (receive-pack or upload-pack) which still hold opened descriptors to act.err and with some probability they live long enough to write there their failure messages after next test has already truncated the files. This causes occasional failures of the test script. Avoid the issue by using separated output and error file for each test, apprending the test number to their name. Reported-by: Carlo Arenas <carenas@gmail.com> Helped-by: Carlo Arenas <carenas@gmail.com> Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Max Kirillov <max@max630.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-19tests: teach the test-tool to generate NUL bytes and use itLibravatar Johannes Schindelin5-7/+25
In cc95bc2025 (t5562: replace /dev/zero with a pipe from generate_zero_bytes, 2019-02-09), we replaced usage of /dev/zero (which is not available on NonStop, apparently) by a Perl script snippet to generate NUL bytes. Sadly, it does not seem to work on NonStop, as t5562 reportedly hangs. Worse, this also hangs in the Ubuntu 16.04 agents of the CI builds on Azure Pipelines: for some reason, the Perl script snippet that is run via `generate_zero_bytes` in t5562's 'CONTENT_LENGTH overflow ssite_t' test case tries to write out an infinite amount of NUL bytes unless a broken pipe is encountered, that snippet never encounters the broken pipe, and keeps going until the build times out. Oddly enough, this does not reproduce on the Windows and macOS agents, nor in a local Ubuntu 18.04. This developer tried for a day to figure out the exact circumstances under which this hang happens, to no avail, the details remain a mystery. In the end, though, what counts is that this here change incidentally fixes that hang (maybe also on NonStop?). Even more positively, it gets rid of yet another unnecessary Perl invocation. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-19t5562: do not depend on /dev/zeroLibravatar Max Kirillov1-1/+1
It was reported [1] that NonStop platform does not have /dev/zero. The test uses /dev/zero as a dummy input. Passing case (http-backed failed because of too big input size) should not be reading anything from it. If http-backend would erroneously try to read any data returning EOF probably would be even safer than providing some meaningless data. Replace /dev/zero with /dev/null to avoid issues with platforms which do not have /dev/zero. [1] https://public-inbox.org/git/20190209185930.5256-4-randall.s.becker@rogers.com/ Reported-by: Randall S. Becker <rsbecker@nexbridge.com> Signed-off-by: Max Kirillov <max@max630.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-19Revert "t5562: replace /dev/zero with a pipe from generate_zero_bytes"Libravatar Junio C Hamano1-2/+2
Revert cc95bc20 ("t5562: replace /dev/zero with a pipe from generate_zero_bytes", 2019-02-09), as not feeding anything to the command is a better way to test it.
2019-02-19l10n: de.po: fix grammar in message for tag.cLibravatar Sebastian Staudt1-1/+1
Signed-off-by: Sebastian Staudt <koraktor@gmail.com>
2019-02-19l10n: de.po: fix a message for index-pack.cLibravatar Sebastian Staudt1-1/+1
Signed-off-by: Sebastian Staudt <koraktor@gmail.com>
2019-02-19l10n: de.po: consistent translation of 'root commit'Libravatar Sebastian Staudt1-1/+1
'root commit' is usually translated as 'Root-Commit'. But in one occasion it‘s translated as 'Basis-Commit' which is the translation for 'base commit'. Signed-off-by: Sebastian Staudt <koraktor@gmail.com>
2019-02-19l10n: it: update the Italian translationLibravatar Alessandro Menti2-2446/+19270
Signed-off-by: Alessandro Menti <alessandro.menti@alessandromenti.it>
2019-02-17Merge branch 'master' of https://github.com/Softcatala/git-poLibravatar Jiang Xin1-9/+9
2019-02-16l10n: es: 2.21.0 round 2Libravatar Christopher Diaz Riveros1-2891/+3898
Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org>
2019-02-16Merge branch 'fr_2.21.0_rnd2' of git://github.com/jnavila/gitLibravatar Jiang Xin1-2942/+4424