summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2019-01-14Merge branch 'hn/highlight-sideband-keywords'Libravatar Junio C Hamano1-0/+2
Lines that begin with a certain keyword that come over the wire, as well as lines that consist only of one of these keywords, ought to be painted in color for easier eyeballing, but the latter was broken ever since the feature was introduced in 2.19, which has been corrected. * hn/highlight-sideband-keywords: sideband: color lines with keyword only
2019-01-14Merge branch 'cb/test-lint-cp-a'Libravatar Junio C Hamano1-0/+1
BSD port update. * cb/test-lint-cp-a: tests: add lint for non portable cp -a
2019-01-14Merge branch 'cb/t5004-empty-tar-archive-fix'Libravatar Junio C Hamano1-9/+8
BSD port update. * cb/t5004-empty-tar-archive-fix: t5004: avoid using tar for empty packages
2019-01-14Merge branch 'hb/t0061-dot-in-path-fix'Libravatar Junio C Hamano1-1/+9
Test update. * hb/t0061-dot-in-path-fix: t0061: do not fail test if '.' is part of $PATH
2019-01-14Merge branch 'nd/checkout-noisy'Libravatar Junio C Hamano1-2/+2
"git checkout [<tree-ish>] path..." learned to report the number of paths that have been checked out of the index or the tree-ish, which gives it the same degree of noisy-ness as the case in which the command checks out a branch. * nd/checkout-noisy: t0027: squelch checkout path run outside test_expect_* block checkout: print something when checking out paths
2019-01-14Merge branch 'nd/attr-pathspec-in-tree-walk'Libravatar Junio C Hamano1-1/+57
The traversal over tree objects has learned to honor ":(attr:label)" pathspec match, which has been implemented only for enumerating paths on the filesystem. * nd/attr-pathspec-in-tree-walk: tree-walk: support :(attr) matching dir.c: move, rename and export match_attrs() pathspec.h: clean up "extern" in function declarations tree-walk.c: make tree_entry_interesting() take an index tree.c: make read_tree*() take 'struct repository *'
2019-01-14Merge branch 'md/list-lazy-objects-fix'Libravatar Junio C Hamano1-2/+14
"git rev-list --exclude-promisor-objects" had to take an object that does not exist locally (and is lazily available) from the command line without barfing, but the code dereferenced NULL. * md/list-lazy-objects-fix: list-objects.c: don't segfault for missing cmdline objects
2019-01-04Merge branch 'sd/stash-wo-user-name'Libravatar Junio C Hamano1-0/+28
A properly configured username/email is required under user.useConfigOnly in order to create commits; now "git stash" (even though it creates commit objects to represent stash entries) command is exempt from the requirement. * sd/stash-wo-user-name: stash: tolerate missing user identity
2019-01-04Merge branch 'sg/clone-initial-fetch-configuration'Libravatar Junio C Hamano1-0/+47
Refspecs configured with "git -c var=val clone" did not propagate to the resulting repository, which has been corrected. * sg/clone-initial-fetch-configuration: Documentation/clone: document ignored configuration variables clone: respect additional configured fetch refspecs during initial fetch clone: use a more appropriate variable name for the default refspec
2019-01-04Merge branch 'nd/checkout-dwim-fix'Libravatar Junio C Hamano2-1/+33
"git checkout frotz" (without any double-dash) avoids ambiguity by making sure 'frotz' cannot be interpreted as a revision and as a path at the same time. This safety has been updated to check also a unique remote-tracking branch 'frotz' in a remote, when dwimming to create a local branch 'frotz' out of a remote-tracking branch 'frotz' from a remote. * nd/checkout-dwim-fix: checkout: disambiguate dwim tracking branches and local files
2019-01-04Merge branch 'ab/push-dwim-dst'Libravatar Junio C Hamano1-0/+55
"git push $there $src:$dst" rejects when $dst is not a fully qualified refname and not clear what the end user meant. The codepath has been taught to give a clearer error message, and also guess where the push should go by taking the type of the pushed object into account (e.g. a tag object would want to go under refs/tags/). * ab/push-dwim-dst: push doc: document the DWYM behavior pushing to unqualified <dst> push: test that <src> doesn't DWYM if <dst> is unqualified push: add an advice on unqualified <dst> push push: move unqualified refname error into a function push: improve the error shown on unqualified <dst> push i18n: remote.c: mark error(...) messages for translation remote.c: add braces in anticipation of a follow-up change
2019-01-04Merge branch 'en/fast-export-import'Libravatar Junio C Hamano1-3/+77
Small fixes and features for fast-export and fast-import, mostly on the fast-export side. * en/fast-export-import: fast-export: add a --show-original-ids option to show original names fast-import: remove unmaintained duplicate documentation fast-export: add --reference-excluded-parents option fast-export: ensure we export requested refs fast-export: when using paths, avoid corrupt stream with non-existent mark fast-export: move commit rewriting logic into a function for reuse fast-export: avoid dying when filtering by paths and old tags exist fast-export: use value from correct enum git-fast-export.txt: clarify misleading documentation about rev-list args git-fast-import.txt: fix documentation for --quiet option fast-export: convert sha1 to oid
2019-01-04Merge branch 'en/merge-path-collision'Libravatar Junio C Hamano3-78/+829
Updates for corner cases in merge-recursive. * en/merge-path-collision: t6036: avoid non-portable "cp -a" merge-recursive: combine error handling t6036, t6043: increase code coverage for file collision handling merge-recursive: improve rename/rename(1to2)/add[/add] handling merge-recursive: use handle_file_collision for add/add conflicts merge-recursive: improve handling for rename/rename(2to1) conflicts merge-recursive: fix rename/add conflict handling merge-recursive: new function for better colliding conflict resolutions merge-recursive: increase marker length with depth of recursion t6036, t6042: testcases for rename collision of already conflicting files t6042: add tests for consistency in file collision conflict handling
2019-01-04Merge branch 'nd/i18n'Libravatar Junio C Hamano8-44/+44
More _("i18n") markings. * nd/i18n: fsck: mark strings for translation fsck: reduce word legos to help i18n parse-options.c: mark more strings for translation parse-options.c: turn some die() to BUG() parse-options: replace opterror() with optname() repack: mark more strings for translation remote.c: mark messages for translation remote.c: turn some error() or die() to BUG() reflog: mark strings for translation read-cache.c: add missing colon separators read-cache.c: mark more strings for translation read-cache.c: turn die("internal error") to BUG() attr.c: mark more string for translation archive.c: mark more strings for translation alias.c: mark split_cmdline_strerror() strings for translation git.c: mark more strings for translation
2018-12-15Merge branch 'jc/run-command-report-exec-failure-fix' into maintLibravatar Junio C Hamano1-3/+6
A recent update accidentally squelched an error message when the run_command API failed to run a missing command, which has been corrected. * jc/run-command-report-exec-failure-fix: run-command: report exec failure
2018-12-15Merge branch 'js/t9902-send-email-completion-fix' into maintLibravatar Junio C Hamano1-1/+1
* js/t9902-send-email-completion-fix: t9902: 'send-email' test case requires PERL
2018-12-15Merge branch 'js/mailinfo-format-flowed-fix' into maintLibravatar Junio C Hamano1-0/+1
Test portability fix. * js/mailinfo-format-flowed-fix: t4256: mark support files as LF-only
2018-12-14t9902: 'send-email' test case requires PERLLibravatar Johannes Schindelin1-1/+1
The oneline notwithstanding, 13374987dd (completion: use _gitcompbuiltin for format-patch, 2018-11-03) changed also the way send-email options are completed, by asking the git send-email command itself what options it offers. Necessarily, this must fail when built with NO_PERL because send-email itself is a Perl script. Which means that we need the PERL prerequisite for the send-email test case in t9902. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-12-13t4256: mark support files as LF-onlyLibravatar Johannes Schindelin1-0/+1
The test t4256-am-format-flowed.sh requires carefully applying a patch after ignoring padding whitespace. This breaks if the file is munged to include CRLF line endings instead of LF. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-12-12run-command: report exec failureLibravatar Junio C Hamano1-3/+6
In 321fd823 ("run-command: mark path lookup errors with ENOENT", 2018-10-24), we rewrote the logic to execute a command by looking in the directories on $PATH; as a side effect, a request to run a command that is not found on $PATH is noticed even before a child process is forked to execute it. We however stopped to report an exec failure in such a case by mistake. Add a logic to report the error unless silent-exec-failure is requested, to match the original code. Reported-by: John Passaro <john.a.passaro@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-12-06list-objects.c: don't segfault for missing cmdline objectsLibravatar Matthew DeVore1-2/+14
When a command is invoked with both --exclude-promisor-objects, --objects-edge-aggressive, and a missing object on the command line, the rev_info.cmdline array could get a NULL pointer for the value of an 'item' field. Prevent dereferencing of a NULL pointer in that situation. Properly handle --ignore-missing. If it is not passed, die when an object is missing. Otherwise, just silently ignore it. Signed-off-by: Matthew DeVore <matvore@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-12-04Merge branch 'es/format-patch-range-diff-fix-fix'Libravatar Junio C Hamano1-7/+13
* es/format-patch-range-diff-fix-fix: range-diff: always pass at least minimal diff options
2018-12-04sideband: color lines with keyword onlyLibravatar Stefan Beller1-0/+2
When bf1a11f0a1 (sideband: highlight keywords in remote sideband output, 2018-08-07) was introduced, it was carefully considered which strings would be highlighted. However 59a255aef0 (sideband: do not read beyond the end of input, 2018-08-18) brought in a regression that the original did not test for. A line containing only the keyword and nothing else ("SUCCESS") should still be colored. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-12-04range-diff: always pass at least minimal diff optionsLibravatar Martin Ågren1-7/+13
Commit d8981c3f88 ("format-patch: do not let its diff-options affect --range-diff", 2018-11-30) taught `show_range_diff()` to accept a NULL-pointer as an indication that it should use its own "reasonable default". That fixed a regression from a5170794 ("Merge branch 'ab/range-diff-no-patch'", 2018-11-18), but unfortunately it introduced a regression of its own. In particular, it means we forget the `file` member of the diff options, so rather than placing a range-diff in the cover-letter, we write it to stdout. In order to fix this, rewrite the two callers adjusted by d8981c3f88 to instead create a "dummy" set of diff options where they only fill in the fields we absolutely require, such as output file and color. Modify and extend the existing tests to try and verify that the right contents end up in the right place. Don't revert `show_range_diff()`, i.e., let it keep accepting NULL. Rather than removing what is dead code and figuring out it isn't actually dead and we've broken 2.20, just leave it for now. [es: retain diff coloring when going to stdout] Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-12-03t5004: avoid using tar for empty packagesLibravatar Carlo Marcelo Arenas Belón1-9/+8
ea2d20d4c2 ("t5004: avoid using tar for checking emptiness of archive", 2013-05-09), introduced a fake empty tar archive to allow for portable tests of emptiness without having to invoke tar 4318094047 ("archive: don't add empty directories to archives", 2017-09-13) changed the expected result for its tests from one containing an empty directory to a plain empty archive but the portable test wasn't updated resulting on them failing again in (at least) NetBSD and OpenBSD Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-12-03t0061: do not fail test if '.' is part of $PATHLibravatar Junio C Hamano1-1/+9
t0061 creates a script with an unlikely name in the current directory and asks the run_command() API to run it without an explicit path, expecting that the script does *not* get run. This obviously would not work if the $PATH does contain such an element. Check if the running shell picks up the script without an explicit path to it, and skip the test when it does, as the run_command() API should also run the script in such an (insane) environment. Reported-by: "H.Merijn Brand" <h.m.brand@xs4all.nl> Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Helped-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-12-03tests: add lint for non portable cp -aLibravatar Carlo Marcelo Arenas Belón1-0/+1
cp -a, while a common flag isn't in POSIX and will therefore fail on systems that don't have GNUish tools (like OpenBSD, AIX or Solaris) Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-12-01Merge branch 'sg/test-BUG'Libravatar Junio C Hamano7-23/+26
test framework has been updated to make a bug in the test script (as opposed to bugs in Git that are discovered by running the tests) stand out more prominently. * sg/test-BUG: tests: send "bug in the test script" errors to the script's stderr
2018-12-01Merge branch 'sg/test-cmp-rev'Libravatar Junio C Hamano1-3/+17
Test framework update. * sg/test-cmp-rev: test-lib-functions: make 'test_cmp_rev' more informative on failure
2018-12-01Merge branch 'sg/daemon-test-signal-fix'Libravatar Junio C Hamano1-1/+1
Test fix. * sg/daemon-test-signal-fix: t/lib-git-daemon: fix signal checking
2018-12-01Merge branch 'ab/replace-graft-with-replace-advice'Libravatar Junio C Hamano1-1/+4
The advice message to tell the user to migrate an existing graft file to the replace system when a graft file was read was shown even when "git replace --convert-graft-file" command, which is the way the message suggests to use, was running, which made little sense. * ab/replace-graft-with-replace-advice: advice: don't pointlessly suggest --convert-graft-file
2018-12-01Merge branch 'js/rebase-stat-unrelated-fix'Libravatar Junio C Hamano1-0/+10
"git rebase --stat" to transplant a piece of history onto a totally unrelated history were not working before and silently showed wrong result. With the recent reimplementation in C, it started to instead die with an error message, as the original logic was not prepared to cope with this case. This has now been fixed. * js/rebase-stat-unrelated-fix: rebase --stat: fix when rebasing to an unrelated history
2018-12-01t6036: avoid non-portable "cp -a"Libravatar Carlo Marcelo Arenas Belón1-1/+1
b8cd1bb713 ("t6036, t6043: increase code coverage for file collision handling", 2018-11-07) uses this GNU extension that is not available in a POSIX complaint cp. In this particular case, there is no need to use the option, as it is just copying a single file to create another file. Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-30rebase --stat: fix when rebasing to an unrelated historyLibravatar Johannes Schindelin1-0/+10
When rebasing to a commit history that has no common commits with the current branch, there is no merge base. In diffstat mode, this means that we cannot compare to the merge base, but we have to compare to the empty tree instead. Also, if running in verbose diffstat mode, we should not output Changes from <merge-base> to <onto> as that does not make sense without any merge base. Note: neither scripted nor built-in versoin of `git rebase` were prepared for this situation well. We use this opportunity not only to fix the bug(s), but also to make both versions' output consistent in this instance. And add a regression test to keep this working in all eternity. Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-30rebase: fix GIT_REFLOG_ACTION regressionLibravatar Johannes Schindelin1-0/+26
The scripted version of "rebase" honored the `GIT_REFLOG_ACTION`, and some automation scripts expected the reflog entries to be prefixed with "rebase -i", not "rebase", after running "rebase -i". This regressed in the reimplementation in C. Fix that, and add a regression test, both with `GIT_REFLOG_ACTION` set and unset. Note: the reflog message for "rebase finished" did *not* honor GIT_REFLOG_ACTION, and as we are very late in the v2.20.0-rcN phase, we leave that bug for later (as it seems that that bug has been with us from the very beginning). Reported by Ian Jackson. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-29advice: don't pointlessly suggest --convert-graft-fileLibravatar Ævar Arnfjörð Bjarmason1-1/+4
The advice to run 'git replace --convert-graft-file' added in f9f99b3f7d ("Deprecate support for .git/info/grafts", 2018-04-29) didn't add an exception for the 'git replace --convert-graft-file' codepath itself. As a result we'd suggest running --convert-graft-file while the user was running --convert-graft-file, which makes no sense. Before: $ git replace --convert-graft-file hint: Support for <GIT_DIR>/info/grafts is deprecated hint: and will be removed in a future Git version. hint: hint: Please use "git replace --convert-graft-file" hint: to convert the grafts into replace refs. hint: hint: Turn this message off by running hint: "git config advice.graftFileDeprecated false" Add a check for that case and skip printing the advice while the user is busy following our advice. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-27t/lib-git-daemon: fix signal checkingLibravatar SZEDER Gábor1-1/+1
Test scripts checking 'git daemon' stop the daemon with a TERM signal, and the 'stop_git_daemon' helper checks the daemon's exit status to make sure that it indeed died because of that signal. This check is bogus since 03c39b3458 (t/lib-git-daemon: use test_match_signal, 2016-06-24), for two reasons: - Right after killing 'git daemon', 'stop_git_daemon' saves its exit status in a variable, but since 03c39b3458 the condition checking the exit status looks at '$?', which at this point is not the exit status of 'git daemon', but that of the variable assignment, i.e. it's always 0. - The unexpected exit status should abort the whole test script with 'error', but it doesn't, because 03c39b3458 forgot to negate 'test_match_signal's exit status in the condition. This patch fixes both issues. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-26Merge branch 'tb/clone-case-smashing-warning-test'Libravatar Junio C Hamano1-1/+1
The code recently added to "git clone" to see if the platform's filesystem is adequate to check out and use the project code correctly (e.g. a case smashing filesystem cannot be used for a project with two files whose paths are different only in case) was meant to help Windows users, but the test for it was not enabled for that platform, which has been corrected. * tb/clone-case-smashing-warning-test: t5601-99: Enable colliding file detection for MINGW
2018-11-26Merge branch 'jk/t5562-perl-path-fix'Libravatar Junio C Hamano2-1/+1
Hotfix for test breakage on platforms whose Perl is not at /usr/bin/perl * jk/t5562-perl-path-fix: t5562: fix perl path
2018-11-24t5562: fix perl pathLibravatar Jeff King2-1/+1
Some systems do not have perl installed to /usr/bin. Use the variable from the build settiings, and call perl directly than via shebang. Signed-off-by: Max Kirillov <max@max630.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-24t5601-99: Enable colliding file detection for MINGWLibravatar Torsten Bögershausen1-1/+1
Commit b878579ae7 (clone: report duplicate entries on case-insensitive filesystems - 2018-08-17) adds a warning to user when cloning a repo with case-sensitive file names on a case-insensitive file system. This test has never been enabled for MINGW. It had been working since day 1, but I forget to report that to the author. Enable it after a re-test. Signed-off-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-21Merge branch 'sg/test-rebase-editor-fix' into maintLibravatar Junio C Hamano2-7/+7
* sg/test-rebase-editor-fix: t3404-rebase-interactive: test abbreviated commands
2018-11-21Merge branch 'ma/t7005-bash-workaround' into maintLibravatar Junio C Hamano1-1/+1
Test fix. * ma/t7005-bash-workaround: t7005-editor: quote filename to fix whitespace-issue
2018-11-21Merge branch 'ma/t1400-undebug-test' into maintLibravatar Junio C Hamano1-1/+1
Test fix. * ma/t1400-undebug-test: t1400: drop debug `echo` to actually execute `test`
2018-11-21Merge branch 'tg/t5551-with-curl-7.61.1' into maintLibravatar Junio C Hamano1-34/+34
Test update. Supersedes tz/t5551-with-curl-7.61.1 topic * tg/t5551-with-curl-7.61.1: t5551: compare sorted cookies files t5551: move setup code inside test_expect blocks
2018-11-21Merge branch 'sg/split-index-test' into maintLibravatar Junio C Hamano2-8/+11
Test updates. * sg/split-index-test: t0090: disable GIT_TEST_SPLIT_INDEX for the test checking split index t1700-split-index: drop unnecessary 'grep'
2018-11-21Merge branch 'sg/t3701-tighten-trace' into maintLibravatar Junio C Hamano1-1/+1
Test update. * sg/t3701-tighten-trace: t3701-add-interactive: tighten the check of trace output
2018-11-21Merge branch 'jk/detect-truncated-zlib-input' into maintLibravatar Junio C Hamano1-2/+21
A regression in Git 2.12 era made "git fsck" fall into an infinite loop while processing truncated loose objects. * jk/detect-truncated-zlib-input: cat-file: handle streaming failures consistently check_stream_sha1(): handle input underflow t1450: check large blob in trailing-garbage test
2018-11-21Merge branch 'sg/test-verbose-log' into maintLibravatar Junio C Hamano2-2/+3
Our test scripts can now take the '-V' option as a synonym for the '--verbose-log' option. * sg/test-verbose-log: test-lib: introduce the '-V' short option for '--verbose-log'
2018-11-21Merge branch 'md/exclude-promisor-objects-fix' into maintLibravatar Junio C Hamano2-0/+8
Operations on promisor objects make sense in the context of only a small subset of the commands that internally use the revisions machinery, but the "--exclude-promisor-objects" option were taken and led to nonsense results by commands like "log", to which it didn't make much sense. This has been corrected. * md/exclude-promisor-objects-fix: exclude-promisor-objects: declare when option is allowed Documentation/git-log.txt: do not show --exclude-promisor-objects