summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)Author
2006-04-17Makefile fixups.A Large Angry SCM
Signed-off-by: A Large Angry SCM <gitzilla@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-14t5500: test fixJunio C Hamano
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>
2006-04-13t3600-rm: skip failed-remove test when we cannot make an unremovable file.Junio C Hamano
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>
2006-04-11Retire t5501-old-fetch-and-upload test.Junio C Hamano
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-28xdiff: Show function names in hunk headers.Mark Wooding
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>
2006-03-26Merge branch 'lt/diffgen' into nextJunio C Hamano
* lt/diffgen: built-in diff: minimum tweaks builtin-diff: \No newline at end of file. Use a *real* built-in diff generator
2006-03-26built-in diff: minimum tweaksJunio C Hamano
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>
2006-03-26tar-tree: Use the prefix field of a tar headerRene Scharfe
... 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>
2006-03-12annotate-tests: override VISUAL when running tests.Mark Wooding
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>
2006-03-10Fix t1200 test for breakage caused by removal of full-stop at the end of ↵Junio C Hamano
fast-forward message. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-08repo-config: give value_ a sane default so regexec won't segfaultJonas Fonseca
Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-07Merge branch 'sp/checkout'Junio C Hamano
* sp/checkout: Add --temp and --stage=all options to checkout-index.
2006-03-06annotate-blame: tests incomplete lines.Junio C Hamano
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-06annotate-blame test: add evil merge.Junio C Hamano
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-06annotate-blame test: don't "source", but say "."Junio C Hamano
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>
2006-03-06annotate/blame tests updates.Junio C Hamano
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>
2006-03-06git-blame: Use the same tests for git-blame as for git-annotateFredrik Kuivinen
Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-05gitignore: Ignore some more boring things.Mark Wooding
Signed-off-by: Mark Wooding <mdw@distorted.org.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-05Add --temp and --stage=all options to checkout-index.Shawn Pearce
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>
2006-03-04Merge branch 'lt/rev-list'Junio C Hamano
* 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
2006-03-03workaround fat/ntfs deficiencies for t3600-rm.sh (git-rm)Alex Riesen
Signed-off-by: Alex Riesen <ariesen@harmanbecker.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-03git-mv: fix moves into a subdir from outsideJosef Weidendorfer
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>
2006-03-03Fix test case for some sedJohannes Schindelin
Some versions of sed lack the "-i" option. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-02annotate: Add a basic set of test cases.Ryan Anderson
Signed-off-by: Ryan Anderson <ryan@michonline.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-01Rip out merge-order and make "git log <paths>..." work again.Linus Torvalds
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>
2006-02-23git-rm: Fix to properly handle files with spaces, tabs, newlines, etc.Carl Worth
New tests are added to the git-rm test case to cover this as well. Signed-off-by: Carl Worth <cworth@cworth.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-23Add new git-rm command with documentationCarl Worth
This adds a git-rm command which provides convenience similar to git-add, (and a bit more since it takes care of the rm as well if given -f). Like git-add, git-rm expands the given path names through git-ls-files. This means it only acts on files listed in the index. And it does act recursively on directories by default, (no -r needed as in the case of rm itself). When it recurses, it does not remove empty directories that are left behind. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-22Merge branch 'fix'Junio C Hamano
* fix: git-push: Update documentation to describe the no-refspec behavior. format-patch: pretty-print timestamp correctly. git-add: Add support for --, documentation, and test.
2006-02-22Merge branch 'js/portable'Junio C Hamano
* js/portable: Fix "gmake -j" Really honour NO_PYTHON avoid makefile override warning Fixes for ancient versions of GNU make
2006-02-22git-ls-files: Fix, document, and add test for --error-unmatch option.Carl Worth
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-22New test to verify that when git-clone fails it cleans up the new directory.Carl Worth
Signed-off-by: Carl Worth <cworth@cworth.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-22git-add: Add support for --, documentation, and test.Carl Worth
This adds support to git-add to allow the common -- to separate command-line options and file names. It adds documentation and a new git-add test case as well. [jc: this should apply to 1.2.X maintenance series, so I reworked git-ls-files --error-unmatch test. ] Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-21Merge part of jc/portable branchJunio C Hamano
2006-02-19Fixes for ancient versions of GNU makeJohannes Schindelin
Some versions of GNU make do not understand $(call), and have problems to interpret rules like this: some_target: CFLAGS += -Dsome=defs [jc: simplified substitution a bit. ] Signed-off-by: Johannes E. Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-19Optionally work without pythonJohannes Schindelin
In some setups (notably server setups) you do not need that dependency. Gracefully handle the absence of python when NO_PYTHON is defined. Signed-off-by: Johannes E. Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-18Make git-reset delete empty directoriesShawn Pearce
When git-reset --hard is used and a subdirectory becomes empty (as it contains no tracked files in the target tree) the empty subdirectory should be removed. This matches the behavior of git-checkout-index and git-read-tree -m which would not have created the subdirectory or would have deleted it when updating the working directory. Subdirectories which are not empty will be left behind. This may happen if the subdirectory still contains object files from the user's build process (for example). [jc: simplified the logic a bit, while keeping the test script.]
2006-02-18Abstract test_create_repo out for use in tests.Carl Worth
Signed-off-by: Carl Worth <cworth@cworth.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-12avoid echo -e, there are systems where it does not workAlex Riesen
FreeBSD 4.11 being one example: the built-in echo doesn't have -e, and the installed /bin/echo does not do "-e" as well. "printf" works, laking just "\e" and "\xAB'. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-12fix "test: 2: unexpected operator" on bsdAlex Riesen
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-12t5500: adjust to change in pack-object reporting behaviour.Junio C Hamano
Now pack-object is not as chatty when its stderr is not connected to a terminal, so the test needs to be adjusted for that. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-11Define GIT_(AUTHOR|COMMITTER)_(NAME|EMAIL) to known values.Junio C Hamano
Without these, running tests with an account with empty gecos field would fail. We might want to loosen error from "git-var -l" (but not "git-var GIT_AUTHOR_NAME") later, but that is more or less an independent issue. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-09t6000: fix a careless test library add-on.Junio C Hamano
It tried to "restore" GIT_AUTHOR_EMAIL environment variable but the variable started out as unset, so ended up setting it to an empty string. This is now caught as an error. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-07git-commit: revamp the git-commit semantics.Junio C Hamano
- "git commit" without _any_ parameter keeps the traditional behaviour. It commits the current index. We commit the whole index even when this form is run from a subdirectory. - "git commit --include paths..." (or "git commit -i paths...") is equivalent to: git update-index --remove paths... git commit - "git commit paths..." acquires a new semantics. This is an incompatible change that needs user training, which I am still a bit reluctant to swallow, but enough people seem to have complained that it is confusing to them. It 1. refuses to run if $GIT_DIR/MERGE_HEAD exists, and reminds trained git users that the traditional semantics now needs -i flag. 2. refuses to run if named paths... are different in HEAD and the index (ditto about reminding). Added paths are OK. 3. reads HEAD commit into a temporary index file. 4. updates named paths... from the working tree in this temporary index. 5. does the same updates of the paths... from the working tree to the real index. 6. makes a commit using the temporary index that has the current HEAD as the parent, and updates the HEAD with this new commit. - "git commit --all" can run from a subdirectory, but it updates the index with all the modified files and does a whole tree commit. - In all cases, when the command decides not to create a new commit, the index is left as it was before the command is run. This means that the two "git diff" in the following sequence: $ git diff $ git commit -a $ git diff would show the same diff if you abort the commit process by making the commit log message empty. This commit also introduces much requested --author option. $ git commit --author 'A U Thor <author@example.com>' Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-25tests: adjust breakage by stricter rev-parseJunio C Hamano
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-22t4011: "sleep 1" is not enough on FATJunio C Hamano
This test depended on "sleep 1" to be enough to dirty the index entry for a symlink. Alex noticed that on his Cygwin installation "sleep 1" was sometimes not enough, and after further discussion with Christopher Faylor, it was brought up that on FAT filesystem timestamp granularity is 2 seconds so sleeping 1 second is not enough. For now this patch takes an easy workaround of sleeping for 3 seconds. Very strictly speaking, POSIX requires lstat to fill only S_IFMT part of st_mode and st_size for symlinks, and depending on timestamp might be considered a bug, but we depend on that anyway, so it is better to test that. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-15show-branch: make the current branch and merge commits stand out.Junio C Hamano
This changes the character used to mark the commits that is on the branch from '+' to '*' for the current branch, to make it stand out. Also we show '-' for merge commits. When you have a handful branches with relatively long diversion, it is easier to see which one is the current branch this way. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-14GIT 1.1.2v1.1.2Junio C Hamano
2006-01-11name-rev: do not omit leading components of ref name.Junio C Hamano
In a repository with mainto/1.0 (to keep maintaining the 1.0.X series) and fixo/1.0 (to keep fixes that apply to both 1.0.X series and upwards) branches, "git-name-rev mainto/1.0" answered just "1.0" making things ambiguous. Show refnames unambiguously like show-branch does. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-08GIT 1.1.0v1.1.0Junio C Hamano
2006-01-08Add a test for rebase when a change was picked upstreamYann Dirson
This test exercises the standard feature that makes rebase useful. Signed-off-by: Yann Dirson <ydirson@altern.org> Signed-off-by: Junio C Hamano <junkio@cox.net>