Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-08-28Merge branch 'ja/i18n-message-fixes'Junio C Hamano
Messages fix. * ja/i18n-message-fixes: i18n: fix mistakes in translated strings
2018-08-28Merge branch 'ds/commit-graph-fsck'Junio C Hamano
Finishing touches to doc. * ds/commit-graph-fsck: config: fix commit-graph related config docs
2018-08-28Merge branch 'js/range-diff'Junio C Hamano
Finishing touched to help string. * js/range-diff: range-diff: update stale summary of --no-dual-color
2018-08-28Merge branch 'sg/test-rebase-editor-fix'Junio C Hamano
Test fix. * sg/test-rebase-editor-fix: t/lib-rebase.sh: support explicit 'pick' commands in 'fake_editor.sh'
2018-08-28Merge branch 'jk/hashcmp-optim-for-2.19'Junio C Hamano
Partially revert the support for multiple hash functions to regain hash comparison performance; we'd think of a way to do this better in the next cycle. * jk/hashcmp-optim-for-2.19: hashcmp: assert constant hash size
2018-08-28Merge branch 'ab/test-must-be-empty-for-master'Junio C Hamano
Test fixes. * ab/test-must-be-empty-for-master: t6018-rev-list-glob: fix 'empty stdin' test
2018-08-28Merge branch 'sg/t3420-autostash-fix'Junio C Hamano
Test fixes. * sg/t3420-autostash-fix: t3420-rebase-autostash: don't try to grep non-existing files
2018-08-28Merge branch 'sg/t3903-missing-fix'Junio C Hamano
Test fixes. * sg/t3903-missing-fix: t3903-stash: don't try to grep non-existing file
2018-08-28Merge branch 'sg/t7501-thinkofix'Junio C Hamano
Test fixes. * sg/t7501-thinkofix: t7501-commit: drop silly command substitution
2018-08-28Merge branch 'sg/t0020-conversion-fix'Junio C Hamano
Test fixes. * sg/t0020-conversion-fix: t0020-crlf: check the right file
2018-08-28Merge branch 'sg/t4051-fix'Junio C Hamano
Test fixes. * sg/t4051-fix: t4051-diff-function-context: read the right file
2018-08-28Merge branch 'js/larger-timestamps'Junio C Hamano
Portability fix. * js/larger-timestamps: commit: use timestamp_t for author_date_slab
2018-08-28Merge branch 'jk/use-compat-util-in-test-tool'Junio C Hamano
Dev tool update. * jk/use-compat-util-in-test-tool: test-tool.h: include git-compat-util.h
2018-08-28Merge branch 'sg/test-must-be-empty'Junio C Hamano
Test fixes. * sg/test-must-be-empty: tests: use 'test_must_be_empty' instead of 'test_cmp <empty> <out>' tests: use 'test_must_be_empty' instead of 'test_cmp /dev/null <out>' tests: use 'test_must_be_empty' instead of 'test ! -s' tests: use 'test_must_be_empty' instead of '! test -s'
2018-08-28Merge branch 'rs/opt-updates'Junio C Hamano
"git cmd -h" updates. * rs/opt-updates: parseopt: group literal string alternatives in argument help remote: improve argument help for add --mirror checkout-index: improve argument help for --stage
2018-08-28Merge branch 'nd/complete-config-vars'Junio C Hamano
"git help --config" (which is used in command line completion) missed the configuration variables not described in the main config.txt file but are described in another file that is included by it, which has been corrected. * nd/complete-config-vars: generate-cmdlist.sh: collect config from all config.txt files
2018-08-28Merge branch 'ab/unconditional-free-and-null'Junio C Hamano
Code clean-up. * ab/unconditional-free-and-null: refactor various if (x) FREE_AND_NULL(x) to just FREE_AND_NULL(x)
2018-08-28Merge branch 'ep/worktree-quiet-option'Junio C Hamano
"git worktree" command learned "--quiet" option to make it less verbose. * ep/worktree-quiet-option: worktree: add --quiet option
2018-08-28Merge branch 'sm/branch-sort-config'Junio C Hamano
"git branch --list" learned to take the default sort order from the 'branch.sort' configuration variable, just like "git tag --list" pays attention to 'tag.sort'. * sm/branch-sort-config: branch: support configuring --sort via .gitconfig
2018-08-28Merge branch 'nd/config-core-checkstat-doc'Junio C Hamano
The meaning of the possible values the "core.checkStat" configuration variable can take were not adequately documented, which has been fixed. * nd/config-core-checkstat-doc: config.txt: clarify core.checkStat
2018-08-28tests: fix and add lint for non-portable grep --fileÆvar Arnfjörð Bjarmason
The --file option to grep isn't in POSIX[1], but -f is[1]. Let's check for that in the future, and fix the portability regression in f237c8b6fe ("commit-graph: implement git-commit-graph write", 2018-04-02) that broke e.g. AIX. 1. http://pubs.opengroup.org/onlinepubs/009695399/utilities/grep.html Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-28tests: fix version-specific portability issue in Perl JSONÆvar Arnfjörð Bjarmason
The test guarded by PERLJSON added in 75459410ed ("json_writer: new routines to create JSON data", 2018-07-13) assumed that a JSON boolean value like "true" or "false" would be represented as "1" or "0" in Perl. This behavior can't be relied upon, e.g. with JSON.pm 2.50 and JSON::PP. A JSON::PP::Boolean object will be represented as "true" or "false". To work around this let's check if we have any refs left after we check for hashes and arrays, assume those are JSON objects, and coerce them to a known boolean value. The behavior of this test still looks odd to me. Why implement our own ad-hoc encoder just for some one-off test, as opposed to say Perl's own Data::Dumper with Sortkeys et al? But with this change it works, so let's leave it be. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-28tests: use shorter labels in chainlint.sed for AIX sedÆvar Arnfjörð Bjarmason
Improve the portability of chainlint by using shorter labels. On AIX sed will complain about: sed: 0602-417 The label :hereslurp is greater than eight characters This, in combination with the previous fix to this file makes GIT_TEST_CHAIN_LINT=1 (which is the default) working again on AIX without issues, and the "gmake check-chainlint" test also passes. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Acked-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-27range-diff: update stale summary of --no-dual-colorKyle Meyer
275267937b (range-diff: make dual-color the default mode, 2018-08-13) replaced --dual-color with --no-dual-color but left the option's summary untouched. Rewrite the summary to describe --no-dual-color rather than dual-color. Helped-by: Jonathan Nieder <jrnieder@gmail.com> Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Kyle Meyer <kyle@kyleam.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-27tests: fix comment syntax in chainlint.sed for AIX sedÆvar Arnfjörð Bjarmason
Change a comment in chainlint.sed to appease AIX sed, which would previously print this error: sed: # stash for later printing is not a recognized function 1. https://public-inbox.org/git/CAPig+cTTbU5HFMKgNyrxTp3+kcK46-Fn=4ZH6zDt1oQChAc3KA@mail.gmail.com/ Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Acked-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-27tests: fix and add lint for non-portable seqÆvar Arnfjörð Bjarmason
The seq command is not in POSIX, and doesn't exist on e.g. OpenBSD. We've had the test_seq wrapper since d17cf5f3a3 ("tests: Introduce test_seq", 2012-08-04), but use of it keeps coming back, e.g. in the recently added "fetch negotiator" tests being added here. So let's also add a check to "make test-lint". The regex is aiming to capture the likes of $(seq ..) and "seq" as a stand-alone command, without capturing some existing cases where we e.g. have files called "seq", as \bseq\b would do. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-27tests: fix and add lint for non-portable head -c NÆvar Arnfjörð Bjarmason
The "head -c BYTES" option is non-portable (not in POSIX[1]). Change such invocations to use the test_copy_bytes wrapper added in 48860819e8 ("t9300: factor out portable "head -c" replacement", 2016-06-30). This fixes a test added in 9d2e330b17 ("ewah_read_mmap: bounds-check mmap reads", 2018-06-14), which has been breaking t5310-pack-bitmaps.sh on OpenBSD since 2.18.0. The OpenBSD ports already have a similar workaround after their upgrade to 2.18.0[2]. I have not tested this on IRIX, but according to 4de0bbd898 ("t9300: use perl "head -c" clone in place of "dd bs=1 count=16000" kluge", 2010-12-13) this invocation would have broken things there too. Also, change a valgrind-specific codepath in test-lib.sh to use this wrapper. Given where valgrind runs I don't think this would ever become a portability issue in practice, but it's easier to just use the wrapper than introduce some exception for the "make test-lint" check being added here. 1. http://pubs.opengroup.org/onlinepubs/9699919799/utilities/head.html 2. https://github.com/openbsd/ports/commit/08d5d82eaefe5cf2f125ecc0c6a57df9cf91350c#diff-f7d3c4fabeed1691620d608f1534f5e5 Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-24i18n: fix mistakes in translated stringsJean-Noël Avila
Fix typos and convert a question which does not expect to be replied to a simple advice. Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-23config: fix commit-graph related config docsDerrick Stolee
The core.commitGraph config setting was accidentally removed from the config documentation. In that same patch, the config setting that writes a commit-graph during garbage collection was incorrectly written to the doc as "gc.commitGraph" instead of "gc.writeCommitGraph". Reported-by: Szeder Gábor <szeder.dev@gmail.com> Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-23t/lib-rebase.sh: support explicit 'pick' commands in 'fake_editor.sh'SZEDER Gábor
The verbose output of the test 'reword without issues functions as intended' in 't3423-rebase-reword.sh', added in a9279c6785 (sequencer: do not squash 'reword' commits when we hit conflicts, 2018-06-19), contains the following error output: sed: -e expression #1, char 2: extra characters after command This error comes from within the 'fake-editor.sh' script created by 'lib-rebase.sh's set_fake_editor() function, and the root cause is the FAKE_LINES="pick 1 reword 2" variable in the test in question, in particular the "pick" word. 'fake-editor.sh' assumes 'pick' to be the default rebase command and doesn't support an explicit 'pick' command in FAKE_LINES. As a result, 'pick' will be used instead of a line number when assembling the following 'sed' script: sed -n picks/^pick/pick/p which triggers the aforementioned error. Luckily, this didn't affect the test's correctness: the erroring 'sed' command doesn't write anything to the todo script, and processing the rest of FAKE_LINES generates the desired todo script, as if that 'pick' command were not there at all. The minimal fix would be to remove the 'pick' word from FAKE_LINES, but that would leave us susceptible to similar issues in the future. Instead, teach the fake-editor script to recognize an explicit 'pick' command, which is still a fairly trivial change. In the future we might want to consider reinforcing this fake editor script with an &&-chain and stricter parsing of the FAKE_LINES variable (e.g. to error out when encountering unknown rebase commands or commands and line numbers in the wrong order). Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-23hashcmp: assert constant hash sizeJeff King
Prior to 509f6f62a4 (cache: update object ID functions for the_hash_algo, 2018-07-16), hashcmp() called memcmp() with a constant size of 20 bytes. Some compilers were able to turn that into a few quad-word comparisons, which is faster than actually calling memcmp(). In 509f6f62a4, we started using the_hash_algo->rawsz instead. Even though this will always be 20, the compiler doesn't know that while inlining hashcmp() and ends up just generating a call to memcmp(). Eventually we'll have to deal with multiple hash sizes, but for the upcoming v2.19, we can restore some of the original performance by asserting on the size. That gives the compiler enough information to know that the memcmp will always be called with a length of 20, and it performs the same optimization. Here are numbers for p0001.2 run against linux.git on a few versions. This is using -O2 with gcc 8.2.0. Test v2.18.0 v2.19.0-rc0 HEAD ------------------------------------------------------------------------------ 0001.2: 34.24(33.81+0.43) 34.83(34.42+0.40) +1.7% 33.90(33.47+0.42) -1.0% You can see that v2.19 is a little slower than v2.18. This commit ended up slightly faster than v2.18, but there's a fair bit of run-to-run noise (the generated code in the two cases is basically the same). This patch does seem to be consistently 1-2% faster than v2.19. I tried changing hashcpy(), which was also touched by 509f6f62a4, in the same way, but couldn't measure any speedup. Which makes sense, at least for this workload. A traversal of the whole commit graph requires looking up every entry of every tree via lookup_object(). That's many multiples of the numbers of objects in the repository (most of the lookups just return "yes, we already saw that object"). [jn: verified using "make object.s" that the memcmp call goes away.] Reported-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Jeff King <peff@peff.net Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-23rev-list: make empty --stdin not an errorJeff King
When we originally did the series that contains 7ba826290a (revision: add rev_input_given flag, 2017-08-02) the intent was that "git rev-list --stdin </dev/null" would similarly become a successful noop. However, an attempt at the time to do that did not work[1]. The problem is that rev_input_given serves two roles: - it tells rev-list.c that it should not error out - it tells revision.c that it should not have the "default" ref kick (e.g., "HEAD" in "git log") We want to trigger the former, but not the latter. This is technically possible with a single flag, if we set the flag only after revision.c's revs->def check. But this introduces a rather subtle ordering dependency. Instead, let's keep two flags: one to denote when we got actual input (which triggers both roles) and one for when we read stdin (which triggers only the first). This does mean a caller interested in the first role has to check both flags, but there's only one such caller. And any future callers might want to make the distinction anyway (e.g., if they care less about erroring out, and more about whether revision.c soaked up our stdin). In fact, we already keep such a flag internally in revision.c for this purpose, so this is really just exposing that to the caller (and the old function-local flag can go away in favor of our new one). [1] https://public-inbox.org/git/20170802223416.gwiezhbuxbdmbjzx@sigill.intra.peff.net/ Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-22t3420-rebase-autostash: don't try to grep non-existing filesSZEDER Gábor
Several tests in 't3420-rebase-autostash.sh' start various rebase processes that are expected to fail because of merge conflicts. These tests then run '! grep' to ensure that the autostash feature did its job, and the dirty contents of a file is gone. However, due to the test repo's history and the choice of upstream branch that file shouldn't exist in the conflicted state at all. Consequently, this 'grep' doesn't fail as expected, because it can't find the dirty content, but it fails because it can't open the file. Tighten this check by using 'test_path_is_missing' instead, thereby avoiding unexpected errors from 'grep' as well. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-22t3903-stash: don't try to grep non-existing fileSZEDER Gábor
The test 'store updates stash ref and reflog' in 't3903-stash.sh' creates a stash from a new file, runs 'git reset --hard' to throw away any modifications to the work tree, and then runs '! grep' to ensure that the staged contents are gone. Since the file didn't exist before, it shouldn't exist after 'git reset' either. Consequently, this 'grep' doesn't fail as expected, because it can't find the staged content, but it fails because it can't open the file. Tighten this check by using 'test_path_is_missing' instead, thereby avoiding an unexpected error from 'grep' as well. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-22Merge branch 'nd/pack-deltify-regression-fix'Junio C Hamano
In a recent update in 2.18 era, "git pack-objects" started producing a larger than necessary packfiles by missing opportunities to use large deltas. * nd/pack-deltify-regression-fix: pack-objects: fix performance issues on packing large deltas
2018-08-22t6018-rev-list-glob: fix 'empty stdin' testSZEDER Gábor
Prior to d3c6751b18 (tests: make use of the test_must_be_empty function, 2018-07-27), in the test 'rev-list should succeed with empty output on empty stdin' in 't6018-rev-list-glob' the empty 'expect' file served dual purpose: besides specifying the expected output, as usual, it also served as empty input for 'git rev-list --stdin'. Then d3c6751b18 came along, and, as part of the conversion to 'test_must_be_empty', removed this empty 'expect' file, not realizing its secondary purpose. Redirecting stdin from the now non-existing file failed the test, but since this test expects failure in the first place, this issue went unnoticed. Redirect 'git rev-list's stdin explicitly from /dev/null to provide empty input. (Strictly speaking we don't need this redirection, because the test script's stdin is already redirected from /dev/null anyway, but I think it's better to be explicit about it.) Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-22t4051-diff-function-context: read the right fileSZEDER Gábor
The test ' context does not include preceding empty lines' in the block of tests 'change with long common tail and no context' in 't4051-diff-function-context.sh' tries to read the file 'long_common_tail.diff.diff', but that file doesn't exist as its name contains one more '.diff' suffixes than necessary. Despite this error the test still succeeded without checking what it's supposed to, because this erroneous read is done on the line: test "$(first_context_line <long_common_tail.diff.diff)" != " " which means that: - the command substitution hides the error, so it won't fail the test, and - the result of the command substitution is the empty string, which is, of course, not equal to a single space character, so the condition is fulfilled, and the test succeeds. As a minimal fix, fix the name of the file to be read. In the future we might want to reorganize this test script (1) to use 'test_cmp' instead of 'test's and command substitutions to catch failing commands and to provide helpful error messages, and (2) to specify what the expected result actually _is_ instead of what it isn't. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-22t0020-crlf: check the right fileSZEDER Gábor
In the test 'checkout with autocrlf=input' in 't0020-crlf.sh', one of the 'has_cr' checks looks at the non-existing file 'two' instead of 'dir/two'. The test still succeeds, without actually checking what it was supposed to, because this check is expected to fail anyway. As a minimal fix, fix the name of the file to be checked. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-22t7501-commit: drop silly command substitutionSZEDER Gábor
The test '--dry-run with conflicts fixed from a merge' in 't7501-commit.sh', added in 8dc874b2ee (wt-status.c: set commitable bit if there is a meaningful merge., 2016-02-15), runs the following unnecessary and downright bogus command substitution: ! $(git merge --no-commit commit-1) && I.e. after 'git merge ...' is executed and expectedly fails, the test attempts to execute its output: Merging: 80f2ea2 commit 2 virtual commit-1 found 1 common ancestor: e60d113 Initial commit Auto-merging test-file CONFLICT (content): Merge conflict in test-file Automatic merge failed; fix conflicts and then commit the result. as a command, which most likely fails, because there is no such command as "Merging:". Then '!' negates the failed exit status, the test continues, and eventually succeeds. Remove this command substitution and use 'test_must_fail' to ensure that 'git merge' fails. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-22commit: use timestamp_t for author_date_slabDerrick Stolee
The author_date_slab is used to store the author date of a commit when walking with the --author-date flag in rev-list or log. This was added as an 'unsigned long' in 81c6b38b "log: --author-date-order" Since 'unsigned long' is ambiguous in its bit-ness across platforms (64-bit in Linux, 32-bit in Windows, for example), most references to the author dates in commit.c were converted to timestamp_t in dddbad72 "timestamp_t: a new data type for timestamps" However, the slab definition was missed, leading to a mismatch in the data types in Windows. This would not reveal itself as a bug unless someone authors a commit after February 2106, but commits can store anything as their author date. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-21test-tool.h: include git-compat-util.hJeff King
The test-tool programs include "test-tool.h" as their first include, which breaks our CodingGuideline of "the first include must be git-compat-util.h or an equivalent". Rather than change them all, let's instead make test-tool.h one of those equivalents, just like we do for builtin.h (which many of the actual git builtins include first). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-21tests: use 'test_must_be_empty' instead of 'test_cmp <empty> <out>'SZEDER Gábor
Using 'test_must_be_empty' is shorter and more idiomatic than >empty && test_cmp empty out as it saves the creation of an empty file. Furthermore, sometimes the expected empty file doesn't have such a descriptive name like 'empty', and its creation is far away from the place where it's finally used for comparison (e.g. in 't7600-merge.sh', where two expected empty files are created in the 'setup' test, but are used only about 500 lines later). These cases were found by instrumenting 'test_cmp' to error out the test script when it's used to compare empty files, and then converted manually. Note that even after this patch there still remain a lot of cases where we use 'test_cmp' to check empty files: - Sometimes the expected output is not hard-coded in the test, but 'test_cmp' is used to ensure that two similar git commands produce the same output, and that output happens to be empty, e.g. the test 'submodule update --merge - ignores --merge for new submodules' in 't7406-submodule-update.sh'. - Repetitive common tasks, including preparing the expected results and running 'test_cmp', are often extracted into a helper function, and some of this helper's callsites expect no output. - For the same reason as above, the whole 'test_expect_success' block is within a helper function, e.g. in 't3070-wildmatch.sh'. - Or 'test_cmp' is invoked in a loop, e.g. the test 'cvs update (-p)' in 't9400-git-cvsserver-server.sh'. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-21tests: use 'test_must_be_empty' instead of 'test_cmp /dev/null <out>'SZEDER Gábor
Using 'test_must_be_empty' is more idiomatic than 'test_cmp /dev/null out', and its message on error is perhaps a bit more to the point. This patch was basically created by running: sed -i -e 's%test_cmp /dev/null%test_must_be_empty%' t[0-9]*.sh with the exception of the change in 'should not fail in an empty repo' in 't7401-submodule-summary.sh', where it was 'test_cmp output /dev/null'. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-21tests: use 'test_must_be_empty' instead of 'test ! -s'SZEDER Gábor
Using 'test_must_be_empty' is preferable to 'test ! -s', because it gives a helpful error message if the given file is unexpectedly no empty, while the latter remains completely silent. Furthermore, it also catches cases when the given file unexpectedly does not exist at all. This patch was created by: sed -i -e 's/test ! -s/test_must_be_empty/' t[0-9]*.sh Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-21tests: use 'test_must_be_empty' instead of '! test -s'SZEDER Gábor
Using 'test_must_be_empty' is preferable to '! test -s', because it gives a helpful error message if the given file is unexpectedly not empty, while the latter remains completely silent. Furthermore, it also catches cases when the given file unexpectedly does not exist at all. This patch was basically created by: sed -i -e 's/! test -s/test_must_be_empty/' t[0-9]*.sh with the following notable exceptions: - The '! test -s' check in '.gitmodules ignore=dirty suppresses submodules with untracked content' in 't7508-status.sh' is left as-is, because it's bogus and, therefore, it's subject of a dedicated patch. - The '! test -s' checks in 't9131-git-svn-empty-symlink.sh' and 't9135-git-svn-moved-branch-empty-file.sh' are immediately preceeded by a 'test -f' to ensure that the files exist in the first place. 'test_must_be_empty' ensures that as well, so those 'test -f' commands are removed as well. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-21parseopt: group literal string alternatives in argument helpRené Scharfe
This formally clarifies that the "--option=" part is the same for all alternatives. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-21remote: improve argument help for add --mirrorRené Scharfe
Group the possible values using a pair of parentheses and don't mark them for translation, as they are literal strings that have to be used as-is in any locale. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-21checkout-index: improve argument help for --stageRené Scharfe
Spell out all alternatives and avoid using a numerical range operator, as it is not mentioned in CodingGuidelines and the resulting string is still concise. Wrap them in parentheses to document clearly that the "--stage=" part is common among them. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-21generate-cmdlist.sh: collect config from all config.txt filesNguyễn Thái Ngọc Duy
This script uses Documentation/config.txt as input for "git help --config" and "git config" completion but it misses the fact that config.txt includes other txt files. Include all *config.txt as input when scanning for config keys. This could produce false positives, but as long as we stick to the blah-config.txt naming convention, we should be ok. While at there, move diff.* from config.txt to diff-config.txt where all other diff config keys are. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-21l10n: git.pot: v2.19.0 round 1 (382 new, 30 removed)Jiang Xin
Generate po/git.pot from v2.19.0-rc0 for git v2.19.0 l10n round 1. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>