summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2010-02-21Merge branch 'sp/push-sideband'Libravatar Junio C Hamano1-42/+42
* sp/push-sideband: receive-pack: Send internal errors over side-band #2 t5401: Use a bare repository for the remote peer receive-pack: Send hook output over side band #2 receive-pack: Wrap status reports inside side-band-64k receive-pack: Refactor how capabilities are shown to the client send-pack: demultiplex a sideband stream with status data run-command: support custom fd-set in async run-command: Allow stderr to be a caller supplied pipe
2010-02-21Merge branch 'jc/checkout-detached'Libravatar Junio C Hamano1-10/+22
* jc/checkout-detached: Reword "detached HEAD" notification
2010-02-21Merge branch 'jc/maint-fix-test-perm'Libravatar Junio C Hamano2-0/+4
* jc/maint-fix-test-perm: lib-patch-mode.sh: Fix permission t6000lib: Fix permission
2010-02-20Merge branch 'maint'Libravatar Junio C Hamano1-8/+8
* maint: git-p4: fix bug in symlink handling t1450: fix testcases that were wrongly expecting failure Documentation: Fix indentation problem in git-commit(1)
2010-02-19t1450: fix testcases that were wrongly expecting failureLibravatar Thomas Rast1-8/+8
Almost exactly a year ago in 02a6552 (Test fsck a bit harder), I introduced two testcases that were expecting failure. However, the only bug was that the testcases wrote *blobs* because I forgot to pass -t tag to hash-object. Fix this, and then adjust the rest of the test to properly check the result. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-19Merge branch 'maint'Libravatar Junio C Hamano1-0/+8
* maint: rm: fix bug in recursive subdirectory removal Documentation: describe --thin more accurately
2010-02-19Merge branch 'jk/maint-rmdir-fix' into maintLibravatar Junio C Hamano1-0/+8
* jk/maint-rmdir-fix: rm: fix bug in recursive subdirectory removal
2010-02-18rm: fix bug in recursive subdirectory removalLibravatar Jeff King1-0/+8
If we remove a path in a/deep/subdirectory, we should try to remove as many trailing components as possible (i.e., subdirectory, then deep, then a). However, the test for the return value of rmdir was reversed, so we only ever deleted at most one level. The fix is in remove_path, so "apply" and "merge-recursive" also are fixed. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-17Merge branch 'jk/grep-double-dash' into maintLibravatar Junio C Hamano1-0/+33
* jk/grep-double-dash: accept "git grep -- pattern"
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-10Merge branch 'sp/maint-push-sideband' into sp/push-sidebandLibravatar Junio C Hamano1-31/+31
* sp/maint-push-sideband: receive-pack: Send internal errors over side-band #2 t5401: Use a bare repository for the remote peer Conflicts: builtin-receive-pack.c t/t5401-update-hooks.sh
2010-02-10receive-pack: Send internal errors over side-band #2Libravatar Shawn O. Pearce1-1/+2
If the client has requested side-band-64k capability, send any of the internal error or warning messages in the muxed side-band stream using the same band as our hook output, band #2. By putting everything in one stream we ensure all messages are processed by the side-band demuxer, avoiding interleaving between our own stderr and the side-band demuxer's stderr buffers. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-09t5401: Use a bare repository for the remote peerLibravatar Shawn O. Pearce1-29/+29
We want to avoid the warnings (or later, test failures) about updating the current branch. It was never my intention to have this test deal with a repository with a working directory, and it is a very old bug that the test even used a non-bare repository for the remote side of the push operations. This fixes the interleaved output error we were seeing as a test failure by avoiding the giant warning message we were getting back about updating the current branch being risky. Its not a real fix, but is something we should do no matter what, because the behavior will change in the future to reject, and the test would break at that time. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 'sp/maint-push-sideband' into sp/push-sidebandLibravatar Junio C Hamano1-11/+11
* sp/maint-push-sideband: receive-pack: Send hook output over side band #2 receive-pack: Wrap status reports inside side-band-64k receive-pack: Refactor how capabilities are shown to the client send-pack: demultiplex a sideband stream with status data run-command: support custom fd-set in async run-command: Allow stderr to be a caller supplied pipe Update git fsck --full short description to mention packs Conflicts: run-command.c
2010-02-05receive-pack: Send hook output over side band #2Libravatar Shawn O. Pearce1-11/+11
If the client requests to enable side-band-64k capability we can safely send any hook stdout or stderr data down side band #2, so the client can present it to the user. If side-band-64k isn't enabled, hooks continue to inherit stderr from the parent receive-pack process. When the side band channel is being used the push client will wind up prefixing all server messages with "remote: ", just like fetch does, so our test vector has to be updated with the new expected output. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> 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-30lib-patch-mode.sh: Fix permissionLibravatar Junio C Hamano1-0/+2
In the same sprit as 4848509 (Fix permissions on test scripts, 2007-04-13), t/lib-patch-mode.sh should not be executable. Signed-off-by: Junio C Hamano <gitster@pobox.com>