aboutsummaryrefslogtreecommitdiff
path: root/t
Commit message (Collapse)AuthorAge
* Remove unnecessary output from t3600-rm.Shawn Pearce2006-05-29
| | | | | | | | | | Moved the setup commands into test_expect_success blocks so their output is hidden unless -v is used. This makes the test suite look a little cleaner when the rm test-file setup step fails (and was expected to fail for most cases). Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'lt/apply'Junio C Hamano2006-05-28
|\ | | | | | | | | | | | | * lt/apply: apply: force matching at the beginning. Add a test-case for git-apply trying to add an ending line apply: treat EOF as proper context.
| * apply: force matching at the beginning.Junio C Hamano2006-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When there is no leading context, the patch must match at the beginning of preimage; otherwise there is a "patch adds these lines while the other lines were added to the original file" conflict. This is the opposite of match_end fix earlier in this series. Unlike matching at the end case, we can additionally check the preimage line number recorded in the patch, so the change is not symmetrical with the earlier one. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Add a test-case for git-apply trying to add an ending lineCatalin Marinas2006-05-24
| | | | | | | | | | | | | | | | git-apply adding an ending line doesn't seem to fail if the ending line is already present in the patched file. Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | t1002: use -U0 instead of --unified=0Linus Torvalds2006-05-28
|/ | | | | | | | Using "-U0" is definitely more portable than using "--unified=0", so we should do that regardless. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* read-tree -m -u: do not overwrite or remove untracked working tree files.Junio C Hamano2006-05-17
| | | | | | | | | | When a merge results in a creation of a path that did not exist in HEAD, and if you already have that path on the working tree, because the index has not been told about the working tree file, read-tree happily removes it. The issue was brought up by Santi Béjar on the list. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'fix'Junio C Hamano2006-05-15
|\ | | | | | | | | | | | | | | | | | | * fix: Fix pack-index issue on 64-bit platforms a bit more portably. Install git-send-email by default Fix compilation on newer NetBSD systems git config syntax updates Another config file parsing fix. checkout: use --aggressive when running a 3-way merge (-m).
| * git config syntax updatesLinus Torvalds2006-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This updates the hierarchical section name syntax to [section<space>+"<randomstring>"] where the only rule for "randomstring" is that it can't contain a newline, and if you really want to insert a double-quote, you do it with \". It turns that into the section name "secion.randomstring". The "section" part is still case insensitive, but the "randomstring" part is case sensitive. So you could use this for things like [email "torvalds@osdl.org"] name = Linus Torvalds if you wanted to do the "email->name" conversion as part of the config file format (I'm not claiming that is sensible, I'm just giving it as an insane example). That would show up as the association email.torvalds@osdl.org.name -> Linus Torvalds which is easy to parse (the "." in the email _looks_ ambiguous, but it isn't: you know that there will always be a single key-name, so you find the key name with "strrchr(name, '.')" and things are entirely unambiguous). Repo-config is updated to be able to parse the new format, and also write things out in the new format. [jc: rolled two patches from Linus and one fix-up from Sean into one, with additional adjustments for t/t1300 test to check the case insensitiveness of section base and variable and case sensitiveness of the extended section part. Then stripped some part off to make the result applicable to the stale 1.3.X series that does not have recent enhancements. ] Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'mw/alternates'Junio C Hamano2006-05-09
|\ \ | | | | | | | | | | | | | | | | | | * mw/alternates: clone: don't clone the info/alternates file test case for transitive info/alternates Transitively read alternatives
| * | test case for transitive info/alternatesMartin Waitz2006-05-07
| | | | | | | | | | | | | | | Signed-off-by: Martin Waitz <tali@admingilde.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'jc/again'Junio C Hamano2006-05-09
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * jc/again: Fix users of prefix_path() to free() only when necessary update-index --again: take optional pathspecs update-index --again
| * | | update-index --again: take optional pathspecsJunio C Hamano2006-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When pathspecs are given, update-index --again further limits the set of paths to be updated to those that match them. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | update-index --againJunio C Hamano2006-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After running 'git-update-index' for some paths, you may want to do the update on the same set of paths again. The new flag --again checks the paths whose index entries are are different from the HEAD commit and updates them from the working tree contents. This was brought up by Carl Worth on #git. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge branch 'jc/bindiff'Junio C Hamano2006-05-09
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | * jc/bindiff: improve base85 generated assembly code binary diff and apply: testsuite. binary diff: further updates. binary patch.
| * | | binary diff and apply: testsuite.Junio C Hamano2006-05-06
| |/ / | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'fix'Junio C Hamano2006-05-07
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | * fix: repack: honor -d even when no new pack was created clone: keep --reference even with -l -s repo-config: document what value_regexp does a bit more clearly. Release config lock if the regex is invalid core-tutorial.txt: escape asterisk
| * | clone: keep --reference even with -l -sMartin Waitz2006-05-07
| | | | | | | | | | | | | | | | | | | | | | | | Both -l -s and --reference update objects/info/alternates and used to write over each other. Signed-off-by: Martin Waitz <tali@admingilde.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | t1300-repo-config: two new config parsing tests.sean2006-05-06
| |/ |/| | | | | | | | | | | | | | | | | | | - correctly insert a new variable into a section that only contains a single (different) variable. - correctly insert a new section that matches the initial substring of an existing section. Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | repo-config: support --get-regexpJohannes Schindelin2006-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With --get-regexp, output all key/value pairs where the key matches a regexp. Example: git-repo-config --get-regexp remote.*.url will output something like remote.junio.url git://git.kernel.org/pub/scm/git/git.git remote.gitk.url git://git.kernel.org/pub/scm/gitk/gitk.git Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | t0000-basic: more commit-tree tests.Junio C Hamano2006-04-26
| | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | t0000-basic: Add ls-tree recursive test back.Junio C Hamano2006-04-26
| | | | | | | | | | | | | | | | | | | | | | When we updated ls-tree recursive output to omit the tree nodes, 246cc52f388cae8ca99e5a12b8458c9bfa467765 adjusted the old test so that we do not expect to see trees in its output. Later, with 0f8f45cb4a7e664b396f73c25891da46b953b8b8, we added back the ability to show both with -t option, but we forgot to update the test as well. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Libify diff-index.Junio C Hamano2006-04-22
| | | | | | | | | | | | | | | | The second installment to libify diff brothers. The pathname arguments are checked more strictly than before because we now use the revision.c::setup_revisions() infrastructure. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Libify diff-files.Junio C Hamano2006-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first installment to libify diff brothers. The updated diff-files uses revision.c::setup_revisions() infrastructure to parse its command line arguments, which means the pathname arguments are checked more strictly than before. The tests are adjusted to separate possibly missing paths from the rest of arguments with double-dashes, to show the kosher way. As Linus pointed out, renaming diff.c to diff-lib.c was simply stupid, so I am renaming it back. The new diff-lib.c is to contain pieces extracted from diff brothers. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'fix'Junio C Hamano2006-04-20
|\ \ | |/ | | | | | | * fix: git-commit --amend: two fixes.
| * git-commit --amend: two fixes.Junio C Hamano2006-04-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running "git commit --amend" only to fix the commit log message without any content change, we mistakenly showed the git-status output that says "nothing to commit" without commenting it out. If you have already run update-index but you want to amend the top commit, "git commit --amend --only" without any paths should have worked, because --only means "starting from the base commit, update-index these paths only to prepare the index to commit, and perform the commit". However, we refused -o without paths. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'lt/logopt'Junio C Hamano2006-04-18
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lt/logopt: Fix "git log --stat": make sure to set recursive with --stat. combine-diff: show diffstat with the first parent. git.c: LOGSIZE is unused after log printing cleanup. Log message printout cleanups (#3): fix --pretty=oneline Log message printout cleanups (#2) Log message printout cleanups rev-list --header: output format fix Fixes for option parsing log/whatchanged/show - log formatting cleanup. Simplify common default options setup for built-in log family. Tentative built-in "git show" Built-in git-whatchanged. rev-list option parser fix. Split init_revisions() out of setup_revisions() Fix up rev-list option parsing. Fix up default abbrev in setup_revisions() argument parser. Common option parsing for "git log --diff" and friends
| * Log message printout cleanupsLinus Torvalds2006-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Sun, 16 Apr 2006, Junio C Hamano wrote: > > In the mid-term, I am hoping we can drop the generate_header() > callchain _and_ the custom code that formats commit log in-core, > found in cmd_log_wc(). Ok, this was nastier than expected, just because the dependencies between the different log-printing stuff were absolutely _everywhere_, but here's a patch that does exactly that. The patch is not very easy to read, and the "--patch-with-stat" thing is still broken (it does not call the "show_log()" thing properly for merges). That's not a new bug. In the new world order it _should_ do something like if (rev->logopt) show_log(rev, rev->logopt, "---\n"); but it doesn't. I haven't looked at the --with-stat logic, so I left it alone. That said, this patch removes more lines than it adds, and in particular, the "cmd_log_wc()" loop is now a very clean: while ((commit = get_revision(rev)) != NULL) { log_tree_commit(rev, commit); free(commit->buffer); commit->buffer = NULL; } so it doesn't get much prettier than this. All the complexity is entirely hidden in log-tree.c, and any code that needs to flush the log literally just needs to do the "if (rev->logopt) show_log(...)" incantation. I had to make the combined_diff() logic take a "struct rev_info" instead of just a "struct diff_options", but that part is pretty clean. This does change "git whatchanged" from using "diff-tree" as the commit descriptor to "commit", and I changed one of the tests to reflect that new reality. Otherwise everything still passes, and my other tests look fine too. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Makefile fixups.A Large Angry SCM2006-04-16
|/ | | | | Signed-off-by: A Large Angry SCM <gitzilla@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* t5500: test fixJunio C Hamano2006-04-13
| | | | | | | | Relying on eye-candy progress bar was fragile to begin with. Run fetch-pack with -k option, and count the objects that are in the pack that were transferred from the other end. Signed-off-by: Junio C Hamano <junkio@cox.net>
* t3600-rm: skip failed-remove test when we cannot make an unremovable file.Junio C Hamano2006-04-13
| | | | | | | | When running t3600-rm test under fakeroot (or as root), we cannot make a file unremovable with "chmod a-w .". Detect this case early and skip that test. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Retire t5501-old-fetch-and-upload test.Junio C Hamano2006-04-11
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* xdiff: Show function names in hunk headers.Mark Wooding2006-03-27
| | | | | | | | | | | | | | | | | | | | The speed of the built-in diff generator is nice; but the function names shown by `diff -p' are /really/ nice. And I hate having to choose. So, we hack xdiff to find the function names and print them. xdiff has grown a flag to say whether to dig up the function names. The builtin_diff function passes this flag unconditionally. I suppose it could parse GIT_DIFF_OPTS, but it doesn't at the moment. I've also reintroduced the `function name' into the test suite, from which it was removed in commit 3ce8f089. The function names are parsed by a particularly stupid algorithm at the moment: it just tries to find a line in the `old' file, from before the start of the hunk, whose first character looks plausible. Still, it's most definitely a start. Signed-off-by: Mark Wooding <mdw@distorted.org.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'lt/diffgen' into nextJunio C Hamano2006-03-25
|\ | | | | | | | | | | | | * lt/diffgen: built-in diff: minimum tweaks builtin-diff: \No newline at end of file. Use a *real* built-in diff generator
| * built-in diff: minimum tweaksJunio C Hamano2006-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes up a couple of minor issues with the real built-in diff to be more usable: - Omit ---/+++ header unless we emit diff output; - Detect and punt binary diff like GNU does; - Honor GIT_DIFF_OPTS minimally (only -u<number> and --unified=<number> are currently supported); - Omit line count of 1 from "@@ -l,k +m,n @@" hunk header (i.e. when k == 1 or n == 1) - Adjust testsuite for the lack of -p support. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | tar-tree: Use the prefix field of a tar headerRene Scharfe2006-03-25
|/ | | | | | | | | | | | | | | | | ... to store parts of the path, if possible. This allows us to avoid writing extended headers in certain cases (long pathes can only be split at '/' chars). Also adds a file to the test repo with a 100 chars long directory name. Even old versions of tar that don't understand POSIX extended headers should be able to handle this testcase. Btw.: The longest path in the kernel tree currently has 70 chars. Together with a 30 chars long prefix this would already cross the field limit of 100 chars. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
* annotate-tests: override VISUAL when running tests.Mark Wooding2006-03-12
| | | | | | | | | The tests hang for me waiting for Emacs with its output directed somewhere strage, because I hedged my bets and set both EDITOR and VISUAL to run Emacs. Signed-off-by: Mark Wooding <mdw@distorted.org.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix t1200 test for breakage caused by removal of full-stop at the end of ↵Junio C Hamano2006-03-09
| | | | | | fast-forward message. Signed-off-by: Junio C Hamano <junkio@cox.net>
* repo-config: give value_ a sane default so regexec won't segfaultJonas Fonseca2006-03-07
| | | | | Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'sp/checkout'Junio C Hamano2006-03-06
|\ | | | | | | | | * sp/checkout: Add --temp and --stage=all options to checkout-index.
| * Add --temp and --stage=all options to checkout-index.Shawn Pearce2006-03-05
| | | | | | | | | | | | | | | | | | | | | | | | Sometimes it is convient for a Porcelain to be able to checkout all unmerged files in all stages so that an external merge tool can be executed by the Porcelain or the end-user. Using git-unpack-file on each stage individually incurs a rather high penalty due to the need to fork for each file version obtained. git-checkout-index -a --stage=all will now do the same thing, but faster. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | annotate-blame: tests incomplete lines.Junio C Hamano2006-03-06
| | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | annotate-blame test: add evil merge.Junio C Hamano2006-03-05
| | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | annotate-blame test: don't "source", but say "."Junio C Hamano2006-03-05
| | | | | | | | | | | | | | | | | | Just I am old fashioned. Source inclusion in bourne shell is "." (dot), not "source" -- that's csh. [jc: yes I know bash groks it, but I am old fashioned.] Signed-off-by: Junio C Hamano <junkio@cox.net>
* | annotate/blame tests updates.Junio C Hamano2006-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | This rewrites the result check code a bit. The earlier one using awk was splitting columns at any whitespace, which confused lines attributed incorrectly to the merge made by the default author "A U Thor <author@example.com>" with lines attributed to author "A". The latest test by Ryan to add the "starting from older commit" test is also included, with another older commit test. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | git-blame: Use the same tests for git-blame as for git-annotateFredrik Kuivinen2006-03-05
| | | | | | | | | | Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | gitignore: Ignore some more boring things.Mark Wooding2006-03-05
|/ | | | | Signed-off-by: Mark Wooding <mdw@distorted.org.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'lt/rev-list'Junio C Hamano2006-03-04
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | * lt/rev-list: setup_revisions(): handle -n<n> and -<n> internally. git-log (internal): more options. git-log (internal): add approxidate. Rip out merge-order and make "git log <paths>..." work again. Tie it all together: "git log" Introduce trivial new pager.c helper infrastructure git-rev-list libification: rev-list walking Splitting rev-list into revisions lib, end of beginning. rev-list split: minimum fixup. First cut at libifying revlist generation
| * Rip out merge-order and make "git log <paths>..." work again.Linus Torvalds2006-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Well, assuming breaking --merge-order is fine, here's a patch (on top of the other ones) that makes git log <filename> actually work, as far as I can tell. I didn't add the logic for --before/--after flags, but that should be pretty trivial, and is independent of this anyway. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | workaround fat/ntfs deficiencies for t3600-rm.sh (git-rm)Alex Riesen2006-03-03
| | | | | | | | | | Signed-off-by: Alex Riesen <ariesen@harmanbecker.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | git-mv: fix moves into a subdir from outsideJosef Weidendorfer2006-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git-mv needs to be run from the base directory so that the check if a file is under revision also covers files outside of a subdirectory. Previously, e.g. in the git repo, cd Documentation; git-mv ../README . produced the error Error: '../README' not under version control The test is extended for this case; it previously only tested one direction. Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>