aboutsummaryrefslogtreecommitdiff
path: root/t
Commit message (Collapse)AuthorAge
* Add a testcase for ACL with restrictive umask.Matthieu Moy2010-02-22
| | | | | | | | | | | | | Right now, Git creates unreadable pack files on non-shared repositories when the user has a umask of 077, even when the default ACLs for the directory would give read/write access to a specific user. Loose object files are created world-readable, which doesn't break ACLs, but isn't necessarily desirable. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Sync with 1.6.6.2Junio C Hamano2010-02-10
|\ | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Merge branch 'maint-1.6.5' into maintJunio C Hamano2010-02-10
| |\ | | | | | | | | | | | | * maint-1.6.5: t8003: check exit code of command and error message separately
| | * t8003: check exit code of command and error message separatelyJunio C Hamano2010-02-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Merge branch 'sp/maint-fast-import-large-blob' into maintJunio C Hamano2010-02-10
| |\ \ | | | | | | | | | | | | | | | | * sp/maint-fast-import-large-blob: fast-import: Stream very large blobs directly to pack
| * \ \ Merge branch 'jc/maint-reflog-bad-timestamp' into maintJunio C Hamano2010-02-10
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * \ \ \ Merge branch 'jh/maint-config-file-prefix' into maintJunio C Hamano2010-02-10
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * jh/maint-config-file-prefix: builtin-config: Fix crash when using "-f <relative path>" from non-root dir
| * \ \ \ \ Merge branch 'jc/maint-1.6.1-checkout-m-custom-merge' into maintJunio C Hamano2010-02-10
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jc/maint-1.6.1-checkout-m-custom-merge: checkout -m path: fix recreating conflicts Conflicts: t/t7201-co.sh
* | | | | | | t3902: Protect against OS X normalizationBrian Gernhardt2010-02-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | Merge branch 'maint'Junio C Hamano2010-02-08
|\ \ \ \ \ \ \ | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * | | | | | Merge branch 'maint-1.6.5' into maintJunio C Hamano2010-02-08
| |\ \ \ \ \ \ | | | |_|_|_|/ | | |/| | | | | | | | | | | | | | | | | | * maint-1.6.5: blame: prevent a segv when -L given start > EOF
| | * | | | | blame: prevent a segv when -L given start > EOFJay Soffian2010-02-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | | | | Merge branch 'sb/maint-octopus' into maint-1.6.5Junio C Hamano2010-02-01
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sb/maint-octopus: octopus: remove dead code octopus: reenable fast-forward merges octopus: make merge process simpler to follow
* | | | | | | | Revert "pack-objects: fix pack generation when using pack_size_limit"Nicolas Pitre2010-02-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | | Merge branch 'maint'Junio C Hamano2010-02-07
|\ \ \ \ \ \ \ \ | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | * maint: archive: simplify archive format guessing
| * | | | | | | archive: simplify archive format guessingRené Scharfe2010-02-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | Merge branch 'jc/maint-limit-note-output' into maintJunio C Hamano2010-02-05
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jc/maint-limit-note-output: Fix "log --oneline" not to show notes Fix "log" family not to be too agressive about showing notes
* | | | | | | | | Fix invalid read in quote_c_style_countedJeff King2010-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | | | t9501: Re-fix max load testBrian Gernhardt2010-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | | | t9501: Skip testing load if we can't detect itBrian Gernhardt2010-02-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | | | Revert 30816237 and 7e62265Junio C Hamano2010-02-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | | | make --max-pack-size argument to 'git pack-object' count in bytesNicolas Pitre2010-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | | | fix multiple issues with t5300Nicolas Pitre2010-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | | | Merge branch 'ms/filter-branch-submodule'Junio C Hamano2010-02-02
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ms/filter-branch-submodule: filter-branch: Add tests for submodules in tree-filter filter-branch: Fix to allow replacing submodules with another content
| * | | | | | | | | filter-branch: Add tests for submodules in tree-filterMichal Sojka2010-01-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | | | | Merge branch 'jh/gitweb-caching' (early part)Junio C Hamano2010-02-02
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * '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
| * | | | | | | | | | gitweb: Load checkingJohn 'Warthog9' Hawley2010-01-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | | | | gitweb: Make running t9501 test with '--debug' reliable and usableJakub Narebski2010-01-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | | | | | Merge branch 'sp/fast-import-large-blob'Junio C Hamano2010-02-02
|\ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sp/fast-import-large-blob: fast-import: Stream very large blobs directly to pack
| * | | | | | | | | | Merge branch 'sp/maint-fast-import-large-blob' into sp/fast-import-large-blobJunio C Hamano2010-02-01
| |\ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / | |/| | | | | | | | / | | | |_|_|_|_|_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| | * | | | | | | | fast-import: Stream very large blobs directly to packShawn O. Pearce2010-02-01
| | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | | | grep --quiet: finishing touchesJunio C Hamano2010-01-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Name the option "--quiet" not "--quick", document it, and add tests. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | reject @{-1} not at beginning of object nameJeff King2010-01-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | | | fix parsing of @{-1}@{u} combinationJeff King2010-01-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | | | test combinations of @{} syntaxJeff King2010-01-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | | | t0101: use absolute dateJeff King2010-01-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | | | tests: update tests that used to failJunio C Hamano2010-01-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "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>
* | | | | | | | | Merge branch 'jc/upstream-reflog'Junio C Hamano2010-01-27
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jc/upstream-reflog: Fix log -g this@{upstream}
| * | | | | | | | | Fix log -g this@{upstream}Junio C Hamano2010-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It showed the correct objects but walked a wrong reflog. Again, tests are from Jeff King. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | Merge branch 'jc/maint-reflog-bad-timestamp'Junio C Hamano2010-01-27
|\ \ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * | | | | | | | | t0101: use a fixed timestamp when searching in the reflogJunio C Hamano2010-01-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That will give us a better reproducibility during tests. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | approxidate_careful() reports errorneous date stringJunio C Hamano2010-01-26
| | |_|_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For a long time, the time based reflog syntax (e.g. master@{yesterday}) didn't complain when the "human readable" timestamp was misspelled, as the underlying mechanism tried to be as lenient as possible. The funny thing was that parsing of "@{now}" even relied on the fact that anything not recognized by the machinery returned the current timestamp. Introduce approxidate_careful() that takes an optional pointer to an integer, that gets assigned 1 when the input does not make sense as a timestamp. As I am too lazy to fix all the callers that use approxidate(), most of the callers do not take advantage of the error checking, but convert the code to parse reflog to use it as a demonstration. Tests are mostly from Jeff King. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'jh/maint-config-file-prefix'Junio C Hamano2010-01-27
|\ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | * jh/maint-config-file-prefix: builtin-config: Fix crash when using "-f <relative path>" from non-root dir
| * | | | | | | | builtin-config: Fix crash when using "-f <relative path>" from non-root dirJohan Herland2010-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When your current directory is not at the root of the working tree, and you use the "-f" option with a relative path, the current code tries to read from a wrong file, since argv[2] is now beyond the end of the rearranged argument list. This patch replaces the incorrect argv[2] with the variable holding the given config file name. The bug was introduced by d64ec16 (git config: reorganize to use parseopt). [jc: added test] Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'jl/diff-submodule-ignore'Junio C Hamano2010-01-26
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * | | | | | | | | Teach diff --submodule that modified submodule directory is dirtyJens Lehmann2010-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 8e08b4 git diff does append "-dirty" to the work tree side if the working directory of a submodule contains new or modified files. Lets do the same when the --submodule option is used. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | fix portability issues with $ in double quotesStephen Boyd2010-01-26
| |_|_|/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | | | am: fix patch format detection for Thunderbird "Save As" emailsStephen Boyd2010-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch detection wants to inspect all the headers of a rfc2822 message and ensure that they look like header fields. The headers are always separated from the message body with a blank line. When Thunderbird saves the message the blank line separating the headers from the body includes a CR. The patch detection is failing because a CRLF doesn't match /^$/. Fix this by allowing a CR to exist on the separating line. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | t0022: replace non-portable literal CRStephen Boyd2010-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We shouldn't have literal CR's in tests as they aren't portable. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | tests: consolidate CR removal/addition functionsStephen Boyd2010-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | append_cr(), remove_cr(), q_to_nul() and q_to_cr() are defined in multiple tests. Consolidate them into test-lib.sh so we can stop redefining them. The use of remove_cr() in t0020 to test for a CR is replaced with a new function has_cr() to accurately reflect what is intended (the output of remove_cr() was being thrown away). Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>