summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2014-07-08t0025: rename the test filesLibravatar Torsten Bögershausen1-61/+61
The current test files are named one, two and three. Make it clearer what the tests do and rename them into LFonly, CRLFonly and LFwithNUL. After the renaming we can see easier that we may want more test cases for 2 types of files: - files which have mixed LF and CRLF line endings, - files which have mixed LF and CR line endings. See commit fd6cce9e, "Add per-repository eol normalization" and "the new safer autocrlf handling" in convert.c Signed-off-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-25Merge branch 'ep/avoid-test-a-o'Libravatar Junio C Hamano8-18/+18
Update tests and scripts to avoid "test ... -a ...", which is often more error-prone than "test ... && test ...". Squashed misconversion fix-up into git-submodule.sh updates. * ep/avoid-test-a-o: git-submodule.sh: avoid "echo" path-like values git-submodule.sh: avoid "test <cond> -a/-o <cond>" t/test-lib-functions.sh: avoid "test <cond> -a/-o <cond>" t/t9814-git-p4-rename.sh: avoid "test <cond> -a/-o <cond>" t/t5538-push-shallow.sh: avoid "test <cond> -a/-o <cond>" t/t5403-post-checkout-hook.sh: avoid "test <cond> -a/-o <cond>" t/t5000-tar-tree.sh: avoid "test <cond> -a/-o <cond>" t/t4102-apply-rename.sh: avoid "test <cond> -a/-o <cond>" t/t0026-eol-config.sh: avoid "test <cond> -a/-o <cond>" t/t0025-crlf-auto.sh: avoid "test <cond> -a/-o <cond>" t/lib-httpd.sh: avoid "test <cond> -a/-o <cond>" git-rebase--interactive.sh: avoid "test <cond> -a/-o <cond>" git-mergetool.sh: avoid "test <cond> -a/-o <cond>" git-bisect.sh: avoid "test <cond> -a/-o <cond>" contrib/examples/git-resolve.sh: avoid "test <cond> -a/-o <cond>" contrib/examples/git-repack.sh: avoid "test <cond> -a/-o <cond>" contrib/examples/git-merge.sh: avoid "test <cond> -a/-o <cond>" contrib/examples/git-commit.sh: avoid "test <cond> -a/-o <cond>" contrib/examples/git-clone.sh: avoid "test <cond> -a/-o <cond>" check_bindir: avoid "test <cond> -a/-o <cond>"
2014-06-25Merge branch 'pb/trim-trailing-spaces'Libravatar Junio C Hamano1-6/+8
* pb/trim-trailing-spaces: t0008: do not depend on 'echo' handling backslashes specially
2014-06-25Merge branch 'sp/complete-ext-alias'Libravatar Junio C Hamano1-0/+27
* sp/complete-ext-alias: completion: handle '!f() { ... }; f' and "!sh -c '...' -" aliases
2014-06-25Merge branch 'jk/repack-pack-writebitmaps-config'Libravatar Junio C Hamano3-3/+6
* jk/repack-pack-writebitmaps-config: t7700: drop explicit --no-pack-kept-objects from .keep test repack: introduce repack.writeBitmaps config option repack: simplify handling of --write-bitmap-index pack-objects: stop respecting pack.writebitmaps
2014-06-25Merge branch 'nd/init-restore-env'Libravatar Junio C Hamano1-2/+2
Some subcommands do not want to be aliased because of the side effects that happens while the definitions of the aliases are looked up from configuration system. * nd/init-restore-env: git potty: restore environments after alias expansion
2014-06-25Merge branch 'jk/repack-pack-keep-objects'Libravatar Junio C Hamano1-2/+18
Recent updates to "git repack" started to duplicate objects that are in packfiles marked with .keep flag into the new packfile by mistake. * jk/repack-pack-keep-objects: repack: s/write_bitmap/&s/ in code repack: respect pack.writebitmaps repack: do not accidentally pack kept objects by default
2014-06-20Merge branch 'jc/test-lazy-prereq' (early part)Libravatar Junio C Hamano5-78/+85
* 'jc/test-lazy-prereq' (early part): t3419: drop unnecessary NOT_EXPENSIVE pseudo-prerequisite t3302: drop unnecessary NOT_EXPENSIVE pseudo-prerequisite t3302: do not chdir around in the primary test process t3302: coding style updates test: turn USR_BIN_TIME into a lazy prerequisite test: turn EXPENSIVE into a lazy prerequisite
2014-06-20Merge branch 'jc/fetch-pull-refmap'Libravatar Junio C Hamano1-0/+37
* jc/fetch-pull-refmap: docs: Explain the purpose of fetch's and pull's <refspec> parameter. fetch: allow explicit --refmap to override configuration fetch doc: add a section on configured remote-tracking branches fetch doc: remove "short-cut" section fetch doc: update refspec format description fetch doc: on pulling multiple refspecs fetch doc: remove notes on outdated "mixed layout" fetch doc: update note on '+' in front of the refspec fetch doc: move FETCH_HEAD material lower and add an example fetch doc: update introductory part for clarity
2014-06-20Merge branch 'mt/send-email-cover-to-cc'Libravatar Junio C Hamano1-0/+45
* mt/send-email-cover-to-cc: t9001: avoid non-portable '\n' with sed test/send-email: to-cover, cc-cover tests git-send-email: two new options: to-cover, cc-cover
2014-06-20Merge branch 'tb/t5551-clone-notice-to-stderr'Libravatar Junio C Hamano1-2/+1
* tb/t5551-clone-notice-to-stderr: t5551: fix the 50,000 tag test
2014-06-16Merge branch 'ib/test-selectively-run'Libravatar Junio C Hamano3-12/+617
Allow specifying only certain individual test pieces to be run using a range notation (e.g. "t1234-test.sh --run='1-4 6 8 9-'"). * ib/test-selectively-run: t0000-*.sh: fix the GIT_SKIP_TESTS sub-tests test-lib: '--run' to run only specific tests test-lib: tests skipped by GIT_SKIP_TESTS say so test-lib: document short options in t/README
2014-06-16Merge branch 'jm/dedup-test-config'Libravatar Junio C Hamano1-5/+0
* jm/dedup-test-config: t/t7810-grep.sh: remove duplicate test_config()
2014-06-16Merge branch 'dt/refs-check-refname-component-optim'Libravatar Junio C Hamano1-1/+5
* dt/refs-check-refname-component-optim: refs.c: optimize check_refname_component()
2014-06-16Merge branch 'sk/test-cmp-bin'Libravatar Junio C Hamano5-22/+28
* sk/test-cmp-bin: t5000, t5003: do not use test_cmp to compare binary files
2014-06-16Merge branch 'rs/read-ref-at'Libravatar Junio C Hamano1-2/+2
* rs/read-ref-at: refs.c: change read_ref_at to use the reflog iterators
2014-06-16Merge branch 'jm/format-patch-mail-sig'Libravatar Junio C Hamano1-0/+61
* jm/format-patch-mail-sig: format-patch: add "--signature-file=<file>" option format-patch: make newline after signature conditional
2014-06-16Merge branch 'jk/http-errors'Libravatar Junio C Hamano6-2/+58
Propagate the error messages from the webserver better to the client coming over the HTTP transport. * jk/http-errors: http: default text charset to iso-8859-1 remote-curl: reencode http error messages strbuf: add strbuf_reencode helper http: optionally extract charset parameter from content-type http: extract type/subtype portion of content-type t5550: test display of remote http error messages t/lib-httpd: use write_script to copy CGI scripts test-lib: preserve GIT_CURL_VERBOSE from the environment
2014-06-16Merge branch 'fc/remote-helper-refmap'Libravatar Junio C Hamano3-1/+53
Allow remote-helper/fast-import based transport to rename the refs while transferring the history. * fc/remote-helper-refmap: transport-helper: remove unnecessary strbuf resets transport-helper: add support to delete branches fast-export: add support to delete refs fast-import: add support to delete refs transport-helper: add support to push symbolic refs transport-helper: add support for old:new refspec fast-export: add new --refspec option fast-export: improve argument parsing
2014-06-16Merge branch 'jm/t9138-style-fix'Libravatar Junio C Hamano1-18/+17
* jm/t9138-style-fix: t9138-git-svn-authors-prog.sh fixups
2014-06-16Merge branch 'jl/status-added-submodule-is-never-ignored'Libravatar Junio C Hamano1-2/+72
submodule.*.ignore and diff.ignoresubmodules are used to ignore all submodule changes in "diff" output, but it can be confusing to apply these configuration values to status and commit. This is a backward-incompatible change, but should be so in a good way (aka bugfix). * jl/status-added-submodule-is-never-ignored: commit -m: commit staged submodules regardless of ignore config status/commit: show staged submodules regardless of ignore config
2014-06-16Merge branch 'as/pretty-truncate'Libravatar Junio C Hamano4-71/+276
* as/pretty-truncate: pretty.c: format string with truncate respects logOutputEncoding t4205, t6006: add tests that fail with i18n.logOutputEncoding set t4205 (log-pretty-format): use `tformat` rather than `format` t4041, t4205, t6006, t7102: don't hardcode tested encoding value t4205 (log-pretty-formats): don't hardcode SHA-1 in expected outputs
2014-06-16Merge branch 'rr/rebase-autostash-fix'Libravatar Junio C Hamano1-0/+15
* rr/rebase-autostash-fix: rebase -i: test "Nothing to do" case with autostash rebase -i: handle "Nothing to do" case with autostash
2014-06-16Merge branch 'jk/diff-files-assume-unchanged'Libravatar Junio C Hamano1-0/+11
* jk/diff-files-assume-unchanged: run_diff_files: do not look at uninitialized stat data
2014-06-16Merge branch 'jk/do-not-run-httpd-tests-as-root'Libravatar Junio C Hamano1-0/+5
* jk/do-not-run-httpd-tests-as-root: t/lib-httpd: require SANITY prereq
2014-06-16Merge branch 'cc/replace-edit'Libravatar Junio C Hamano1-0/+27
"git replace" learns a new "--edit" option. * cc/replace-edit: Documentation: replace: describe new --edit option replace: add --edit to usage string replace: add tests for --edit replace: die early if replace ref already exists replace: refactor checking ref validity replace: make sure --edit results in a different object replace: add --edit option replace: factor object resolution out of replace_object replace: use OPT_CMDMODE to handle modes replace: refactor command-mode determination
2014-06-16Merge branch 'mt/patch-id-stable' (early part)Libravatar Junio C Hamano3-11/+117
* 'mt/patch-id-stable' (early part): patch-id-test: test stable and unstable behaviour patch-id: make it stable against hunk reordering test doc: test_write_lines does not split its arguments test: add test_write_lines helper
2014-06-13completion: handle '!f() { ... }; f' and "!sh -c '...' -" aliasesLibravatar Steffen Prohaska1-0/+27
'!f() { ... }; f' and "!sh -c '....' -" are recommended patterns for declaring more complex aliases (see git wiki [1]). This commit teaches the completion to handle them. When determining which completion to use for an alias, an opening brace or single quote is now skipped, and the search for a git command is continued. For example, the aliases '!f() { git commit ... }' or "!sh -c 'git commit ...'" now trigger commit completion. Previously, the search stopped on the opening brace or quote, and the completion tried it to determine how to complete, which obviously was useless. The null command ':' is now skipped, so that it can be used as a workaround to declare the desired completion style. For example, the aliases !f() { : git commit ; if ... } f !sh -c ': git commit; if ...' - now trigger commit completion. Shell function declarations now work with or without space before the parens, i.e. '!f() ...' and '!f () ...' both work. [1] https://git.wiki.kernel.org/index.php/Aliases Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-13t0008: do not depend on 'echo' handling backslashes speciallyLibravatar Junio C Hamano1-6/+8
The original used to pass with /bin/dash but not with /bin/bash set to $SHELL_PATH. The former turns "\\" into "\", but the latter does not. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-12t7700: drop explicit --no-pack-kept-objects from .keep testLibravatar Jeff King1-1/+1
We want to make sure that the default behavior of git-repack, without any options, continues to treat .keep files as it always has. Adding an explicit --no-pack-kept-objects, as ee34a2b did, is a much less interesting test, and prevented us from noticing the bug fixed by 64d3dc9 (repack: do not accidentally pack kept objects by default, 2014-06-10). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-10repack: introduce repack.writeBitmaps config optionLibravatar Jeff King3-2/+5
We currently have pack.writeBitmaps, which originally operated at the pack-objects level. This should really have been a repack.* option from day one. Let's give it the more sensible name, but keep the old version as a deprecated synonym. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-10repack: respect pack.writebitmapsLibravatar Jeff King1-1/+17
The config option to turn on bitmaps is read all the way down in the plumbing of pack-objects. This makes it hard for other options in the porcelain of repack to make decisions based on the bitmap setting. For example, repack.packKeptObjects tries to kick in by default only when bitmaps are turned on. But it can't do so reliably because it doesn't yet know whether we are using bitmaps. This patch teaches repack to respect pack.writebitmaps. It means we pass a redundant command-line flag to pack-objects, but that's OK; it shouldn't affect the outcome. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-10repack: do not accidentally pack kept objects by defaultLibravatar Jeff King1-1/+1
Commit ee34a2b (repack: add `repack.packKeptObjects` config var, 2014-03-03) added a flag which could duplicate kept objects, but did not mean to turn it on by default. Instead, the option is tied by default to the decision to write bitmaps, like: if (pack_kept_objects < 0) pack_kept_objects = write_bitmap; after which we expect pack_kept_objects to be a boolean 0 or 1. However, that assignment neglects that write_bitmap is _also_ a tri-state with "-1" as the default, and with neither option given, we accidentally turn the option on. This patch is the minimal fix to restore the desired behavior for the default state. Further patches will fix the more complicated cases. Note the update to t7700. It failed to turn on bitmaps, meaning we were actually confirming the wrong behavior! Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-10patch-id-test: test stable and unstable behaviourLibravatar Michael S. Tsirkin1-11/+91
Verify that patch ID supports an algorithm that is stable against diff split and reordering. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-10test doc: test_write_lines does not split its argumentsLibravatar Jonathan Nieder1-4/+3
test_write_lines carefully quotes its arguments as "$@", so test_write_lines "a b" c writes two lines as requested, not three. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-10test: add test_write_lines helperLibravatar Michael S. Tsirkin2-0/+27
API and implementation as suggested by Junio. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-10git potty: restore environments after alias expansionLibravatar Nguyễn Thái Ngọc Duy1-2/+2
Commit 4ad8332 (t0001: test git init when run via an alias - 2010-11-26) noted breakages when running init via alias. The problem is for alias to be used, $GIT_DIR must be searched, but 'init' and 'clone' are not happy with that. So we start a new process like an external command, with clean environment in this case. Env variables that are set by command line (e.g. "git --git-dir=.. ") are kept. This should also fix autocorrecting a command typo to "init" because it's the same problem: aliases are read, then "init" is unhappy with $GIT_DIR already set up because of that. Reminded-by: David Turner <dturner@twopensource.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-10t9001: avoid non-portable '\n' with sedLibravatar Torsten Bögershausen1-1/+1
t9001 used a '\n' in a sed expression to split one line into two lines, but the usage of '\n' in the "replacement string" is not portable. The '\n' can be used to match a newline in the "pattern space", but otherwise the meaning of '\n' is unspecified in POSIX. - Gnu versions of sed will treat '\n' as a newline character. - Other versions of sed (like /usr/bin/sed under Mac OS X) simply ignore the '\' before the 'n', treating '\n' as 'n'. For reference see: pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html http://www.gnu.org/software/sed/manual/sed.html As the test already requires perl as a prerequisite, use perl instead of sed. Signed-off-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-09t/test-lib-functions.sh: avoid "test <cond> -a/-o <cond>"Libravatar Elia Pinto1-2/+2
The construct is error-prone; "test" being built-in in most modern shells, the reason to avoid "test <cond> && test <cond>" spawning one extra process by using a single "test <cond> -a <cond>" no longer exists. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-09t/t9814-git-p4-rename.sh: avoid "test <cond> -a/-o <cond>"Libravatar Elia Pinto1-2/+2
The construct is error-prone; "test" being built-in in most modern shells, the reason to avoid "test <cond> && test <cond>" spawning one extra process by using a single "test <cond> -a <cond>" no longer exists. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-09t/t5538-push-shallow.sh: avoid "test <cond> -a/-o <cond>"Libravatar Elia Pinto1-1/+1
The construct is error-prone; "test" being built-in in most modern shells, the reason to avoid "test <cond> && test <cond>" spawning one extra process by using a single "test <cond> -a <cond>" no longer exists. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-09t/t5403-post-checkout-hook.sh: avoid "test <cond> -a/-o <cond>"Libravatar Elia Pinto1-4/+4
The construct is error-prone; "test" being built-in in most modern shells, the reason to avoid "test <cond> && test <cond>" spawning one extra process by using a single "test <cond> -a <cond>" no longer exists. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-09t/t5000-tar-tree.sh: avoid "test <cond> -a/-o <cond>"Libravatar Elia Pinto1-1/+1
The construct is error-prone; "test" being built-in in most modern shells, the reason to avoid "test <cond> && test <cond>" spawning one extra process by using a single "test <cond> -a <cond>" no longer exists. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-09t/t4102-apply-rename.sh: avoid "test <cond> -a/-o <cond>"Libravatar Elia Pinto1-1/+1
The construct is error-prone; "test" being built-in in most modern shells, the reason to avoid "test <cond> && test <cond>" spawning one extra process by using a single "test <cond> -a <cond>" no longer exists. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-09t/t0026-eol-config.sh: avoid "test <cond> -a/-o <cond>"Libravatar Elia Pinto1-4/+4
The construct is error-prone; "test" being built-in in most modern shells, the reason to avoid "test <cond> && test <cond>" spawning one extra process by using a single "test <cond> -a <cond>" no longer exists. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-09t/t0025-crlf-auto.sh: avoid "test <cond> -a/-o <cond>"Libravatar Elia Pinto1-3/+3
The construct is error-prone; "test" being built-in in most modern shells, the reason to avoid "test <cond> && test <cond>" spawning one extra process by using a single "test <cond> -a <cond>" no longer exists. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-09t/lib-httpd.sh: avoid "test <cond> -a/-o <cond>"Libravatar Elia Pinto1-1/+1
The construct is error-prone; "test" being built-in in most modern shells, the reason to avoid "test <cond> && test <cond>" spawning one extra process by using a single "test <cond> -a <cond>" no longer exists. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-09t3419: drop unnecessary NOT_EXPENSIVE pseudo-prerequisiteLibravatar Junio C Hamano1-14/+8
This was only necessary because do_tests helper the script defines took its parameters in a wrong order. Just pass an empty string (or not passing the optional EXPENSIVE prerequisite) when running the test with a light-weight set of parameters and have the shell do the right thing when parsing test_expect_success helper. Also update coding style while we are at it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-09t3302: drop unnecessary NOT_EXPENSIVE pseudo-prerequisiteLibravatar Junio C Hamano1-6/+4
This was only necessary because do_tests helper the script defines took its parameters in a wrong order. Just pass an empty string (or not passing the optional EXPENSIVE prerequisite) when running the test with a light-weight set of parameters and have the shell do the right thing when parsing test_expect_success helper. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-09t3302: do not chdir around in the primary test processLibravatar Junio C Hamano1-9/+18
These days^Wyears we strive to do stuff in subdirectories inside subshells to avoid mistakes. Signed-off-by: Junio C Hamano <gitster@pobox.com>