aboutsummaryrefslogtreecommitdiff
path: root/t
Commit message (Collapse)AuthorAge
* t/: Use "test_must_fail git" instead of "! git"Stephan Beyer2008-07-13
| | | | | | | | | | | | | | | This patch changes every occurrence of "! git" -- with the meaning that a git call has to gracefully fail -- into "test_must_fail git". This is useful to - make sure the test does not fail because of a signal, e.g. SIGSEGV, and - advertise the use of "test_must_fail" for new tests. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t/test-lib.sh: exit with small negagive int is ok with test_must_failStephan Beyer2008-07-13
| | | | | | | | | | | | | | The test_must_fail function in test-lib.sh has been designed to distinguish segmentation faults from controlled errors. But in the current implementation this only works if a git command does not return a small negative value, like -1, -2 or -3. But some git commands do. Because any signal (like SIGSEGV) will result in an exit status less than 193, this patch just adds a further check for the exit status. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* apply: fix copy/rename breakageJunio C Hamano2008-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7ebd52a (Merge branch 'dz/apply-again', 2008-07-01) taught "git-apply" to grok a (non-git) patch that is a concatenation of separate patches that touch the same file number of times, by recording the postimage of patch application of previous round and using it as the preimage for later rounds. This "incremental" mode of patch application fundamentally contradicts with the way git rename/copy patches are designed. When a git patch talks about a file A getting modified, and a new file B created out of A, like this: diff --git a/A b/A --- a/A +++ b/A ... change text here ... diff --git a/A b/B copy from A copy to B --- a/A +++ b/B ... change text here ... the second change to produce B does not depend on what is done to A with the first change in any way. This is explicitly done so for reviewability of individual patches. With this commit, we do not look at 'fn_table' that records the postimage of previous round when applying a patch to produce a new file out of an existing file. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'js/apply-root'Junio C Hamano2008-07-09
|\ | | | | | | | | | | | | * js/apply-root: git-apply --directory: make --root more similar to GNU diff apply --root: thinkofix. Teach "git apply" to prepend a prefix with "--root=<root>"
| * git-apply --directory: make --root more similar to GNU diffJunio C Hamano2008-07-06
| | | | | | | | | | | | | | | | | | Applying a patch in the directory that is different from what the patch records is done with --directory option in GNU diff. The --root option we introduced previously does the same, and we can call it the same way to give users more familiar feel. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * apply --root: thinkofix.Junio C Hamano2008-07-02
| | | | | | | | | | | | | | | | The end of a string is string[length-1], not string[length+1]. I pointed it out during the review, but I forgot about it when applying the patch. This should fix it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Teach "git apply" to prepend a prefix with "--root=<root>"Johannes Schindelin2008-07-01
| | | | | | | | | | | | | | | | | | | | | | With "git apply --root=<root>", all file names in the patch are prepended with <root>. If a "-p" value was given, the paths are stripped _before_ prepending <root>. Wished for by HPA. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | t9100-git-svn-basic.sh: Fix determination of utf-8 localeRamsay Jones2008-07-09
| | | | | | | | | | | | | | | | When setting the GIT_SVN_LC_ALL variable, default to the $LANG environment variable, when the $LC_ALL override is not set. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | t9113-*.sh: provide user feedback when test skippedRamsay Jones2008-07-09
| | | | | | | | | | | | | | | | | | Currently this test simply exits without providing any feedback at all. Tell user if the test is being skipped and provide a hint as to how the test may be enabled. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'maint'Junio C Hamano2008-07-09
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | * maint: Start preparing release notes for 1.5.6.3 git-submodule - Fix bugs in adding an existing repo as a module bash: offer only paths after '--' Remove unnecessary pack-*.keep file after successful git-clone make deleting a missing ref more quiet
| * | Remove unnecessary pack-*.keep file after successful git-cloneShawn O. Pearce2008-07-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | Once a clone is successful we no longer need to hold onto the .keep file created by the transport. Delete the file so we can later repack the complete repository. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | make deleting a missing ref more quietJeff King2008-07-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If git attempts to delete a ref, but the unlink of the ref file fails, we print a message to stderr. This is usually a good thing, but if the error is ENOENT, then it indicates that the ref has _already_ been deleted. And since that's our goal, it doesn't make sense to complain to the user. This harmonizes the error reporting behavior for the unpacked and packed cases; the packed case already printed nothing on ENOENT, but the unpacked printed unconditionally. Additionally, send-pack would, when deleting the tracking ref corresponding to a remote delete, print "Failed to delete" on any failure. This can be a misleading message, since we actually _did_ delete at the remote side, but we failed to delete locally. Rather than make the message more precise, let's just eliminate it entirely; the delete_ref routine already takes care of printing out a much more specific message about what went wrong. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Avoid apache complaining about lack of server's FQDNMike Hommey2008-07-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some setups, apache will say: apache2: Could not reliably determine the server's fully qualified domain name, using $(IP_address) for ServerName Avoid this message polluting tests output by setting a ServerName in apache configuration. Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Skip t5540-http-push test when USE_CURL_MULTI is undefinedMike Hommey2008-07-08
| | | | | | | | | | | | | | | | | | | | | | | | When USE_CURL_MULTI is undefined, git http-push doesn't work, so it's useless to test it. Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Fix http-push testMike Hommey2008-07-08
| | | | | | | | | | | | | | | | | | | | | | | | http-push test has been broken by 4a7aaccd adding a space character in the place where the test is being run. Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Catch failures from t5540-http-pushMike Hommey2008-07-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git http-push doesn't handle packed-refs, and now the new builtin-clone created packed refs, the http-push test fails. Mark the current failure as such, and also catch third test's failure that went unreported because git push doesn't return an error code when it says: No refs in common and none specified; doing nothing. Which it does when http-push can't get a list of refs recursively from $URL/refs/. Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | t7701-repack-unpack-unreachable.sh: check timestamp of unpacked objectsBrandon Casey2008-07-08
| | | | | | | | | | | | | | | | | | | | | | | | Unpacked objects should receive the timestamp of the pack they were unpacked from. Check. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | avoid null SHA1 in oldest reflogJeff King2008-07-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the user specifies a ref by a reflog entry older than one we have (e.g., "HEAD@{20 years ago"}), we issue a warning and give them the "from" value of the oldest reflog entry. That is, we say "we don't know what happened before this entry, but before this we know we had some particular SHA1". However, the oldest reflog entry is often a creation event such as clone or branch creation. In this case, the entry claims that the ref went from "00000..." (the null sha1) to the new value, and the reflog lookup returns the null sha1. While this is technically correct (the entry tells us that the ref didn't exist at the specified time) it is not terribly useful to the end user. What they probably want instead is "the oldest useful sha1 that this ref ever had". This patch changes the behavior such that if the oldest ref would return the null sha1, it instead returns the first value the ref ever had. We never discovered this problem in the test scripts because we created "fake" reflogs that had only a specified segment of history. This patch updates the tests with a creation event at the beginning of history. Signed-off-by: Jeff King <peff@peff.net> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'jc/rerere'Junio C Hamano2008-07-07
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jc/rerere: rerere.autoupdate t4200: fix rerere test rerere: remove dubious "tail_optimization" git-rerere: detect unparsable conflicts rerere: rerere_created_at() and has_resolution() abstraction
| * | | rerere.autoupdateJunio C Hamano2008-06-22
| | | | | | | | | | | | | | | | | | | | When this configuration is set, paths that are autoresolved by git-rerere are updated in the index as well.
| * | | t4200: fix rerere testJunio C Hamano2008-06-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The test used "diff-files -q" which is not about reporting if there is a difference at all. Instead, make sure that the path remains as conflicting in the index after rerere autoresolves it, as we will be adding rerere.autoupdate configuration with the next patch.
* | | | Merge branch 'dr/ceiling'Junio C Hamano2008-07-07
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dr/ceiling: Eliminate an unnecessary chdir("..") Add support for GIT_CEILING_DIRECTORIES Fold test-absolute-path into test-path-utils Implement normalize_absolute_path Conflicts: cache.h setup.c
| * | | | Add support for GIT_CEILING_DIRECTORIESDavid Reiss2008-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make git recognize a new environment variable that prevents it from chdir'ing up into specified directories when looking for a GIT_DIR. Useful for avoiding slow network directories. For example, I use git in an environment where homedirs are automounted and "ls /home/nonexistent" takes about 9 seconds. Setting GIT_CEILING_DIRS="/home" allows "git help -a" (for bash completion) and "git symbolic-ref" (for my shell prompt) to run in a reasonable time. Signed-off-by: David Reiss <dreiss@facebook.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | Fold test-absolute-path into test-path-utilsDavid Reiss2008-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: David Reiss <dreiss@facebook.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | Implement normalize_absolute_pathDavid Reiss2008-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | normalize_absolute_path removes several oddities form absolute paths, giving nice clean paths like "/dir/sub1/sub2". Also add a test case for this utility, based on a new test program (in the style of test-sha1). Signed-off-by: David Reiss <dreiss@facebook.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Fix apply --recount handling of no-EOL lineThomas Rast2008-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a patch modifies the last line of a file that previously had no terminating '\n', it looks like -old text \ No newline at end of file +new text Hence, a '\' line does not signal the end of the hunk. This modifies 'git apply --recount' to take this into account. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'maint'Junio C Hamano2008-07-04
|\ \ \ \ \ | | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | * maint: GIT 1.5.6.2 Fix executable bits in t/ scripts Work around gcc warnings from curl headers
| * | | | Fix executable bits in t/ scriptsJunio C Hamano2008-07-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pointed out by Ramsay Jones. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | t4127-apply-same-fn: Avoid sed -iJohannes Sixt2008-07-04
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'maint'Junio C Hamano2008-07-02
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | * maint: Fix describe --tags --long so it does not segfault
| * | | | Merge branch 'jc/maint-reset' into maintJunio C Hamano2008-07-02
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * jc/maint-reset: Allow "git-reset path" when unambiguous
| * | | | | Fix describe --tags --long so it does not segfaultShawn O. Pearce2008-07-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we match a lightweight (non-annotated tag) as the name to output and --long was requested we do not have a tag, nor do we have a tagged object to display. Instead we must use the object we were passed as input for the long format display. Reported-by: Mark Burton <markb@ordern.com> Backtraced-by: Mikael Magnusson <mikachu@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'js/apply-recount'Junio C Hamano2008-07-01
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * js/apply-recount: Allow git-apply to recount the lines in a hunk (AKA recountdiff)
| * | | | | | Allow git-apply to recount the lines in a hunk (AKA recountdiff)Johannes Schindelin2008-06-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes, the easiest way to fix up a patch is to edit it directly, even adding or deleting lines. Now, many people are not as divine as certain benevolent dictators as to update the hunk headers correctly at the first try. So teach the tool to do it for us. [jc: with tests] Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'jc/checkdiff'Junio C Hamano2008-07-01
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jc/checkdiff: Fix t4017-diff-retval for white-space from wc Update sample pre-commit hook to use "diff --check" diff --check: detect leftover conflict markers Teach "diff --check" about new blank lines at end checkdiff: pass diff_options to the callback check_and_emit_line(): rename and refactor diff --check: explain why we do not care whether old side is binary
| * | | | | | | Fix t4017-diff-retval for white-space from wcBrian Gernhardt2008-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Brian Gernhardt <benji@silverinsanity.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | diff --check: detect leftover conflict markersJunio C Hamano2008-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This teaches "diff --check" to detect and complain if the change adds lines that look like leftover conflict markers. We should be able to remove the old Perl script used in the sample pre-commit hook and modernize the script with this facility. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | Teach "diff --check" about new blank lines at endJunio C Hamano2008-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a patch adds new blank lines at the end, "git apply --whitespace" warns. This teaches "diff --check" to do the same. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'jc/maint-reset'Junio C Hamano2008-07-01
|\ \ \ \ \ \ \ \ | | |_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | * jc/maint-reset: Allow "git-reset path" when unambiguous
| * | | | | | | Allow "git-reset path" when unambiguousJunio C Hamano2008-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resetting a selected set of index entries is done with "git reset -- paths" syntax, but we did not allow -- to be omitted even when the command is unambiguous. This updates the command to follow the general rule: * When -- appears, revs come before it, and paths come after it; * When there is no --, earlier ones are revs and the rest are paths, and we need to guess. When lack of -- marker forces us to guess, we protect from user errors and typoes by making sure what we treat as revs do not appear as filenames in the work tree, and what we treat as paths do appear as filenames in the work tree, and by erroring out if that is not the case. We tell the user to disambiguate by using -- in such a case. which is employed elsewhere in the system. When this rule is applied to "reset", because we can have only zero or one rev to the command, the check can be slightly simpler than other programs. We have to check only the first one or two tokens after the command name and options, and when they are: -- A: no explicit rev given; "A" and whatever follows it are paths. A --: explicit rev "A" given and whatever follows the "--" are paths. A B: "A" could be rev or path and we need to guess. "B" could be missing but if exists that (and everything that follows) would be paths. So we apply the guess only in the last case and only to "A" (not "B" and what comes after it). * As long as "A" is unambiguously a path, index entries for "A", "B" (and everything that follows) are reset to the HEAD revision. * If "A" is unambiguously a rev, on the other hand, the index entries for "B" (and everything that follows) are reset to the "A" revision. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'dz/apply-again'Junio C Hamano2008-07-01
|\ \ \ \ \ \ \ \ | |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | * dz/apply-again: git-apply: handle a patch that touches the same path more than once better
| * | | | | | | git-apply: handle a patch that touches the same path more than once betterDon Zickus2008-06-27
| | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When working with a lot of people who backport patches all day long, every once in a while I get a patch that modifies the same file more than once inside the same patch. git-apply either fails if the second change relies on the first change or silently drops the first change if the second change is independent. The silent part is the scary scenario for us. Also this behaviour is different from the patch-utils. I have modified git-apply to create a table of the filenames of files it modifies such that if a later patch chunk modifies a file in the table it will buffer the previously changed file instead of reading the original file from disk. Logic has been put in to handle creations/deletions/renames/copies. All the relevant tests of git-apply succeed. A new test has been added to cover the cases I addressed. The fix is relatively straight-forward. Signed-off-by: Don Zickus <dzickus@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Add test results directory to t/.gitignoreBrian Gernhardt2008-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need test results to be committed if we're fixing a test. Signed-off-by: Brian Gernhardt <benji@silverinsanity.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | t9700: skip when Test::More is not availableJunio C Hamano2008-06-29
|/ / / / / / | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | test-lib.sh: show git init output when in verbose modeLea Wiemann2008-06-26
| |/ / / / |/| | | | | | | | | | | | | | | | | | | Signed-off-by: Lea Wiemann <LeWiemann@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'maint'Junio C Hamano2008-06-26
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: GIT 1.5.5.5 GIT 1.5.4.6 git-shell: accept "git foo" form diff --check: do not discard error status upon seeing a good line
| * | | | diff --check: do not discard error status upon seeing a good lineJunio C Hamano2008-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git diff --check" should return non-zero when there was any whitespace error but the code only paid attention to the error status of the last new line in the patch. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | clone: create intermediate directories of destination repoJeff King2008-06-25
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The shell version used to use "mkdir -p" to create the repo path, but the C version just calls "mkdir". Let's replicate the old behavior. We have to create the git and worktree leading dirs separately; while most of the time, the worktree dir contains the git dir (as .git), the user can override this using GIT_WORK_TREE. We can reuse safe_create_leading_directories, but we need to make a copy of our const buffer to do so. Since merge-recursive uses the same pattern, we can factor this out into a global function. This has two other cleanup advantages for merge-recursive: 1. mkdir_p wasn't a very good name. "mkdir -p foo/bar" actually creates bar, but this function just creates the leading directories. 2. mkdir_p took a mode argument, but it was completely ignored. Acked-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | improve for-each-ref test scriptJeff King2008-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we did a sanity check by doing for-each-ref using each possible format atom. However, we never checked the actual output produced by that atom, which recently let an obvious bug go undetected for some time. While we're at it, also clean up a few '!' into test_must_fail. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Fix use of "perl -i" on WindowsAlex Riesen2008-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The perldiag(1) has following to say about this: "Can't do inplace edit without backup" (F) You're on a system such as MS-DOS that gets confused if you try reading from a deleted (but still opened) file. You have to say -i.bak, or some such. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>