summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-02-24Makefile: allow for combining DEVELOPER=1 and CFLAGS="..."Libravatar Ævar Arnfjörð Bjarmason2-24/+28
Ever since the DEVELOPER=1 facility introduced there's been no way to have custom CFLAGS (e.g. CFLAGS="-O0 -g -ggdb3") while still benefiting from the set of warnings and assertions DEVELOPER=1 enables. This is because the semantics of variables in the Makefile are such that the user setting CFLAGS overrides anything we set, including what we're doing in config.mak.dev[1]. So let's introduce a "DEVELOPER_CFLAGS" variable in config.mak.dev and add it to ALL_CFLAGS. Before this the ALL_CFLAGS variable would (basically, there's some nuance we won't go into) be set to: $(CPPFLAGS) [$(CFLAGS) *or* $(CFLAGS) in config.mak.dev] $(BASIC_CFLAGS) $(EXTRA_CPPFLAGS) But will now be: $(DEVELOPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) $(BASIC_CFLAGS) $(EXTRA_CPPFLAGS) The reason for putting DEVELOPER_CFLAGS first is to allow for selectively overriding something DEVELOPER=1 brings in. On both GCC and Clang later settings override earlier ones. E.g. "-Wextra -Wno-extra" will enable no "extra" warnings, but not if those two arguments are reversed. Examples of things that weren't possible before, but are now: # Use -O0 instead of -O2 for less painful debuggng DEVELOPER=1 CFLAGS="-O0 -g" # DEVELOPER=1 plus -Wextra, but disable some of the warnings DEVELOPER=1 DEVOPTS="no-error extra-all" CFLAGS="-O0 -g -Wno-unused-parameter" The reason for the patches leading up to this one re-arranged the various *FLAGS assignments and includes is just for readability. The Makefile supports assignments out of order, e.g.: $ cat Makefile X = $(A) $(B) $(C) A = A B = B include c.mak all: @echo $(X) $ cat c.mak C=C $ make A B C So we could have gotten away with the much smaller change of changing "CFLAGS" in config.mak.dev to "DEVELOPER_CFLAGS" and adding that to ALL_CFLAGS earlier in the Makefile "before" the config.mak.* includes. But I think it's more readable to use variables "after" they're included. 1. https://www.gnu.org/software/make/manual/html_node/Overriding.html Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-24Makefile: move the setting of *FLAGS closer to "include"Libravatar Ævar Arnfjörð Bjarmason1-18/+22
Move the setting of variables like CFLAGS down past settings like "prefix" and default programs like "TAR" to just before we do the include from "config.mak.*". There's no functional changes here yet, but move note that "ALL_CFLAGS" and "ALL_LDFLAGS" are moved below the include. A follow-up change will tweak those depending on a variable set in config.mak.dev. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-24Makefile: Move *_LIBS assignment into its own sectionLibravatar Ævar Arnfjörð Bjarmason1-1/+3
Now the only other non-program assignment in the previous list is PTHREAD_CFLAGS, which'll be moved elsewhere in a follow-up change. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-24Makefile: add/remove comments at top and tweak whitespaceLibravatar Ævar Arnfjörð Bjarmason1-7/+3
The top of the Makfile is mostly separated into logical steps like set default configuration, set programs etc., but there's some deviation from that. Let's add mostly comments where they're missing, remove those that don't add anything. The whitespace tweaking makes subsequent patches smaller. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-24Makefile: move "strip" assignment down from flagsLibravatar Ævar Arnfjörð Bjarmason1-1/+1
Move the assignment of the "STRIP" variable down to where we're setting variables with the names of other programs. For consistency with those use "=" for the assignment instead of "?=". I can't imagine why this would need to be different than the rest, and 4dc00021f7 ("Makefile: add 'strip' target", 2006-01-12) which added it doesn't provide an explanation. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-24Makefile: remove an out-of-date commentLibravatar Ævar Arnfjörð Bjarmason1-3/+0
Remove a comment referring to a caveat that hasn't been applicable since 18b0fc1ce1 ("Git.pm: Kill Git.xs for now", 2006-09-23). At the time of 8d7f586f13 ("Git.pm: Support for perl/ being built by a different compiler", 2006-06-25) some of the code in perl would be built by a C compiler, but support for that went away a few months later in 18b0fc1ce1 discussed above. Since my 20d2a30f8f ("Makefile: replace perl/Makefile.PL with simple make rules", 2017-12-10) the perl/ directory doesn't even have its own build process. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> 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
2019-02-16l10n: el: add Greek l10n team and essential translationsLibravatar Jimmy Angelakos2-0/+21472
Signed-off-by: Jimmy Angelakos <vyruss@hellug.gr>
2019-02-15l10n: fr.po v2.21.0 rnd 2Libravatar Jean-Noël Avila1-2927/+4409
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
2019-02-15l10n: fr.po Fix some typos from round3Libravatar Fabien Villepinte1-6/+6
Signed-off-by: Fabien Villepinte <fabien.villepinte@gmail.com>
2019-02-15l10n: fr.po Fix some typosLibravatar Fabien Villepinte1-14/+14
Signed-off-by: Fabien Villepinte <fabien.villepinte@gmail.com>
2019-02-15mingw: safe-guard a bit more against getenv() problemsLibravatar Johannes Schindelin1-1/+1
Running up to v2.21.0, we fixed two bugs that were made prominent by the Windows-specific change to retain copies of only the 30 latest getenv() calls' returned strings, invalidating any copies of previous getenv() calls' return values. While this really shines a light onto bugs of the form where we hold onto getenv()'s return values without copying them, it is also a real problem for users. And even if Jeff King's patches merged via 773e408881 (Merge branch 'jk/save-getenv-result', 2019-01-29) provide further work on that front, we are far from done. Just one example: on Windows, we unset environment variables when spawning new processes, which potentially invalidates strings that were previously obtained via getenv(), and therefore we have to duplicate environment values that are somehow involved in spawning new processes (e.g. GIT_MAN_VIEWER in show_man_page()). We do not have a chance to investigate, let address, all of those issues in time for v2.21.0, so let's at least help Windows users by increasing the number of getenv() calls' return values that are kept valid. The number 64 was determined by looking at the average number of getenv() calls per process in the entire test suite run on Windows (which is around 40) and then adding a bit for good measure. And it is a power of two (which would have hit yesterday's theme perfectly). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-02-15l10n: Fixes to Catalan translationLibravatar Jordi Mas1-9/+9
Signed-off-by: Jordi Mas <jmas@softcatala.org>
2019-02-15l10n: git.pot: v2.21.0 round 2 (3 new, 3 removed)Libravatar Jiang Xin1-10/+13
Introduce 3 update messages for v2.21.0 l10n round 2 from commit 32ceace39f (Fix typos in translatable strings for v2.21.0, 2019-02-11). Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2019-02-15Merge branch 'master' of git://git.kernel.org/pub/scm/git/gitLibravatar Jiang Xin24-64/+158
2019-02-14Merge branch 'ea/rebase-compat-doc-fix'Libravatar Junio C Hamano1-1/+0
* ea/rebase-compat-doc-fix: docs/git-rebase: remove redundant entry in incompatible options list
2019-02-14Merge branch 'jc/no-grepping-for-strerror-in-tests'Libravatar Junio C Hamano1-1/+1
* jc/no-grepping-for-strerror-in-tests: t1404: do not rely on the exact phrasing of strerror()
2019-02-14Merge branch 'jt/fetch-v2-sideband'Libravatar Junio C Hamano1-0/+1
"git fetch" and "git upload-pack" learned to send all exchange over the sideband channel while talking the v2 protocol. * jt/fetch-v2-sideband: t/lib-httpd: pass GIT_TEST_SIDEBAND_ALL through Apache
2019-02-14Merge branch 'en/rebase-merge-on-sequencer'Libravatar Junio C Hamano1-2/+0
"git rebase --merge" as been reimplemented by reusing the internal machinery used for "git rebase -i". * en/rebase-merge-on-sequencer: git-rebase.txt: update to reflect merge now implemented on sequencer
2019-02-14git-rebase.txt: update to reflect merge now implemented on sequencerLibravatar Elijah Newren1-2/+0
Since commit 8fe9c3f21dff (Merge branch 'en/rebase-merge-on-sequencer', 2019-02-06), --merge now uses the interactive backend (and matches its behavior) so there is no separate merge backend anymore. Fix an oversight in the docs that should have been updated with the previous change. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>