summaryrefslogtreecommitdiff
path: root/t
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'mk/unpack-careful'Junio C Hamano2008-04-091-0/+95
|\ | | | | | | | | | | | | | | | | * mk/unpack-careful: t5300: add test for "index-pack --strict" receive-pack: allow using --strict mode for unpacking objects unpack-objects: fix --strict handling t5300: add test for "unpack-objects --strict" unpack-objects: prevent writing of inconsistent objects
| * t5300: add test for "index-pack --strict"Martin Koegler2008-03-071-0/+47
| | | | | | | | | | | | | | | | | | This adds test for indexing packs with --strict option, basically the same as c0e809e (t5300: add test for "unpack-objects --strict") has done for unpack-objects. Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * unpack-objects: fix --strict handlingJunio C Hamano2008-03-051-1/+1
| | | | | | | | | | | | | | | | | | | | Earlier attempt (which was reverted) called added_object() (by the way, the function should be renamed to resolve_dependents() --- it is called when we have a complete object data, and is responsible to resolve pending deltified objects that use this object as their delta base object) without updating obj_list[nr].sha1 with the correct value. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * t5300: add test for "unpack-objects --strict"Junio C Hamano2008-03-051-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds test for unpacking deltified objects with --strict option. - unpacking full trees with --strict should pass; - unpacking only trees with --strict should be rejected due to missing blobs; - unpacking only trees with --strict into an existing repository with necessary blobs should succeed. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'jk/add-i-mode'Junio C Hamano2008-04-091-0/+19
|\ \ | | | | | | | | | | | | | | | * jk/add-i-mode: add--interactive: allow user to choose mode update add--interactive: ignore mode change in 'p'atch command
| * | add--interactive: allow user to choose mode updateJeff King2008-03-271-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using the 'p'atch command, instead of just throwing out any mode change, present it to the user in the same way that we show hunks. This way, the mode change can be staged independently from the changes to the contents. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | add--interactive: ignore mode change in 'p'atch commandJeff King2008-03-271-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a path is examined in the patch subcommand, any mode changes in the file are given to use in the diff header by git-diff. If no hunks are staged, then we throw out that header and do not touch the path. But if _any_ hunks are staged, we use the header, and the mode is changed together with the contents. Since the 'p'atch command should just be dealing with hunks that are shown to the user, it makes sense to just ignore mode changes entirely. We do squirrel away the mode, though, since the next patch will allow users to select the mode update separately. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | git-svn: fix following renamed paths when tracking a single pathEric Wong2008-04-072-0/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using git-svn to follow only a single (empty) path per svn-remote (i.e. not using --stdlayout), following the history of a renamed path was broken in c586879cdfa4f8181a14e953a9152a4639eef333. This reverts the regression for the single (emtpy) path per svn-remote case. To avoid breaking the tests in a committed revision, this is an addendum to a patch originally submitted by Santhosh Kumar Mani <santhoshmani@gmail.com>: > git-svn: add test for renamed directory fetch > > This test tries to fetch a directory which had renames in the > history from a SVN repository. [ew: unneccesary dependency on the starting an HTTP server removed from Santhosh's original test.] Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'jc/maint-apply-match-beginning'Junio C Hamano2008-04-061-0/+13
|\ \ \ | | | | | | | | | | | | | | | | * jc/maint-apply-match-beginning: Fix "git apply" to correctly enforce "match at the beginning"
| * | | Fix "git apply" to correctly enforce "match at the beginning"Junio C Hamano2008-04-061-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An earlier commit 4be6096 (apply --unidiff-zero: loosen sanity checks for --unidiff=0 patches, 2006-09-17) made match_beginning and match_end computed incorrectly. If a hunk inserts at the beginning, old position recorded at the hunk is line 0, and if a hunk changes at the beginning, it is line 1. The new test added to t4104 exposes that the old code did not insist on matching at the beginning for a patch to add a line to an empty file. An even older 65aadb9 (apply: force matching at the beginning., 2006-05-24) was equally wrong in that it tried to take hints from the number of leading context lines, to decide if the hunk must match at the beginning, but we can just look at the line number in the hunk to decide. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | test suite: remove useless TERM cruft in "t7005-editor.sh"Christian Couder2008-04-061-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 15387e3 (Test suite: reset TERM to its previous value after testing., 2007-10-26), I added a workaround to reset TERM to its previous value before the "test_done" at the end of "t7005-editor.sh" because otherwise "test_done" would have printed the test result with a bad TERM env variable (this resulted in output with no color on konsole). But since commit c2116a1 (test-lib: fix TERM to dumb for test repeatability, 2008-03-06), colored output is printed in a subshell with TERM reset to its original value so the earlier workaround is not needed anymore. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'js/filter-branch'Junio C Hamano2008-04-021-2/+18
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * js/filter-branch: filter-branch: Fix renaming a directory in the tree-filter filter-branch: Test renaming directories in a tree-filter
| * | | | filter-branch: Fix renaming a directory in the tree-filterveillette@yahoo.ca2008-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit d89c1df (filter-branch: don't use xargs -0, 2008-03-12) replaced a 'ls-files | xargs rm' pipeline by 'git clean'. 'git clean' however does not recurse and remove directories by default. Now, consider a tree-filter that renames a directory. 1. For the first commit everything works as expected 2. Then filter-branch checks out the files for the next commit. This leaves the new directory behind because there is no real "branch switching" involved that would notice that the directory can be removed. 3. Then filter-branch invokes 'git clean' to remove exactly those left-overs. But here it does not remove the directory. 4. The next tree-filter does not work as expected because there already exists a directory with the new name. Just add -d to 'git clean', so that empty directories are removed. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | filter-branch: Test renaming directories in a tree-filterJohannes Sixt2008-03-311-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test currently fails. If b is a directory then 'mv a b' is not a plain "rename", but really a "move", so we must also test that the directory does not exist with the old name in the directory with the new name. There's also some cleanup in the corresponding "rename file" test to avoid spurious shell syntax errors and "ambigous ref" error from 'git show' (but these should show up only if the test would fail anyway). Plus we also test for the non-existence of the old file. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
* | | | | Merge branch 'bc/mktag'Junio C Hamano2008-04-021-5/+180
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bc/mktag: mktag.c: tweak validation of tagger field and adjust test script mktag.c: improve verification of tagger field and tests
| * | | | | mktag.c: tweak validation of tagger field and adjust test scriptBrandon Casey2008-03-311-16/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the verify_tag() function to remove an unnecessary test, and add additional check for angle brackets in the name and email field, and spaces in the email field. The timestamp and timezone sections are made more straight forward by using strspn(). Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | mktag.c: improve verification of tagger field and testsBrandon Casey2008-03-301-5/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since nearly its birth, git's tags have included a "tagger" field which describes the name of tagger, email of tagger, and date and time of tagging. But, this field was only loosely tested by git-mktag. Provide some thorough testing for this field and also ensure that the tag header is separated from the tag body by an empty line to reduce the convenience of creating a flawed tag. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'dd/cvsserver'Junio C Hamano2008-04-021-0/+50
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dd/cvsserver: cvsserver: Use the user part of the email in log and annotate results cvsserver: Add test for update -p cvsserver: Implement update -p (print to stdout) cvsserver: Add a few tests for 'status' command cvsserver: Do not include status output for subdirectories if -l is passed cvsserver: Only print the file part of the filename in status header cvsserver: Respond to the 'editors' and 'watchers' commands
| * | | | | | cvsserver: Add test for update -pDamien Diederen2008-03-271-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Damien Diederen <dash@foobox.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | cvsserver: Add a few tests for 'status' commandDamien Diederen2008-03-271-0/+32
| | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Damien Diederen <dash@foobox.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | t7004-tag: Skip more tests if gpg is not available.Johannes Sixt2008-04-021-7/+8
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test was already careful enough to skip signed tag tests if gpg is not available, but it must also skip all verify tests, even those that are about non-signed tags, because they also invoke gpg. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | diff-files: careful when inspecting work tree itemsJunio C Hamano2008-03-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the same breakage in diff-files. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | diff-index: careful when inspecting work tree itemsJunio C Hamano2008-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Earlier, if you changed a staged path into a directory in the work tree, we happily ran lstat(2) on it and found that it exists, and declared that the user changed it to a gitlink. This is wrong for two reasons: (1) It may be a directory, but it may not be a submodule, and in the latter case, the change we need to report is "the blob at the path has disappeared". We need to check with resolve_gitlink_ref() to be consistent with what "git add" and "git update-index --add" does. (2) lstat(2) may have succeeded only because a leading component of the path was turned into a symbolic link that points at something that exists in the work tree. In such a case, the path itself does not exist anymore, as far as the index is concerned. This fixes these breakages in diff-index that the previous patch has exposed. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Add corner case tests for diff-index and diff-filesJunio C Hamano2008-03-301-0/+140
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | diff-index and diff-files can get confused in corner cases when an indexed blob turns into something else in the work tree. This patch adds tests to expose such breakages. The test is classified under t2XXX series instead of t4XXX series, because the ultimate objective is to fix "add -u" (and "commit -a" that shares the same issue). Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | builtin-prune: protect objects listed on the command lineJunio C Hamano2008-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Finally, this resurrects the documented behaviour to protect other objects listed on the command line from getting pruned. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Add tests for git-pruneMichele Ballabio2008-03-271-0/+34
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems that git prune changed behaviour with respect to revisions added from command line, probably when it became a builtin. Currently, it prints a short usage and exits: instead, it should take those revisions into account and not prune them. So add a couple of test to point this out. We'll be fixing this by switching to parse_options(), so add tests to detect bogus command line parameters as well, to keep ourselves from introducing regressions. Signed-off-by: Michele Ballabio <barra_cuda@katamail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'maint'Junio C Hamano2008-03-271-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: Update draft release notes for 1.5.4.5 Documentation: clarify use of .git{ignore,attributes} versus .git/info/* t/t3800-mktag.sh: use test_must_fail rather than '!' Conflicts: t/t3800-mktag.sh
| * | Merge branch 'jc/maint-fetch-regression-1.5.4' into maintJunio C Hamano2008-03-2766-7/+903
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | * jc/maint-fetch-regression-1.5.4: git-fetch test: test tracking fetch results, not just FETCH_HEAD Fix branches file configuration Tighten refspec processing
| * | | t/t3800-mktag.sh: use test_must_fail rather than '!'Brandon Casey2008-03-261-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | test_must_fail: 129 is a valid error code from usage()Junio C Hamano2008-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a git command is run under test_must_fail to make sure that the argument parser catches bogus command line, it exits with 129. We need to catch it as a valid "graceful error exit". Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | t9600-cvsimport.sh: set HOME before checking for cvsps availabilityFrank Lichtenheld2008-03-261-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This actually sounds like a bug in cvsps, which requires an existing home directory when asked for the usage through -h $ HOME=/nonexistent cvsps -h Cannot create the cvsps directory '.cvsps': No such file or directory This made t9600 think that cvsps is not available if HOME did not exist, causing the tests to be skipped $ HOME=/nonexistent sh t9600-cvsimport.sh * skipping cvsimport tests, cvsps not found * passed all 0 test(s) Now t9600 sets HOME to the current working directory before checking for the availability of the cvsps program. This issue has been discovered by Marco Rodrigues, and fixed by Frank Lichtenheld through http://bugs.debian.org/471969 Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'jc/maint-fetch-regression-1.5.4'Junio C Hamano2008-03-2665-7/+831
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | * jc/maint-fetch-regression-1.5.4: git-fetch test: test tracking fetch results, not just FETCH_HEAD Fix branches file configuration Tighten refspec processing Fix the wrong output of `git-show v1.3.0~155^2~4` in documentation.
| * | | git-fetch test: test tracking fetch results, not just FETCH_HEADJunio C Hamano2008-03-2665-7/+831
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We really should have done this long time ago. Existing t5515 test was written for the specific purpose of catching regression to the contents of generated FETCH_HEAD file, but it also is a good place to make sure various fetch configurations do fetch what they intend to fetch (and nothing else). Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Tighten refspec processingDaniel Barkalow2008-03-261-0/+72
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the pattern matching code to not store the required final / before the *, and then to require each side to be a valid ref (or empty). In particular, any refspec that looks like it should be a pattern but doesn't quite meet the requirements will be found to be invalid as a fallback non-pattern. This was cherry picked from commit ef00d15 (Tighten refspec processing, 2008-03-17), and two fix-up commits 46220ca (remote.c: Fix overtight refspec validation, 2008-03-20) and 7d19da4 (refspec: allow colon-less wildcard "refs/category/*", 2008-03-25) squashed in. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | init: show "Reinit" message even in an (existing) empty repositoryJohannes Schindelin2008-03-251-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | Earlier, git-init tested for a valid HEAD ref, but if the repository was empty, there was none. Instead, test for the existence of the file $GIT_DIR/HEAD. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | builtin-remote: Fix missing newline at end of listing of pushed branchesJohannes Sixt2008-03-231-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this the output of 'git remote show' does not end with a new-line: bash> git remote show repo * remote repo URL: repo.or.cz:/srv/git/kdbg.git Tracked remote branches maint master mob Local branch pushed with 'git push' +master:masterbash> Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | remote.c: Fix overtight refspec validationJunio C Hamano2008-03-221-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We tightened the refspec validation code in an earlier commit ef00d15 (Tighten refspec processing, 2008-03-17) per my suggestion, but the suggestion was misguided to begin with and it broke this usage: $ git push origin HEAD~12:master The syntax of push refspecs and fetch refspecs are similar in that they are both colon separated LHS and RHS (possibly prefixed with a + to force), but the similarity ends there. For example, LHS in a push refspec can be anything that evaluates to a valid object name at runtime (except when colon and RHS is missing, or it is a glob), while it must be a valid-looking refname in a fetch refspec. To validate them correctly, the caller needs to be able to say which kind of refspecs they are. It is unreasonable to keep a single interface that cannot tell which kind it is dealing with, and ask it to behave sensibly. This commit separates the parsing of the two into different functions, and clarifies the code to implement the parsing proper (i.e. splitting into two parts, making sure both sides are wildcard or neither side is). This happens to also allow pushing a commit named with the esoteric "look for that string" syntax: $ git push ../test.git ':/remote.c: Fix overtight refspec:master' Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Make git-svn tests behave better on OS XKevin Ballard2008-03-221-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | Give lib-git-svn.sh a few alternate paths to look for apache2. Explicitly define the LockFile so httpd will actually start under OS X Signed-off-by: Kevin Ballard <kevin@sb.org> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | t/t7003-filter-branch.sh: use test_must_fail rather than '!'Brandon Casey2008-03-221-6/+6
| | | | | | | | | | | | | | | Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Don't try and percent-escape existing percent escapes in git-svn URIsKevin Ballard2008-03-201-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git-svn project names are percent-escaped ever since f5530b8 (git-svn: support for funky branch and project names over HTTP(S), 2007-11-11). Unfortunately this breaks the scenario where the user hands git-svn an already-escaped URI. Fix the regexp to skip over what looks like existing percent escapes, and test this scenario. Signed-off-by: Kevin Ballard <kevin@sb.org> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | remote show: do not show symbolic refsJohannes Schindelin2008-03-191-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For symbolic refs, a sane notion of being "stale" is that the ref they point to no longer exists. Since this is checked already, "remote show" does not need to show them at all. Incidentally, this fixes the issue that "HEAD" was shown as a stale ref by "remote show" in a freshly cloned repository. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Make revision limiting more robust against occasional bad commit datesLinus Torvalds2008-03-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The revision limiter uses the commit date to decide when it has seen enough commits to finalize the revision list, but that can get confused if there are incorrect dates far in the past on some commits. This makes the logic a bit more robust by - we always walk an extra SLOP commits from the source list even if we decide that the source list is probably all done (unless the source is entirely empty, of course, because then we really can't do anything at all) - we keep track of the date of the last commit we added to the destination list (this will *generally* be the oldest entry we've seen so far) - we compare that with the youngest entry (the first one) of the source list, and if the destination is older than the source, we know we want to look at the source. which causes occasional date mishaps to be handled cleanly. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Fix t3200 configDaniel Barkalow2008-03-181-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | "git-config name = value" doesn't do anything most of the time. The test meant "git-config name value", but that leaves the configuration such that later tests will be confused, so move it to the end. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Fix read-tree not to discard errorsJunio C Hamano2008-03-181-1/+1
| | | | | | | | | | | | | | | | | | This fixes the issue identified with recently added tests to t1004 Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Add tests to catch problems with un-unlinkable symlinksJunio C Hamano2008-03-181-0/+35
| | | | | | | | | | | | | | | | | | | | | This currently fails not because we refuse to check out, but because we detect error but incorrectly discard it in the callchain. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Test: catch if trash cannot be removedJunio C Hamano2008-03-181-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | When your test creates an unwritable directory that test framework cannot clean out by "rm -fr trash", later tests cannot start in a fresh state they expect to. Detect this and error out early. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | git-merge-one-file: fix longstanding stupid thinkoJunio C Hamano2008-03-181-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | When a merge result creates a new file, and when our side already has a file in the path, taking the merge result may clobber the untracked file. However, the logic to detect this situation was totally the wrong way. We should complain when the file exists, not when the file does not exist. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Don't update unchanged merge entriesLinus Torvalds2008-03-161-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 34110cd4e394e3f92c01a4709689b384c34645d8 ("Make 'unpack_trees()' have a separate source and destination index") I introduced a really stupid bug in that it would always add merged entries with the CE_UPDATE flag set. That caused us to always re-write the file, even when it was already up-to-date in the source index. Not only is that really stupid from a performance angle, but more importantly it's actively wrong: if we have dirty state in the tree when we merge, overwriting it with the result of the merge will incorrectly overwrite that dirty state. This trivially fixes the problem - simply don't set the CE_UPDATE flag when the merge result matches the old state. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | t1000: use "test_must_fail git frotz", not "! git frotz"Junio C Hamano2008-03-161-18/+18
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Redo "add test_cmp function for test scripts"Junio C Hamano2008-03-152-2/+2
| | | | | | | | | | | | | | | | | | | | | We had a handful test updates since we accepted 82ebb0b (add test_cmp function for test scripts). This fixes them up. Signed-off-by: Junio C Hamano <gitster@pobox.com>