summaryrefslogtreecommitdiff
path: root/t
Commit message (Collapse)AuthorAgeFilesLines
* Remove case-sensitive file in t3030-merge-recursive.Brian Gernhardt2007-04-191-52/+52
| | | | | | | Rename "A" to the unused "c" Signed-off-by: Brian Gernhardt <benji@silverinsanity.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'maint'Junio C Hamano2007-04-181-0/+33
|\ | | | | | | | | | | | | * maint: git-shortlog: Fix two formatting errors in asciidoc documentation Fix overwriting of files when applying contextually independent diffs git-svn: don't allow globs to match regular files
| * Fix overwriting of files when applying contextually independent diffsAlex Riesen2007-04-181-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Noticed by applying two diffs of different contexts to the same file. The check for existence of a file was wrong: the test assumed it was a directory and reset the errno (twice: directly and by calling lstat). So if an entry existed and was _not_ a directory no attempt was made to rename into it, because the errno (expected by renaming code) was already reset to 0. This resulted in error: fatal: unable to write file file mode 100644 For Linux, removing "errno = 0" is enough, as lstat wont modify errno if it was successful. The behavior should not be depended upon, though, so modify the "if" as well. The test simulates this situation. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'jc/read-tree-df'Junio C Hamano2007-04-172-1/+529
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | * jc/read-tree-df: t3030: merge-recursive backend test. merge-recursive: handle D/F conflict case more carefully. merge-recursive: do not barf on "to be removed" entries. Treat D/F conflict entry more carefully in unpack-trees.c::threeway_merge() t1000: fix case table.
| * | t3030: merge-recursive backend test.Junio C Hamano2007-04-101-0/+528
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have fairly extensive coverage of read-tree 3-way machinery, and many Porcelain-ish tests use git-merge front-end tests, but we did not have good basic test for merge-recursive, which made it very hard to hack on it. I used this during the recent work to teach D/F conflicts to merge-recursive. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | t1000: fix case table.Junio C Hamano2007-04-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Case #10 is not handled with unpack-trees.c:threeway_merge() internally, unless under the agressive rule, and it is not a bug. As the test expects, ND (one side did not do anything, other side deleted) case was meant to be handled by the caller's policy (e.g. git-merge-one-file or git-merge-recursive). Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Add --ignore-unmatch option to exit with zero status when no files are removed.Steven Grimm2007-04-171-0/+4
| | | | | | | | | | | | | | | Signed-off-by: Steven Grimm <koreth@midwinter.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Bisect: rename "t/t6030-bisect-run.sh" to "t/t6030-bisect-porcelain.sh".Christian Couder2007-04-161-1/+1
| | | | | | | | | | | | | | | | | | | | | [jc: also fix 0a5280a9 that incorrectly changed the title of one test.] Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'js/wrap-log'Junio C Hamano2007-04-167-0/+50
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * js/wrap-log: Fix permissions on test scripts Fix t4201: accidental arithmetic expansion shortlog -w: make wrap-line behaviour optional. Use print_wrapped_text() in shortlog
| * | | Fix permissions on test scriptsAlex Riesen2007-04-167-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make every test executable. Remove exec-attribute from included shell files, they can't used standalone anyway. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Fix t4201: accidental arithmetic expansionAlex Riesen2007-04-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead of embedded subshell. It actually breaks here (dash as /bin/sh): t4201-shortlog.sh: 27: Syntax error: Missing '))' FATAL: Unexpected exit with code 2 Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | shortlog -w: make wrap-line behaviour optional.Junio C Hamano2007-04-101-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Use print_wrapped_text() in shortlogJohannes Schindelin2007-04-101-0/+50
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some oneline descriptions are just too long. In shortlog, it looks much nicer when they are wrapped. Since print_wrapped_text() is UTF-8 aware, it also works with those descriptions. [jc: with minimum fixes] Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Add --quiet option to suppress output of "rm" commands for removed files.Steven Grimm2007-04-161-0/+24
| | | | | | | | | | | | | | | Signed-off-by: Steven Grimm <koreth@midwinter.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Add testcase for format-patch --subject-prefix (take 3)Robin H. Johnson2007-04-112-0/+165
|/ / | | | | | | | | | | | | Add testcase for format-patch --subject-prefix support. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | git-archive: make tar the default formatRené Scharfe2007-04-091-1/+9
| | | | | | | | | | | | | | | | As noted by Junio, --format=tar should be assumed if no format was specified. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'cc/bisect'Junio C Hamano2007-04-071-4/+49
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | * cc/bisect: git-bisect: allow bisecting with only one bad commit. t6030: add a bit more tests to git-bisect git-bisect: modernization Documentation: bisect: "start" accepts one bad and many good commits Bisect: teach "bisect start" to optionally use one bad and many good revs.
| * | git-bisect: allow bisecting with only one bad commit.Junio C Hamano2007-04-061-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows you to say: git bisect start git bisect bad $bad git bisect next to start bisection without knowing a good commit. This would have you try a commit that is half-way since the beginning of the history, which is rather wasteful if you already know a good commit, but if you don't (or your history is short enough that you do not care), there is no reason not to allow this. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | t6030: add a bit more tests to git-bisectJunio C Hamano2007-04-061-1/+37
| | | | | | | | | | | | | | | | | | | | | Verify that git-bisect does not start before getting one bad and one good commit. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Bisect: teach "bisect start" to optionally use one bad and many good revs.Christian Couder2007-04-051-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One bad commit is fundamentally needed for bisect to run, and if we beforehand know more good commits, we can narrow the bisect space down without doing the whole tree checkout every time we give good commits. This patch implements: git bisect start [<bad> [<good>...]] [--] [<pathspec>...] as a short-hand for this command sequence: git bisect start git bisect bad $bad git bisect good $good1 $good2... On the other hand, there may be some confusion between revs (<bad> and <good>...) and <pathspec>... if -- is not used and if an invalid rev or a pathspec that looks like a rev is given. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'jc/checkout' (early part)Junio C Hamano2007-04-071-1/+62
|\ \ \ | | | | | | | | | | | | | | | | * 'jc/checkout' (early part): checkout: allow detaching to HEAD even when switching to the tip of a branch
| * | | checkout: allow detaching to HEAD even when switching to the tip of a branchJunio C Hamano2007-04-031-1/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | You cannot currently checkout the tip of an existing branch without moving to the branch. This allows you to detach your HEAD and place it at such a commit, with: $ git checkout master^0 Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge branch 'maint'Junio C Hamano2007-04-072-9/+10
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: Documentation: tighten dependency for git.{html,txt} Makefile: iconv() on Darwin has the old interface t5300-pack-object.sh: portability issue using /usr/bin/stat t3200-branch.sh: small language nit usermanual.txt: some capitalization nits Make builtin-branch.c handle the git config file rename_ref(): only print a warning when config-file update fails Distinguish branches by more than case in tests. Avoid composing too long "References" header. cvsimport: Improve formating consistency cvsimport: Reorder options in documentation for better understanding cvsimport: Improve usage error reporting cvsimport: Improve documentation of CVSROOT and CVS module determination cvsimport: sync usage lines with existing options Conflicts: Documentation/Makefile
| * | | t5300-pack-object.sh: portability issue using /usr/bin/statArjen Laarhoven2007-04-061-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the test 'compare delta flavors', /usr/bin/stat is used to get file size. This isn't portable. There already is a dependency on Perl, use its '-s' operator to get the file size. Signed-off-by: Arjen Laarhoven <arjen@yaph.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | t3200-branch.sh: small language nitArjen Laarhoven2007-04-061-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Distinguish branches by more than case in tests.Brian Gernhardt2007-04-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The renaming without config test changed a branch from q to Q, which fails on non-case sensitive file systems. Change the test to use q and q2. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge branch 'maint'Junio C Hamano2007-04-054-5/+44
|\ \ \ \ | |/ / / | | | / | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: Fix lseek(2) calls with args 2 and 3 swapped Honor -p<n> when applying git diffs Fix dependency of common-cmds.h Fix renaming branch without config file DESTDIR support for git/contrib/emacs gitweb: Fix bug in "blobdiff" view for split (e.g. file to symlink) patches Document --left-right option to rev-list. Revert "builtin-archive: use RUN_SETUP" rename contrib/hooks/post-receieve-email to contrib/hooks/post-receive-email. rerere: make sorting really stable. Fix t4200-rerere for white-space from "wc -l"
| * | Honor -p<n> when applying git diffsShawn O. Pearce2007-04-051-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the user is trying to apply a Git generated diff file and they have specified a -p<n> option, where <n> is not 1, the user probably has a good reason for doing this. Such as they are me, trying to apply a patch generated in git.git for the git-gui subdirectory to the git-gui.git repository, where there is no git-gui subdirectory present. Users shouldn't supply -p2 unless they mean it. But if they are supplying it, they probably have thought about how to make this patch apply to their working directory, and want to risk whatever results may come from that. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Fix renaming branch without config fileGeert Bosch2007-04-051-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make git_config_rename_section return success if no config file exists. Otherwise, renaming a branch would abort, leaving the repository in an inconsistent state. [jc: test] Signed-off-by: Geert Bosch <bosch@gnat.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Revert "builtin-archive: use RUN_SETUP"René Scharfe2007-04-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 64edf4b2 cleaned up the initialization of git-archive, at the cost of 'git-archive --list' now requiring a git repo. This patch reverts the cleanup and documents the requirement for this particular dirtyness in a test. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | rerere: make sorting really stable.Junio C Hamano2007-04-041-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | The earlier code does not swap hunks when the beginning of the first side is identical to the whole of the second side. In such a case, the first one should sort later. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Fix t4200-rerere for white-space from "wc -l"Brian Gernhardt2007-04-041-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | On OS X, wc outputs 6 spaces before the number of lines, so the test expecting the string "10" failed. Do not quote $cmd to strip away the problematic whitespace as other tests do. Also fix the grammar of the test name while making changes to it. There's only one preimage, so it's "has", not "have". Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'jc/bisect'Junio C Hamano2007-04-042-2/+34
|\ \ | |/ |/| | | | | | | | | | | | | | | * jc/bisect: make the previous optimization work also on path-limited rev-list --bisect rev-list --bisect: Fix "halfway" optimization. t6004: add a bit more path optimization test. git-rev-list --bisect: optimization git-rev-list: add --bisect-vars option. t6002: minor spelling fix.
| * Merge branch 'master' into jc/bisectJunio C Hamano2007-03-232-1/+59
| |\ | | | | | | | | | | | | This is to merge in the fix for path-limited bisection from the 'master' branch.
| * | t6004: add a bit more path optimization test.Junio C Hamano2007-03-231-1/+33
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | t6002: minor spelling fix.Junio C Hamano2007-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | The test expects --bisect option can be configured with by setting $_bisect_option. So let's allow that uniformly. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge 1.5.0.7 inJunio C Hamano2007-04-031-4/+17
|\ \ \ | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | rerere should not repeat the earlier hunks in later onesJunio C Hamano2007-04-031-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When a file has more then one conflicting hunks, it repeated the contents of previous hunks in output for later ones. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | t4118: be nice to non-GNU sedJohannes Schindelin2007-03-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Elias Pipping: > I'm on a mac, hence /usr/bin/sed is not gnu sed, which makes > t4118 fail. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Ack'd-by: Elias Pipping <pipping@macports.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | git-mailinfo fixes for patch mungingDon Zickus2007-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't translate the patch to UTF-8, instead preserve the data as is. This also reverts a test case that was included in the original patch series. Also allow overwriting the authorship and title information we gather from RFC2822 mail headers with additional in-body headers, which was pointed out by Linus. Signed-off-by: Don Zickus <dzickus@redhat.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | t/t6006: add tests for a slightly more complex commit messagesJeff King2007-03-281-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Especially this tests i18n messages and encoding header. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Fix "--pretty=format:" for parent related items.Junio C Hamano2007-03-281-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two breakages in the %P/%p interpolation. It appended an excess SP at the end of the list, and it gave uninitialized contents of a buffer on the stack for root commits. This fixes it, while updating the t6006 test which expected the wrong output. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Add some basic tests of rev-list --pretty=formatJeff King2007-03-271-0/+108
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | These could stand to be a little more complex, but it should at least catch obvious problems (like the recently fixed %ct bug). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Bisect: implement "git bisect run <cmd>..." to automatically bisect.Christian Couder2007-03-231-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This idea was suggested by Bill Lear (Message-ID: <17920.38942.364466.642979@lisa.zopyra.com>) and I think it is a very good one. This patch adds a new test file for "git bisect run", but there is currently only one basic test. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | t4118: be nice to non-GNU sedJohannes Schindelin2007-03-221-1/+2
| |/ |/| | | | | | | | | | | | | | | | | Elias Pipping: > I'm on a mac, hence /usr/bin/sed is not gnu sed, which makes > t4118 fail. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Ack'd-by: Elias Pipping <pipping@macports.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | don't ever allow SHA1 collisions to exist by fetching a packNicolas Pitre2007-03-201-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Waaaaaaay back Git was considered to be secure as it never overwrote an object it already had. This was ensured by always unpacking the packfile received over the network (both in fetch and receive-pack) and our already existing logic to not create a loose object for an object we already have. Lately however we keep "large-ish" packfiles on both fetch and push by running them through index-pack instead of unpack-objects. This would let an attacker perform a birthday attack. How? Assume the attacker knows a SHA-1 that has two different data streams. He knows the client is likely to have the "good" one. So he sends the "evil" variant to the other end as part of a "large-ish" packfile. The recipient keeps that packfile, and indexes it. Now since this is a birthday attack there is a SHA-1 collision; two objects exist in the repository with the same SHA-1. They have *very* different data streams. One of them is "evil". Currently the poor recipient cannot tell the two objects apart, short of by examining the timestamp of the packfiles. But lets say the recipient repacks before he realizes he's been attacked. We may wind up packing the "evil" version of the object, and deleting the "good" one. This is made *even more likely* by Junio's recent rearrange_packed_git patch (b867092f). It is extremely unlikely for a SHA1 collisions to occur, but if it ever happens with a remote (hence untrusted) object we simply must not let the fetch succeed. Normally received packs should not contain objects we already have. But when they do we must ensure duplicated objects with the same SHA1 actually contain the same data. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'ar/diff'Junio C Hamano2007-03-182-0/+159
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ar/diff: Add tests for --quiet option of diff programs try-to-simplify-commit: use diff-tree --quiet machinery. revision.c: explain what tree_difference does Teach --quiet to diff backends. diff --quiet Remove unused diffcore_std_no_resolve Allow git-diff exit with codes similar to diff(1)
| * | Add tests for --quiet option of diff programsAlex Riesen2007-03-161-0/+80
| | | | | | | | | | | | Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
| * | Allow git-diff exit with codes similar to diff(1)Alex Riesen2007-03-141-0/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces a new command-line option: --exit-code. The diff programs will return 1 for differences, return 0 for equality, and something else for errors. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | [PATCH] add test for OFS_DELTA objectsNicolas Pitre2007-03-161-6/+65
| | | | | | | | | | | | | | | | | | | | | | | | Make sure pack-objects with --delta-base-offset works fine, and that it actually produces smaller packs as expected. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>