summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2010-02-16Merge branch 'maint'Libravatar Junio C Hamano1-0/+9
* maint: Prepare 1.7.0.1 release notes Fix use of mutex in threaded grep dwim_ref: fix dangling symref warning stash pop: remove 'apply' options during 'drop' invocation diff: make sure --output=/bad/path is caught Remove hyphen from "git-command" in two error messages
2010-02-16Merge branch 'maint-1.6.6' into maintLibravatar Junio C Hamano1-0/+9
* maint-1.6.6: dwim_ref: fix dangling symref warning stash pop: remove 'apply' options during 'drop' invocation diff: make sure --output=/bad/path is caught Remove hyphen from "git-command" in two error messages
2010-02-16Merge branch 'maint-1.6.5' into maint-1.6.6Libravatar Junio C Hamano1-0/+9
* maint-1.6.5: dwim_ref: fix dangling symref warning stash pop: remove 'apply' options during 'drop' invocation diff: make sure --output=/bad/path is caught
2010-02-15stash pop: remove 'apply' options during 'drop' invocationLibravatar Thomas Rast1-0/+9
The 'git stash pop' option parsing used to remove the first argument in --index mode. At the time this was implemented, this first argument was always --index. However, since the invention of the -q option in fcdd0e9 (stash: teach quiet option, 2009-06-17) you can cause an internal invocation of git stash drop --index by running git stash pop -q --index which then of course fails because drop doesn't know --index. To handle this, instead let 'git stash apply' decide what the future argument to 'drop' should be. Warning: this means that 'git stash apply' must parse all options that 'drop' can take, and deal with them in the same way. This is currently true for its only option -q. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-13Merge branch 'rs/git-dir-cleanup'Libravatar Junio C Hamano1-0/+52
* rs/git-dir-cleanup: Resurrect "git grep --no-index" setenv(GIT_DIR) clean-up Conflicts: builtin-grep.c t/t7002-grep.sh
2010-02-13Merge branch 'jk/grep-double-dash'Libravatar Junio C Hamano1-0/+33
* jk/grep-double-dash: accept "git grep -- pattern"
2010-02-13Resurrect "git grep --no-index"Libravatar Junio C Hamano1-0/+52
This reverts commit 3c8f6c8 (Revert 30816237 and 7e62265, 2010-02-05) as the issue has been sorted out.
2010-02-10Sync with 1.6.6.2Libravatar Junio C Hamano1-2/+4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-10Merge branch 'maint-1.6.5' into maintLibravatar Junio C Hamano1-2/+4
* maint-1.6.5: t8003: check exit code of command and error message separately
2010-02-10t8003: check exit code of command and error message separatelyLibravatar Junio C Hamano1-2/+4
Shell reports exit status only from the most downstream command in a pipeline. In these tests, we want to make sure that the command fails in a controlled way, and produces a correct error message. This issue was known by Jay who submitted the patch, and also was pointed out by Hannes during the review process, but I forgot to fix it up before applying. Sorry about that. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-10Merge branch 'sp/maint-fast-import-large-blob' into maintLibravatar Junio C Hamano2-1/+47
* sp/maint-fast-import-large-blob: fast-import: Stream very large blobs directly to pack
2010-02-10Merge branch 'jc/maint-reflog-bad-timestamp' into maintLibravatar Junio C Hamano1-0/+45
* jc/maint-reflog-bad-timestamp: t0101: use a fixed timestamp when searching in the reflog Update @{bogus.timestamp} fix not to die() approxidate_careful() reports errorneous date string
2010-02-10Merge branch 'jh/maint-config-file-prefix' into maintLibravatar Junio C Hamano1-0/+11
* jh/maint-config-file-prefix: builtin-config: Fix crash when using "-f <relative path>" from non-root dir
2010-02-10Merge branch 'jc/maint-1.6.1-checkout-m-custom-merge' into maintLibravatar Junio C Hamano1-0/+57
* jc/maint-1.6.1-checkout-m-custom-merge: checkout -m path: fix recreating conflicts Conflicts: t/t7201-co.sh
2010-02-08t3902: Protect against OS X normalizationLibravatar Brian Gernhardt1-4/+4
8424981: "Fix invalid read in quote_c_style_counted" introduced a test that used "caractère spécial" as a directory name. Git creates it as "caract\303\250re sp\303\251cial" OS X stores it as "caracte\314\200re spe\314\201cial" To work around this problem, use the already introduced $FN as the directory name. Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-08Merge branch 'maint'Libravatar Junio C Hamano1-0/+8
* maint: blame: prevent a segv when -L given start > EOF git-push: document all the status flags used in the output Fix parsing of imap.preformattedHTML and imap.sslverify git-add documentation: Fix shell quoting example
2010-02-08Merge branch 'maint-1.6.5' into maintLibravatar Junio C Hamano1-0/+8
* maint-1.6.5: blame: prevent a segv when -L given start > EOF
2010-02-08blame: prevent a segv when -L given start > EOFLibravatar Jay Soffian1-0/+8
blame would segv if given -L <lineno> with <lineno> past the end of the file. While we're fixing the bug, add test cases for an invalid <start> when called as -L <start>,<end> or -L<start>. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-08Revert "pack-objects: fix pack generation when using pack_size_limit"Libravatar Nicolas Pitre1-1/+1
This reverts most of commit a2430dde8ceaaaabf05937438249397b883ca77a. That commit made the situation better for repositories with relatively small number of objects. However with many objects and a small pack size limit, the time required to complete the repack tends towards O(n^2), or even much worse with long delta chains. Signed-off-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-07accept "git grep -- pattern"Libravatar Jeff King1-0/+33
Currently the only way to "quote" a grep pattern that might begin with a dash is to use "git grep -e pattern". This works just fine, and is also the way right way to do it on many traditional grep implemenations. Some people prefer to use "git grep -- pattern", however, as "--" is the usual "end of options" marker, and at least GNU grep and Solaris 10 grep support this. This patch makes that syntax work. There is a slight behavior change, in that "git grep -- $X" used to be interpreted as "grep for -- in $X". However, that usage is questionable. "--" is usually the end-of-options marker, so "git grep" was unlike many other greps in treating it as a literal pattern (e.g., both GNU grep and Solaris 10 grep will treat "grep --" as missing a pattern). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-07Merge branch 'maint'Libravatar Junio C Hamano1-0/+10
* maint: archive: simplify archive format guessing
2010-02-07archive: simplify archive format guessingLibravatar René Scharfe1-0/+10
The code to guess an output archive's format consumed any --format options and built a new one. Jonathan noticed that it does so in an unsafe way, risking to overflow the static buffer fmt_opt. Change the code to keep the existing --format options intact and to only add a new one if a format could be guessed based on the output file name. The new option is added as the first one, allowing the existing ones to overrule it, i.e. explicit --format options given on the command line win over format guesses, as before. To simplify the code further, format_from_name() is changed to return the full --format option, thus no potentially dangerous sprintf() calls are needed any more. Reported-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-06Fix invalid read in quote_c_style_countedLibravatar Jeff King1-1/+18
This function did not work on strings that were not NUL-terminated. It reads through a length-bounded string, searching for characters in need of quoting. After we find one, we output the quoted character, then advance our pointer to find the next one. However, we never decremented the length, meaning we ended up looking at whatever random junk was stored after the string. This bug was not found by the existing tests because most code paths feed a NUL-terminated string. The notable exception is a directory name being fed by ls-tree. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-06t9501: Re-fix max load testLibravatar Brian Gernhardt1-9/+2
Revert the previous attempt to skip this test on platforms where we currently cannot determine the system load. We want to make sure that the max-load-limit codepath produces results cleanly, when gitweb is updated and becomes capable of reading the load average by some other method. The code to check for load returns 0 if it doesn't know how to find load. It also checks to see if the current load is higher than the max load. So to force the script to quit early by setting the maxload variable negative which should work for systems where we can detect load (which should be a positive number) and systems where we can't (where detected load is 0) Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-05t9501: Skip testing load if we can't detect itLibravatar Brian Gernhardt1-1/+8
Currently gitweb only knows how to check for load using /proc/loadavg, which isn't available on all systems. We shouldn't fail the test just because we don't know how to check the system load. Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-05Merge branch 'jc/maint-limit-note-output' into maintLibravatar Junio C Hamano1-0/+59
* jc/maint-limit-note-output: Fix "log --oneline" not to show notes Fix "log" family not to be too agressive about showing notes
2010-02-05Revert 30816237 and 7e62265Libravatar Junio C Hamano1-52/+0
It seems that we have bad interaction with the code related to GIT_WORK_TREE and "grep --no-index", and broke running grep inside the .git directory. For now, just revert it and resurrect it after 1.7.0 ships. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-03make --max-pack-size argument to 'git pack-object' count in bytesLibravatar Nicolas Pitre1-6/+8
The value passed to --max-pack-size used to count in MiB which was inconsistent with the corresponding configuration variable as well as other command arguments which are defined to count in bytes with an optional unit suffix. This brings --max-pack-size in line with the rest of Git. Also, in order not to cause havoc with people used to the previous megabyte scale, and because this is a sane thing to do anyway, a minimum size of 1 MiB is enforced to avoid an explosion of pack files. Adjust and extend test suite accordingly. Signed-off-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-03fix multiple issues with t5300Libravatar Nicolas Pitre1-20/+34
First of all, trying to run 'git verify-pack' on packs produced by the tests using pack.packSizeLimit always failed. After lots of digging and head scratching, it turns out that the preceeding test simulating a SHA1 collision did leave the repository quite confused, impacting subsequent tests. So let's move that destructive test last, and add tests to run verify-pack on the output from those packSizeLimit tests to catch such goofage. Finally, group those packSizeLimit tests together. Signed-off-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-02Merge branch 'ms/filter-branch-submodule'Libravatar Junio C Hamano1-0/+39
* ms/filter-branch-submodule: filter-branch: Add tests for submodules in tree-filter filter-branch: Fix to allow replacing submodules with another content
2010-02-02Merge branch 'jh/gitweb-caching' (early part)Libravatar Junio C Hamano2-5/+26
* 'jh/gitweb-caching' (early part): gitweb: Add optional extra parameter to die_error, for extended explanation gitweb: add a "string" variant of print_sort_th gitweb: add a "string" variant of print_local_time gitweb: Check that $site_header etc. are defined before using them gitweb: Makefile improvements gitweb: Load checking gitweb: Make running t9501 test with '--debug' reliable and usable
2010-02-02Merge branch 'sp/fast-import-large-blob'Libravatar Junio C Hamano2-1/+47
* sp/fast-import-large-blob: fast-import: Stream very large blobs directly to pack
2010-02-01Merge branch 'sp/maint-fast-import-large-blob' into sp/fast-import-large-blobLibravatar Junio C Hamano2-1/+47
* sp/maint-fast-import-large-blob: fast-import: Stream very large blobs directly to pack bash: don't offer remote transport helpers as subcommands Conflicts: fast-import.c
2010-02-01fast-import: Stream very large blobs directly to packLibravatar Shawn O. Pearce2-1/+47
If a blob is larger than the configured big-file-threshold, instead of reading it into a single buffer obtained from malloc, stream it onto the end of the current pack file. Streaming the larger objects into the pack avoids the 4+ GiB memory footprint that occurs when fast-import is processing 2+ GiB blobs. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-01Merge branch 'sb/maint-octopus' into maint-1.6.5Libravatar Junio C Hamano1-0/+51
* sb/maint-octopus: octopus: remove dead code octopus: reenable fast-forward merges octopus: make merge process simpler to follow
2010-01-30gitweb: Load checkingLibravatar John 'Warthog9' Hawley2-0/+23
This changes slightly the behavior of gitweb, so that it verifies that the box isn't inundated with before attempting to serve gitweb. If the box is overloaded, it basically returns a 503 Server Unavailable until the load falls below the defined threshold. This helps dramatically if you have a box that's I/O bound, reaches a certain load and you don't want gitweb, the I/O hog that it is, increasing the pain the server is already undergoing. This behavior is controlled by $maxload configuration variable. Default is a load of 300, which for most cases should never be hit. Unset it (set it to undefined value, i.e. undef) to turn off checking. Currently it requires that '/proc/loadavg' file exists, otherwise the load check is bypassed (load is taken to be 0). So platforms that do not implement '/proc/loadavg' currently cannot use this feature (provisions are included for additional checks to be added by others). There is simple test in t/t9501-gitweb-standalone-http-status.sh to check that it correctly returns "503 Service Unavailable" if load is too high, and also if there are any Perl warnings or errors. Signed-off-by: John 'Warthog9' Hawley <warthog9@kernel.org> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-30gitweb: Make running t9501 test with '--debug' reliable and usableLibravatar Jakub Narebski1-5/+3
Remove test_debug lines after 'snapshots: tgz only default format enabled' and 'snapshots: all enabled in default, use default disabled value' tests. Those tests constitute of multiple gitweb_run invocation, therefore outputting gitweb.output for the last gitweb_run wouldn't help much in debugging test failure, and can only confuse. For snapshot tests which check for "200 OK" status, change test_debug 'cat gitweb.output' to test_debug 'cat gitweb.headers' Otherwise when running this test with '--debug' option, t/t9501-gitweb-standalone-http-status.sh would dump *binary data* (the snapshot itself) to standard output, which can mess up state of terminal due to term control characters which can be embedded in output. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-28filter-branch: Add tests for submodules in tree-filterLibravatar Michal Sojka1-0/+39
Add tests to make sure that: 1) a submodule can be removed and its content replaced with regular files ('rewrite submodule with another content'). This test passes only with the previous patch applied. 2) it is possible to replace submodule revision by direct index manipulation ('replace submodule revision'). Although it would be better to run such a filter in --index-filter, this test shows that this functionality is not broken by the previous patch. This succeeds both with and without the previous patch. Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-28grep --quiet: finishing touchesLibravatar Junio C Hamano1-0/+8
Name the option "--quiet" not "--quick", document it, and add tests. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-28reject @{-1} not at beginning of object nameLibravatar Jeff King1-1/+1
Something like foo@{-1} is nonsensical, as the @{-N} syntax is reserved for "the Nth last branch", and is not an actual reflog selector. We should not feed such nonsense to approxidate at all. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-28fix parsing of @{-1}@{u} combinationLibravatar Jeff King1-2/+2
Previously interpret_branch_name would see @{-1} and stop parsing, leaving the @{u} as cruft that provoked an error. Instead, we should recurse if there is more to parse. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-28test combinations of @{} syntaxLibravatar Jeff King1-0/+51
Now that we have several different types of @{} syntax, it is a good idea to test them together, which reveals some failures. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-28t0101: use absolute dateLibravatar Jeff King1-1/+1
The original version used relative approxidates, which don't reproduce as reliably as absolute ones. Commit 6c647a fixed this for one case, but missed the "silly" case. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-28tests: update tests that used to failLibravatar Junio C Hamano2-2/+2
"diff --cc" output t4038 tests was fixed by b810cbb (diff --cc: a lost line at the beginning of the file is shown incorrectly, 2009-07-22), which was actually the commit that introduced this test.. An error in "git merge -s resolve" t6035 tests was fixed by 730f728 (unpack-trees.c: look ahead in the index, 2009-09-20). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-27Merge branch 'jc/upstream-reflog'Libravatar Junio C Hamano1-0/+29
* jc/upstream-reflog: Fix log -g this@{upstream}
2010-01-27Merge branch 'jc/maint-reflog-bad-timestamp'Libravatar Junio C Hamano1-0/+45
* jc/maint-reflog-bad-timestamp: t0101: use a fixed timestamp when searching in the reflog Update @{bogus.timestamp} fix not to die() approxidate_careful() reports errorneous date string
2010-01-27Merge branch 'jh/maint-config-file-prefix'Libravatar Junio C Hamano1-0/+11
* jh/maint-config-file-prefix: builtin-config: Fix crash when using "-f <relative path>" from non-root dir
2010-01-27t0101: use a fixed timestamp when searching in the reflogLibravatar Junio C Hamano1-2/+2
That will give us a better reproducibility during tests. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-26Merge branch 'jl/diff-submodule-ignore'Libravatar Junio C Hamano1-0/+67
* jl/diff-submodule-ignore: Teach diff --submodule that modified submodule directory is dirty git diff: Don't test submodule dirtiness with --ignore-submodules Make ce_uptodate() trustworthy again
2010-01-26fix portability issues with $ in double quotesLibravatar Stephen Boyd9-48/+48
Using a dollar sign in double quotes isn't portable. Escape them with a backslash or replace the double quotes with single quotes. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>