summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-01-22tests: explicitly use `test-tool.exe` on WindowsLibravatar Johannes Schindelin1-1/+1
In 8abfdf44c882 (tests: explicitly use `git.exe` on Windows, 2018-11-14), we made sure to use the `.exe` file extension when using an absolute path to `git.exe`, to avoid getting confused with a file or directory in the same place that lacks said file extension. For the same reason, we need to handle test-tool.exe the same way. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-16tests: explicitly use `git.exe` on WindowsLibravatar Johannes Schindelin3-5/+11
On Windows, when we refer to `/an/absolute/path/to/git`, it magically resolves `git.exe` at that location. Except if something of the name `git` exists next to that `git.exe`. So if we call `$BUILD_DIR/git`, it will find `$BUILD_DIR/git.exe` *only* if there is not, say, a directory called `$BUILD_DIR/git`. Such a directory, however, exists in Git for Windows when building with Visual Studio (our Visual Studio project generator defaults to putting the build files into a directory whose name is the base name of the corresponding `.exe`). In the bin-wrappers/* scripts, we already take pains to use `git.exe` rather than `git`, as this could pick up the wrong thing on Windows (i.e. if there exists a `git` file or directory in the build directory). Now we do the same in the tests' start-up code. This also helps when testing an installed Git, as there might be even more likely some stray file or directory in the way. Note: the only way we can record whether the `.exe` suffix is by writing it to the `GIT-BUILD-OPTIONS` file and sourcing it at the beginning of `t/test-lib.sh`. This is not a requirement introduced by this patch, but we move the call to be able to use the `$X` variable that holds the file extension, if any. Note also: the many, many calls to `git this` and `git that` are unaffected, as the regular PATH search will find the `.exe` files on Windows (and not be confused by a directory of the name `git` that is in one of the directories listed in the `PATH` variable), while `/path/to/git` would not, per se, know that it is looking for an executable and happily prefer such a directory. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-16tests: do not require Git to be built when testing an installed GitLibravatar Johannes Schindelin1-2/+7
We really only need the test helpers to be built in the worktree in that case, but that is not what we test for. On the other hand it is a perfect opportunity to verify that `GIT_TEST_INSTALLED` points to a working Git. So let's test the appropriate Git executable. While at it, also adjust the error message in the `GIT_TEST_INSTALLED` case. This patch is best viewed with `-w --patience`. Helped-by: Jeff King <peff@peff.net> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-14t/lib-gettext: test installed git-sh-i18n if GIT_TEST_INSTALLED is setLibravatar Johannes Schindelin1-1/+6
It makes very, very little sense to test the built git-sh-i18n when the user asked specifically to test another one. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-14tests: respect GIT_TEST_INSTALLED when initializing repositoriesLibravatar Johannes Schindelin1-1/+2
It really makes very, very little sense to use a different git executable than the one the caller indicated via setting the environment variable GIT_TEST_INSTALLED. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-14tests: fix GIT_TEST_INSTALLED's PATH to include t/helper/Libravatar Johannes Schindelin1-1/+1
We really need to be able to find the test helpers... Really. This change was forgotten when we moved the test helpers into t/helper/ Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-13Tenth batch for 2.20Libravatar Junio C Hamano1-0/+98
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-13Merge branch 'nd/complete-format-patch'Libravatar Junio C Hamano2-10/+14
The support for format-patch (and send-email) by the command-line completion script (in contrib/) has been simplified a bit. * nd/complete-format-patch: completion: use __gitcomp_builtin for format-patch
2018-11-13Merge branch 'nd/tree-walk-path-exclusion'Libravatar Junio C Hamano2-3/+25
Pathspec matching against a tree object were buggy when negative pathspec elements were involved, which has been fixed. * nd/tree-walk-path-exclusion: tree-walk.c: fix overoptimistic inclusion in :(exclude) matching
2018-11-13Merge branch 'sg/travis-install-dependencies'Libravatar Junio C Hamano2-27/+29
The procedure to install dependencies before testing at Travis CI is getting revamped for both simplicity and flexibility, taking advantage of the recent move to the vm-based environment. * sg/travis-install-dependencies: travis-ci: install packages in 'ci/install-dependencies.sh'
2018-11-13Merge branch 'bp/add-diff-files-optim'Libravatar Junio C Hamano1-5/+4
"git add" needs to internally run "diff-files" equivalent, and the codepath learned the same optimization as "diff-files" has to run lstat(2) in parallel to find which paths have been updated in the working tree. * bp/add-diff-files-optim: add: speed up cmd_add() by utilizing read_cache_preload()
2018-11-13Merge branch 'jk/xdiff-interface'Libravatar Junio C Hamano10-115/+143
The interface into "xdiff" library used to discover the offset and size of a generated patch hunk by first formatting it into the textual hunk header "@@ -n,m +k,l @@" and then parsing the numbers out. A new interface has been introduced to allow callers a more direct access to them. * jk/xdiff-interface: xdiff-interface: drop parse_hunk_header() range-diff: use a hunk callback diff: convert --check to use a hunk callback combine-diff: use an xdiff hunk callback diff: use hunk callback for word-diff diff: discard hunk headers for patch-ids earlier diff: avoid generating unused hunk header lines xdiff-interface: provide a separate consume callback for hunks xdiff: provide a separate emit callback for hunks
2018-11-13Merge branch 'jk/misc-unused-fixes'Libravatar Junio C Hamano5-34/+59
Assorted fixes for bugs found while auditing -Wunused-parameter warnings. * jk/misc-unused-fixes: approxidate: fix NULL dereference in date_time() pathspec: handle non-terminated strings with :(attr) approxidate: handle pending number for "specials" rev-list: handle flags for --indexed-objects
2018-11-13Merge branch 'nd/per-worktree-ref-iteration'Libravatar Junio C Hamano16-47/+449
The code to traverse objects for reachability, used to decide what objects are unreferenced and expendable, have been taught to also consider per-worktree refs of other worktrees as starting points to prevent data loss. * nd/per-worktree-ref-iteration: git-worktree.txt: correct linkgit command name reflog expire: cover reflog from all worktrees fsck: check HEAD and reflog from other worktrees fsck: move fsck_head_link() to get_default_heads() to avoid some globals revision.c: better error reporting on ref from different worktrees revision.c: correct a parameter name refs: new ref types to make per-worktree refs visible to all worktrees Add a place for (not) sharing stuff between worktrees refs.c: indent with tabs, not spaces
2018-11-13Merge branch 'bp/refresh-index-using-preload'Libravatar Junio C Hamano7-8/+17
The helper function to refresh the cached stat information in the in-core index has learned to perform the lstat() part of the operation in parallel on multi-core platforms. * bp/refresh-index-using-preload: refresh_index: remove unnecessary calls to preload_index() speed up refresh_index() by utilizing preload_index()
2018-11-13Merge branch 'ag/rebase-i-in-c'Libravatar Junio C Hamano1-1/+1
Code clean-up for a topic already in 'master'. * ag/rebase-i-in-c: sequencer.c: remove a stray semicolon
2018-11-13Merge branch 'al/send-email-auto-cte-fixup'Libravatar Junio C Hamano2-1/+16
"git send-email --transfer-encoding=..." in recent versions of Git sometimes produced an empty "Content-Transfer-Encoding:" header, which has been corrected. * al/send-email-auto-cte-fixup: send-email: avoid empty transfer encoding header
2018-11-13Merge branch 'ds/add-missing-tags'Libravatar Junio C Hamano5-5/+197
The history traversal used to implement the tag-following has been optimized by introducing a new helper. * ds/add-missing-tags: remote: make add_missing_tags() linear test-reach: test get_reachable_subset commit-reach: implement get_reachable_subset
2018-11-13Merge branch 'sh/mingw-safer-compat-poll'Libravatar Junio C Hamano1-4/+8
Windows fix. * sh/mingw-safer-compat-poll: poll: use GetTickCount64() to avoid wrap-around issues
2018-11-13Merge branch 'js/rebase-p-tests'Libravatar Junio C Hamano14-43/+78
In preparation to the day when we can deprecate and remove the "rebase -p", make sure we can skip and later remove tests for it. * js/rebase-p-tests: tests: optionally skip `git rebase -p` tests t3418: decouple test cases from a previous `rebase -p` test case t3404: decouple some test cases from outcomes of previous test cases
2018-11-13Merge branch 'pw/am-rebase-read-author-script'Libravatar Junio C Hamano3-127/+128
Unify code to read the author-script used in "git am" and the commands that use the sequencer machinery, e.g. "git rebase -i". * pw/am-rebase-read-author-script: sequencer: use read_author_script() add read_author_script() to libgit am: rename read_author_script() am: improve author-script error reporting am: don't die in read_author_script()
2018-11-13Merge branch 'jc/war-on-string-list'Libravatar Junio C Hamano1-46/+100
Replace three string-list instances used as look-up tables in "git fetch" with hashmaps. * jc/war-on-string-list: fetch: replace string-list used as a look-up table with a hashmap
2018-11-13Merge branch 'ag/rev-parse-all-exclude-fix'Libravatar Junio C Hamano2-0/+13
"git rev-parse --exclude=* --branches --branches" (i.e. first saying "add only things that do not match '*' out of all branches" and then adding all branches, without any exclusion this time") worked as expected, but "--exclude=* --all --all" did not work the same way, which has been fixed. * ag/rev-parse-all-exclude-fix: rev-parse: clear --exclude list after 'git rev-parse --all'
2018-11-13Merge branch 'jt/tighten-fetch-proto-v2-response'Libravatar Junio C Hamano2-0/+62
"git fetch" was a bit loose in parsing resposes from the other side when talking over the protocol v2. * jt/tighten-fetch-proto-v2-response: fetch-pack: be more precise in parsing v2 response
2018-11-13Merge branch 'ao/submodule-wo-gitmodules-checked-out'Libravatar Junio C Hamano16-32/+454
The submodule support has been updated to read from the blob at HEAD:.gitmodules when the .gitmodules file is missing from the working tree. * ao/submodule-wo-gitmodules-checked-out: t/helper: add test-submodule-nested-repo-config submodule: support reading .gitmodules when it's not in the working tree submodule: add a helper to check if it is safe to write to .gitmodules t7506: clean up .gitmodules properly before setting up new scenario submodule: use the 'submodule--helper config' command submodule--helper: add a new 'config' subcommand t7411: be nicer to future tests and really clean things up t7411: merge tests 5 and 6 submodule: factor out a config_set_in_gitmodules_file_gently function submodule: add a print_config_from_gitmodules() helper
2018-11-13Merge branch 'nb/worktree-api-doc'Libravatar Junio C Hamano3-9/+9
Code readability fix. * nb/worktree-api-doc: worktree: rename is_worktree_locked to worktree_lock_reason worktree: update documentation for lock_reason and lock_reason_valid
2018-11-13Merge branch 'ma/sequencer-do-reset-saner-loop-termination'Libravatar Junio C Hamano1-2/+5
Code readability fix. * ma/sequencer-do-reset-saner-loop-termination: sequencer: break out of loop explicitly
2018-11-13Merge branch 'js/mingw-utf8-env'Libravatar Junio C Hamano3-117/+197
Windows fix. * js/mingw-utf8-env: mingw: reencode environment variables on the fly (UTF-16 <-> UTF-8) t7800: fix quoting
2018-11-13Merge branch 'js/mingw-perl5lib'Libravatar Junio C Hamano8-23/+109
Windows fix. * js/mingw-perl5lib: mingw: unset PERL5LIB by default config: move Windows-specific config settings into compat/mingw.c config: allow for platform-specific core.* config settings config: rename `dummy` parameter to `cb` in git_default_config()
2018-11-13Merge branch 'js/mingw-isatty-and-dup2'Libravatar Junio C Hamano2-0/+15
Windows fix. * js/mingw-isatty-and-dup2: mingw: fix isatty() after dup2()
2018-11-13Merge branch 'ab/pack-tests-cleanup'Libravatar Junio C Hamano2-23/+28
A couple of tests used to leave the repository in a state that is deliberately corrupt, which have been corrected. * ab/pack-tests-cleanup: index-pack tests: don't leave test repo dirty at end pack-objects tests: don't leave test .git corrupt at end pack-objects test: modernize style
2018-11-13Merge branch 'ds/test-multi-pack-index'Libravatar Junio C Hamano8-11/+42
Tests for the recently introduced multi-pack index machinery. * ds/test-multi-pack-index: packfile: close multi-pack-index in close_all_packs multi-pack-index: define GIT_TEST_MULTI_PACK_INDEX midx: close multi-pack-index on repack midx: fix broken free() in close_midx()
2018-11-13Merge branch 'nd/wildmatch-double-asterisk'Libravatar Junio C Hamano4-6/+6
A pattern with '**' that does not have a slash on either side used to be an invalid one, but the code now treats such double-asterisks the same way as two normal asterisks that happen to be adjacent to each other. * nd/wildmatch-double-asterisk: wildmatch: change behavior of "foo**bar" in WM_PATHNAME mode
2018-11-13Merge branch 'nd/per-worktree-config'Libravatar Junio C Hamano12-78/+255
A fourth class of configuration files (in addition to the traditional "system wide", "per user in the $HOME directory" and "per repository in the $GIT_DIR/config") has been introduced so that different worktrees that share the same repository (hence the same $GIT_DIR/config file) can use different customization. * nd/per-worktree-config: worktree: add per-worktree config files t1300: extract and use test_cmp_config()
2018-11-13Merge branch 'jk/stream-pack-non-delta-clarification'Libravatar Junio C Hamano1-0/+9
Additional comment on a tricky piece of code to help developers. * jk/stream-pack-non-delta-clarification: read_istream_pack_non_delta(): document input handling
2018-11-13Merge branch 'jk/proto-v2-ref-prefix-fix'Libravatar Junio C Hamano2-8/+23
"git ls-remote $there foo" was broken by recent update for the protocol v2 and stopped showing refs that match 'foo' that are not refs/{heads,tags}/foo, which has been fixed. * jk/proto-v2-ref-prefix-fix: ls-remote: pass heads/tags prefixes to transport ls-remote: do not send ref prefixes for patterns
2018-11-13Merge branch 'jk/detect-truncated-zlib-input'Libravatar Junio C Hamano3-7/+35
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-13Merge branch 'nd/config-split'Libravatar Junio C Hamano88-2894/+2980
Split the overly large Documentation/config.txt file into million little pieces. This potentially allows each individual piece included into the manual page of the command it affects more easily. * nd/config-split: (81 commits) config.txt: remove config/dummy.txt config.txt: move worktree.* to a separate file config.txt: move web.* to a separate file config.txt: move versionsort.* to a separate file config.txt: move user.* to a separate file config.txt: move url.* to a separate file config.txt: move uploadpack.* to a separate file config.txt: move uploadarchive.* to a separate file config.txt: move transfer.* to a separate file config.txt: move tag.* to a separate file config.txt: move submodule.* to a separate file config.txt: move stash.* to a separate file config.txt: move status.* to a separate file config.txt: move splitIndex.* to a separate file config.txt: move showBranch.* to a separate file config.txt: move sequencer.* to a separate file config.txt: move sendemail-config.txt to config/ config.txt: move reset.* to a separate file config.txt: move rerere.* to a separate file config.txt: move repack.* to a separate file ...
2018-11-07approxidate: fix NULL dereference in date_time()Libravatar Jeff King2-1/+2
When we see a time like "noon", we pass "12" to our date_time() helper, which sets the hour to 12pm. If the current time is before noon, then we wrap around to yesterday using date_yesterday(). But unlike the normal calls to date_yesterday() from approxidate_alpha(), we pass a NULL "num" parameter. Since c27cc94fad (approxidate: handle pending number for "specials", 2018-11-02), that causes a segfault. One way to fix this is by checking for NULL. But arguably date_time() is abusing our helper by passing NULL in the first place (and this is the only case where one of these "special" parsers is used this way). So instead, let's have it just do the 1-day subtraction itself. It's still just a one-liner due to our update_tm() helper. Note that the test added here is a little funny, as we say "10am noon", which makes the "10am" seem pointless. But this bug can only be triggered when it the currently-parsed hour is before the special time. The latest special time is "tea" at 1700, but t0006 uses a hard-coded TEST_DATE_NOW of 1900. We could reset TEST_DATE_NOW, but that may lead to confusion in other tests. Just saying "10am noon" makes this test self-contained. Reported-by: Carlo Arenas <carenas@gmail.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-06Ninth batch for 2.20Libravatar Junio C Hamano1-2/+57
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-06Merge branch 'sg/test-verbose-log'Libravatar 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-06Merge branch 'rj/header-cleanup'Libravatar Junio C Hamano3-3/+6
Code cleanup. * rj/header-cleanup: commit-reach.h: add missing declarations (hdr-check) ewok_rlw.h: add missing 'inline' to function definition fetch-object.h: add missing declaration (hdr-check)
2018-11-06Merge branch 'ss/travis-ci-force-vm-mode'Libravatar Junio C Hamano1-2/+0
The "container" mode of TravisCI is going away. Our .travis.yml file is getting prepared for the transition. * ss/travis-ci-force-vm-mode: travis-ci: no longer use containers
2018-11-06Merge branch 'sg/test-rebase-editor-fix'Libravatar Junio C Hamano2-7/+7
* sg/test-rebase-editor-fix: t3404-rebase-interactive: test abbreviated commands
2018-11-06Merge branch 'tb/char-may-be-unsigned'Libravatar Junio C Hamano1-1/+1
Build portability fix. * tb/char-may-be-unsigned: path.c: char is not (always) signed
2018-11-06Merge branch 'js/mingw-ns-filetime'Libravatar Junio C Hamano3-38/+76
Windows port learned to use nano-second resolution file timestamps. * js/mingw-ns-filetime: mingw: implement nanosecond-precision file times mingw: replace MSVCRT's fstat() with a Win32-based implementation mingw: factor out code to set stat() data
2018-11-06Merge branch 'md/exclude-promisor-objects-fix'Libravatar Junio C Hamano8-2/+15
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
2018-11-06Merge branch 'jw/send-email-no-auth'Libravatar Junio C Hamano2-3/+12
"git send-email" learned to disable SMTP authentication via the "--smtp-auth=none" option, even when the smtp username is given (which turns the authentication on by default). * jw/send-email-no-auth: send-email: explicitly disable authentication
2018-11-06Merge branch 'nd/submodule-unused-vars'Libravatar Junio C Hamano4-31/+38
Code clean-up. * nd/submodule-unused-vars: submodule.c: remove some of the_repository references
2018-11-06Merge branch 'nd/unpack-trees-with-cache-tree'Libravatar Junio C Hamano1-1/+1
Trivial bugfix. * nd/unpack-trees-with-cache-tree: read-cache: use of memory after it is freed