summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-04-11Merge branch 'pk/test-avoid-pipe-hiding-exit-status'Junio C Hamano
Test cleanup. * pk/test-avoid-pipe-hiding-exit-status: test: avoid pipes in git related commands for test
2018-04-11Merge branch 'rs/status-with-removed-submodule'Junio C Hamano
"git submodule status" misbehaved on a submodule that has been removed from the working tree. * rs/status-with-removed-submodule: submodule: check for NULL return of get_submodule_ref_store()
2018-04-11Merge branch 'nd/combined-test-helper'Junio C Hamano
Small test-helper programs have been consolidated into a single binary. * nd/combined-test-helper: (36 commits) t/helper: merge test-write-cache into test-tool t/helper: merge test-wildmatch into test-tool t/helper: merge test-urlmatch-normalization into test-tool t/helper: merge test-subprocess into test-tool t/helper: merge test-submodule-config into test-tool t/helper: merge test-string-list into test-tool t/helper: merge test-strcmp-offset into test-tool t/helper: merge test-sigchain into test-tool t/helper: merge test-sha1-array into test-tool t/helper: merge test-scrap-cache-tree into test-tool t/helper: merge test-run-command into test-tool t/helper: merge test-revision-walking into test-tool t/helper: merge test-regex into test-tool t/helper: merge test-ref-store into test-tool t/helper: merge test-read-cache into test-tool t/helper: merge test-prio-queue into test-tool t/helper: merge test-path-utils into test-tool t/helper: merge test-online-cpus into test-tool t/helper: merge test-mktemp into test-tool t/helper: merge (unused) test-mergesort into test-tool ...
2018-04-11Merge branch 'sb/packfiles-in-repository'Junio C Hamano
Refactoring of the internal global data structure continues. * sb/packfiles-in-repository: packfile: keep prepare_packed_git() private packfile: allow find_pack_entry to handle arbitrary repositories packfile: add repository argument to find_pack_entry packfile: allow reprepare_packed_git to handle arbitrary repositories packfile: allow prepare_packed_git to handle arbitrary repositories packfile: allow prepare_packed_git_one to handle arbitrary repositories packfile: add repository argument to reprepare_packed_git packfile: add repository argument to prepare_packed_git packfile: add repository argument to prepare_packed_git_one packfile: allow install_packed_git to handle arbitrary repositories packfile: allow rearrange_packed_git to handle arbitrary repositories packfile: allow prepare_packed_git_mru to handle arbitrary repositories
2018-04-11Merge branch 'sb/object-store'Junio C Hamano
Refactoring the internal global data structure to make it possible to open multiple repositories, work with and then close them. Rerolled by Duy on top of a separate preliminary clean-up topic. The resulting structure of the topics looked very sensible. * sb/object-store: (27 commits) sha1_file: allow sha1_loose_object_info to handle arbitrary repositories sha1_file: allow map_sha1_file to handle arbitrary repositories sha1_file: allow map_sha1_file_1 to handle arbitrary repositories sha1_file: allow open_sha1_file to handle arbitrary repositories sha1_file: allow stat_sha1_file to handle arbitrary repositories sha1_file: allow sha1_file_name to handle arbitrary repositories sha1_file: add repository argument to sha1_loose_object_info sha1_file: add repository argument to map_sha1_file sha1_file: add repository argument to map_sha1_file_1 sha1_file: add repository argument to open_sha1_file sha1_file: add repository argument to stat_sha1_file sha1_file: add repository argument to sha1_file_name sha1_file: allow prepare_alt_odb to handle arbitrary repositories sha1_file: allow link_alt_odb_entries to handle arbitrary repositories sha1_file: add repository argument to prepare_alt_odb sha1_file: add repository argument to link_alt_odb_entries sha1_file: add repository argument to read_info_alternates sha1_file: add repository argument to link_alt_odb_entry sha1_file: add raw_object_store argument to alt_odb_usable pack: move approximate object count to object store ...
2018-04-11Merge branch 'jc/test-must-be-empty'Junio C Hamano
Test helper update. * jc/test-must-be-empty: test_must_be_empty: simplify file existence check
2018-04-11Merge branch 'cc/perf-aggregate-sort'Junio C Hamano
Perf-test update. * cc/perf-aggregate-sort: perf/aggregate: add --sort-by=regression option perf/aggregate: add display_dir()
2018-04-11Merge branch 'ab/doc-hash-brokenness'Junio C Hamano
Doc updates. * ab/doc-hash-brokenness: doc hash-function-transition: clarify what SHAttered means doc hash-function-transition: clarify how older gits die on NewHash
2018-04-11Merge branch 'bc/hash-independent-tests'Junio C Hamano
Tests that rely on the exact hardcoded values of object names have been updated in preparation for hash function migration. * bc/hash-independent-tests: t2107: abstract away SHA-1-specific constants t2101: abstract away SHA-1-specific constants t2101: modernize test style t2020: abstract away SHA-1 specific constants t1507: abstract away SHA-1-specific constants t1411: abstract away SHA-1-specific constants t1405: sort reflog entries in a hash-independent way t1300: abstract away SHA-1-specific constants t1304: abstract away SHA-1-specific constants t1011: abstract away SHA-1-specific constants
2018-04-11Merge branch 'ab/drop-contrib-examples'Junio C Hamano
* ab/drop-contrib-examples: Remove contrib/examples/*
2018-04-10The second batch for 2.18Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-04-10Merge branch 'ys/bisect-object-id-missing-conversion-fix'Junio C Hamano
Code clean-up. * ys/bisect-object-id-missing-conversion-fix: bisect: use oid_to_hex() for converting object_id hashes to hex strings
2018-04-10Merge branch 'yk/filter-branch-non-committish-refs'Junio C Hamano
when refs that do not point at committish are given, "git filter-branch" gave a misleading error messages. This has been corrected. * yk/filter-branch-non-committish-refs: filter-branch: fix errors caused by refs that point at non-committish
2018-04-10Merge branch 'nd/trace-with-env'Junio C Hamano
Code cleanup. * nd/trace-with-env: run-command: use strbuf_addstr() for adding a string to a strbuf
2018-04-10Merge branch 'nd/parseopt-completion-more'Junio C Hamano
The mechanism to use parse-options API to automate the command line completion continues to get extended and polished. * nd/parseopt-completion-more: completion: use __gitcomp_builtin in _git_cherry completion: use __gitcomp_builtin in _git_ls_tree completion: delete option-only completion commands completion: add --option completion for most builtin commands completion: factor out _git_xxx calling code completion: mention the oldest version we need to support git.c: add hidden option --list-parseopt-builtins git.c: move cmd_struct declaration up
2018-04-10Merge branch 'ds/bsearch-hash'Junio C Hamano
Code to find the length to uniquely abbreviate object names based on packfile content, which is a relatively recent addtion, has been optimized to use the same fan-out table. * ds/bsearch-hash: sha1_name: use bsearch_pack() in unique_in_pack() sha1_name: use bsearch_pack() for abbreviations packfile: define and use bsearch_pack() sha1_name: convert struct min_abbrev_data to object_id
2018-04-10Merge branch 'ws/rebase-p'Junio C Hamano
Code clean-up. * ws/rebase-p: rebase: remove merges_option and a blank line rebase: remove unused code paths from git_rebase__interactive__preserve_merges rebase: remove unused code paths from git_rebase__interactive rebase: add and use git_rebase__interactive__preserve_merges rebase: extract functions out of git_rebase__interactive rebase: reindent function git_rebase__interactive rebase: update invocation of rebase dot-sourced scripts rebase-interactive: simplify pick_on_preserving_merges
2018-04-10Merge branch 'jk/diff-highlight-graph-fix'Junio C Hamano
"diff-highlight" filter (in contrib/) learned to undertand "git log --graph" output better. * jk/diff-highlight-graph-fix: diff-highlight: detect --graph by indent diff-highlight: use flush() helper consistently diff-highlight: test graphs with --color diff-highlight: test interleaved parallel lines of history diff-highlight: prefer "echo" to "cat" in tests diff-highlight: use test_tick in graph test diff-highlight: correct test graph diagram
2018-04-10Merge branch 'nd/remove-ignore-env-field'Junio C Hamano
Code clean-up for the "repository" abstraction. * nd/remove-ignore-env-field: repository.h: add comment and clarify repo_set_gitdir repository: delete ignore_env member sha1_file.c: move delayed getenv(altdb) back to setup_git_env() repository.c: delete dead functions repository.c: move env-related setup code back to environment.c repository: initialize the_repository in main()
2018-04-10Merge branch 'ps/contains-id-error-message'Junio C Hamano
"git tag --contains no-such-commit" gave a full list of options after giving an error message. * ps/contains-id-error-message: parse-options: do not show usage upon invalid option value
2018-04-10completion: improve ls-files filter performanceClemens Buchacher
From the output of ls-files, we remove all but the leftmost path component and then we eliminate duplicates. We do this in a while loop, which is a performance bottleneck when the number of iterations is large (e.g. for 60000 files in linux.git). $ COMP_WORDS=(git status -- ar) COMP_CWORD=3; time _git real 0m11.876s user 0m4.685s sys 0m6.808s Replacing the loop with the cut command improves performance significantly: $ COMP_WORDS=(git status -- ar) COMP_CWORD=3; time _git real 0m1.372s user 0m0.263s sys 0m0.167s The measurements were done with Msys2 bash, which is used by Git for Windows. When filtering the ls-files output we take care not to touch absolute paths. This is redundant, because ls-files will never output absolute paths. Remove the unnecessary operations. The issue was reported here: https://github.com/git-for-windows/git/issues/1533 Signed-off-by: Clemens Buchacher <drizzd@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-04-09The first batch for 2.18 cycleJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-04-09Merge branch 'tg/stash-untracked-with-pathspec-fix'Junio C Hamano
"git stash push -u -- <pathspec>" gave an unnecessary and confusing error message when there was no tracked files that match the <pathspec>, which has been fixed. * tg/stash-untracked-with-pathspec-fix: stash: drop superfluos pathspec parameter stash push -u: don't create empty stash stash push: avoid printing errors stash: fix nonsense pipeline
2018-04-09Merge branch 'nd/worktree-prune'Junio C Hamano
The way "git worktree prune" worked internally has been simplified, by assuming how "git worktree move" moves an existing worktree to a different place. * nd/worktree-prune: worktree prune: improve prune logic when worktree is moved worktree: delete dead code gc.txt: more details about what gc does
2018-04-09Merge branch 'bc/object-id'Junio C Hamano
Conversion from uchar[20] to struct object_id continues. * bc/object-id: (36 commits) convert: convert to struct object_id sha1_file: introduce a constant for max header length Convert lookup_replace_object to struct object_id sha1_file: convert read_sha1_file to struct object_id sha1_file: convert read_object_with_reference to object_id tree-walk: convert tree entry functions to object_id streaming: convert istream internals to struct object_id tree-walk: convert get_tree_entry_follow_symlinks internals to object_id builtin/notes: convert static functions to object_id builtin/fmt-merge-msg: convert remaining code to object_id sha1_file: convert sha1_object_info* to object_id Convert remaining callers of sha1_object_info_extended to object_id packfile: convert unpack_entry to struct object_id sha1_file: convert retry_bad_packed_offset to struct object_id sha1_file: convert assert_sha1_type to object_id builtin/mktree: convert to struct object_id streaming: convert open_istream to use struct object_id sha1_file: convert check_sha1_signature to struct object_id sha1_file: convert read_loose_object to use struct object_id builtin/index-pack: convert struct ref_delta_entry to object_id ...
2018-04-09Merge branch 'ma/shortlog-revparse'Junio C Hamano
"git shortlog cruft" aborted with a BUG message when run outside a Git repository. The command has been taught to complain about extra and unwanted arguments on its command line instead in such a case. * ma/shortlog-revparse: shortlog: disallow left-over arguments outside repo shortlog: add usage-string for stdin-reading git-shortlog.txt: reorder usages
2018-04-09Merge branch 'ab/install-symlinks'Junio C Hamano
The build procedure learned to optionally use symbolic links (instead of hardlinks and copies) to install "git-foo" for built-in commands, whose binaries are all identical. * ab/install-symlinks: Makefile: optionally symlink libexec/git-core binaries to bin/git Makefile: add a gitexecdir_relative variable Makefile: fix broken bindir_relative variable
2018-04-09Merge branch 'ml/filter-branch-no-op-error'Junio C Hamano
"git filter-branch" learned to use a different exit code to allow the callers to tell the case where there was no new commits to rewrite from other error cases. * ml/filter-branch-no-op-error: filter-branch: return 2 when nothing to rewrite
2018-04-09Merge branch 'ab/pcre-v2'Junio C Hamano
Git can be built to use either v1 or v2 of the PCRE library, and so far, the build-time configuration USE_LIBPCRE=YesPlease instructed the build procedure to use v1, but now it means v2. USE_LIBPCRE1 and USE_LIBPCRE2 can be used to explicitly choose which version to use, as before. * ab/pcre-v2: Makefile: make USE_LIBPCRE=YesPlease mean v2, not v1 configure: detect redundant --with-libpcre & --with-libpcre1 configure: fix a regression in PCRE v1 detection
2018-04-09Merge branch 'ti/fetch-everything-local-optim'Junio C Hamano
A "git fetch" from a repository with insane number of refs into a repository that is already up-to-date still wasted too many cycles making many lstat(2) calls to see if these objects at the tips exist as loose objects locally. These lstat(2) calls are optimized away by enumerating all loose objects beforehand. It is unknown if the new strategy negatively affects existing use cases, fetching into a repository with many loose objects from a repository with small number of refs. * ti/fetch-everything-local-optim: fetch-pack.c: use oidset to check existence of loose object
2018-04-09Merge branch 'en/rename-directory-detection'Junio C Hamano
Rename detection logic in "diff" family that is used in "merge" has learned to guess when all of x/a, x/b and x/c have moved to z/a, z/b and z/c, it is likely that x/d added in the meantime would also want to move to z/d by taking the hint that the entire directory 'x' moved to 'z'. A bug causing dirty files involved in a rename to be overwritten during merge has also been fixed as part of this work. * en/rename-directory-detection: (29 commits) merge-recursive: ensure we write updates for directory-renamed file merge-recursive: avoid spurious rename/rename conflict from dir renames directory rename detection: new testcases showcasing a pair of bugs merge-recursive: fix remaining directory rename + dirty overwrite cases merge-recursive: fix overwriting dirty files involved in renames merge-recursive: avoid clobbering untracked files with directory renames merge-recursive: apply necessary modifications for directory renames merge-recursive: when comparing files, don't include trees merge-recursive: check for file level conflicts then get new name merge-recursive: add computation of collisions due to dir rename & merging merge-recursive: check for directory level conflicts merge-recursive: add get_directory_renames() merge-recursive: make a helper function for cleanup for handle_renames merge-recursive: split out code for determining diff_filepairs merge-recursive: make !o->detect_rename codepath more obvious merge-recursive: fix leaks of allocated renames and diff_filepairs merge-recursive: introduce new functions to handle rename logic merge-recursive: move the get_renames() function directory rename detection: tests for handling overwriting dirty files directory rename detection: tests for handling overwriting untracked files ...
2018-04-09configure.ac: fix botched FREAD_READS_DIRECTORIES checkEric Sunshine
3adf9fdecf (configure.ac: loosen FREAD_READS_DIRECTORIES test program, 2017-06-14) broke the test program for the FREAD_READS_DIRECTORIES check by making it syntactically invalid (a dangling ")") and by botching the type returned from 'main' (a FILE* rather than int). As a consequence, the test program won't even compile, thus the check fails unconditionally. Fix these problems. Reported-by: Jonathan Primrose <jprimros@gmail.com> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-04-09git-worktree.txt: unify command-line prompt in example blocksEric Sunshine
The command-line prompt in the "EXAMPLES" section is "$", however, examples in the 'git worktree list' section (oddly) use "S" as a prompt. Fix this inconsistency by settling on "$" as prompt in all examples. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-04-09git-worktree.txt: recommend 'git worktree remove' over manual deletionEric Sunshine
When cc73385cf6 (worktree remove: new command, 2018-02-12) implemented and documented 'git worktree remove', it forgot to update existing instructions suggesting manual deletion. Fix this oversight by recommending 'git worktree remove' instead. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-04-09Documentation: normalize spelling of 'normalised'Elijah Newren
This could be a localization issue, but we had about four dozen "normalize"s (or variants, e.g. normalized, renormalize, etc.), and only one "normalised" (no other variants), so normalize normalised into normalized. Signed-off-by: Elijah Newren <newren@gmail.com> Reviewed-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-04-09Documentation: fix several one-character-off spelling errorsElijah Newren
Signed-off-by: Elijah Newren <newren@gmail.com> Reviewed-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-04-09t/helper: 'test-chmtime (--get|-g)' to print only the mtimePaul-Sebastian Ungureanu
Compared to 'test-chmtime -v +0 file' which prints the mtime and and the file name, 'test-chmtime --get file' displays only the mtime. If it is used in combination with (+|=|=+|=-|-)seconds, it changes and prints the new value. test-chmtime -v +0 file | sed 's/[^0-9].*$//' is now equivalent to: test-chmtime --get file Signed-off-by: Paul-Sebastian Ungureanu <ungureanupaulsebastian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-04-09daemon.c: fix condition for redirecting stderrLucas Werkmeister
Since the --log-destination option was added in 0c591cacb ("daemon: add --log-destination=(stderr|syslog|none)", 2018-02-04) with the explicit goal of allowing logging to stderr when running in inetd mode, we should not always redirect stderr to /dev/null in inetd mode, but rather only when stderr is not being used for logging. Signed-off-by: Lucas Werkmeister <mail@lucaswerkmeister.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-04-09t5404: relax overzealous testJohannes Schindelin
In 0b294c0abf0 (make deleting a missing ref more quiet, 2008-07-08), we added a test to verify that deleting an already-deleted ref does not show an error. Our test simply looks for the substring 'error' in the output of the `git push`, which might look innocuous on the face of it. Suppose, however, that you are a big fan of whales. Or even better: your IT administrator has a whale of a time picking cute user names, e.g. referring to you (due to your like of India Pale Ales) as "one of the cuter rorquals" (see https://en.wikipedia.org/wiki/Rorqual to learn a thing or two about rorquals) and hence your home directory becomes /home/cuterrorqual. If you now run t5404, it fails! Why? Because the test calls `git push origin :b3` which outputs: To /home/cuterrorqual/git/t/trash directory.t5404-tracking-branches/. - [deleted] b3 Note how there is no error displayed in that output? But of course "error" is a substring of "cuterrorqual". And so that `grep error output` finds something. This bug was not, actually, caught having "error" as a substring of the user name but while working in a worktree called "colorize-push-errors", whose name was part of that output, too, suggesting that not even testing for the *word* `error` via `git grep -w error output` would fix the underlying issue. This patch chooses instead to look for the prefix "error:" at the beginning of the line, so that there can be no ambiguity that any catch was indeed a message generated by Git's `error_builtin()` function. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-04-08ref-filter: factor ref_array pushing into its own functionJeff King
In preparation for callers constructing their own ref_array structs, let's move our own internal push operation into its own function. While we're at it, we can replace REALLOC_ARRAY() with ALLOC_GROW(), which should give the growth operation amortized linear complexity (as opposed to growing by one, which is potentially quadratic, though in-place realloc growth often makes this faster in practice). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-04-08ref-filter: make ref_array_item allocation more consistentJeff King
We have a helper function to allocate ref_array_item structs, but it only takes a subset of the possible fields in the struct as initializers. We could have it accept an argument for _every_ field, but that becomes a pain for the fields which some callers don't want to set initially. Instead, let's be explicit that it takes only the minimum required to create the ref, and that callers should then fill in the rest themselves. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-04-08ref-filter: use "struct object_id" consistentlyJeff King
Internally we store a "struct object_id", and all of our callers have one to pass us. But we insist that they peel it to its bare-sha1 hash, which we then hashcpy() into place. Let's pass it around as an object_id, which future-proofs us for a post-sha1 world. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-04-08send-email: simplify Gmail example in the documentationMichal Nazarewicz
There is no need for use to manually call ‘git credential’ especially as the interface isn’t super user-friendly and a bit confusing. ‘git send-email’ will do that for them at the first execution and if the password matches, it will be saved in the store. Simplify the documentaion so it dosn’t include the ‘git credential’ invocation (which was incorrect anyway as it should use ‘approve’ instead of ‘fill’) and instead just mentions that credentials helper must be set up. Signed-off-by: Michał Nazarewicz <mina86@mina86.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-04-07Documentation/git-bisect.txt: git bisect term → git bisect termsAnders Kaseorg
Signed-off-by: Anders Kaseorg <andersk@mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-04-05mergetools: add support for guiffyBill Ritcher
Add guiffy as difftool and mergetool guiffy is available on Windows, Linux, and MacOS Signed-off-by: Bill Ritcher <Bill_Ritcher@guiffy.com> Reviewed-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-04-05git-svn: allow empty email-address using authors-prog and authors-fileAndreas Heiduk
The email address in --authors-file and --authors-prog can be empty but git-svn translated it into a fictional email address in the form jondoe <jondoe@6aafaa21e0fb4338a68ab372a049893d> containing the SVN repository UUID. Now git-svn behaves like git-commit: If the email is *explicitly* set to the empty string using '<>', the commit does not contain an email address, only the name: jondoe <> Allowing to remove the email address *intentionally* prevents automatic systems from sending emails to those fictional addresses and avoids cluttering the log output with unnecessary stuff. Signed-off-by: Andreas Heiduk <asheiduk@gmail.com> Signed-off-by: Eric Wong <e@80x24.org>
2018-04-05commit: allow partial commits with relative pathsBrandon Williams
Commit 8894d53580 (commit: allow partial commits with relative paths, 2011-07-30) ensured that partial commits were allowed when a user supplies a relative pathspec but then this was regressed in 5879f5684c (remove prefix argument from pathspec_prefix, 2011-09-04) when the prefix argument to 'pathspec_prefix' removed and the 'list_paths' function wasn't properly adjusted to cope with the change, resulting in over-eager pruning of the tree that is overlayed on the index. This fixes the regression and adds a regression test so this can be prevented in the future. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-04-05t5561: skip tests if curl is not availableJeff King
It's possible to have libcurl installed but not the curl command-line utility. The latter is not generally needed for Git's http support, but we use it in t5561 for basic tests of http-backend's functionality. Let's detect when it's missing and skip this test. Note that we can't mark the individual tests with the CURL prerequisite. They're in a shared t556x_common that uses the GET and POST functions as a level of indirection, and it's only our implementations of those functions in t5561 that requires curl. It's not a problem, though, as literally every test in the script would depend on the prerequisite anyway. Reported-by: Jens Krüger <Jens.Krueger@frm2.tum.de> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-04-05t5561: drop curl stderr redirectsJeff King
For a normal test run, stderr is already redirected to /dev/null by the test suite. When used with "-v", suppressing stderr is actively harmful, as it may hide the reason for curl failing. Reported-by: Jens Krüger <Jens.Krueger@frm2.tum.de> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-04-05t2028: tighten grep expression to make "move worktree" test more robustEric Sunshine
Following a rename of worktree "source" to "destination", the "move worktree" test uses grep to verify that the output of "git worktree list --porcelain" does not contain "source" (and does contain "destination"). Unfortunately, the grep expression is too loose and can match unexpectedly. For example, if component of the test trash directory path matches "source" (e.g. "/home/me/sources/git/t/trash*"), then the test will be fooled into thinking that "source" still exists. Tighten the expression to avoid such accidental matches. While at it, drop an unused variable ("toplevel") from the test and tighten a similarly too-loose expression in a related test. Reported-by: Jens Krüger <Jens.Krueger@frm2.tum.de> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>