summaryrefslogtreecommitdiff
path: root/t
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'lt/rev-list'Junio C Hamano2006-03-041-462/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-011-462/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-031-6/+17
| | | | | | | | | | 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-031-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Fix test case for some sedJohannes Schindelin2006-03-021-1/+2
| | | | | | | | | | | | | | 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>
* | annotate: Add a basic set of test cases.Ryan Anderson2006-03-011-0/+89
|/ | | | | Signed-off-by: Ryan Anderson <ryan@michonline.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-rm: Fix to properly handle files with spaces, tabs, newlines, etc.Carl Worth2006-02-221-17/+35
| | | | | | | 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>
* Add new git-rm command with documentationCarl Worth2006-02-221-0/+42
| | | | | | | | | | | | | | 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>
* Merge branch 'fix'Junio C Hamano2006-02-221-0/+22
|\ | | | | | | | | | | | | * 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.
| * git-add: Add support for --, documentation, and test.Carl Worth2006-02-211-0/+22
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'js/portable'Junio C Hamano2006-02-211-5/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | * js/portable: Fix "gmake -j" Really honour NO_PYTHON avoid makefile override warning Fixes for ancient versions of GNU make
| * | Fixes for ancient versions of GNU makeJohannes Schindelin2006-02-181-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | git-ls-files: Fix, document, and add test for --error-unmatch option.Carl Worth2006-02-211-0/+27
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | New test to verify that when git-clone fails it cleans up the new directory.Carl Worth2006-02-211-0/+36
| | | | | | | | | | | | | | | Signed-off-by: Carl Worth <cworth@cworth.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge part of jc/portable branchJunio C Hamano2006-02-215-1/+19
|\ \ \ | |/ / | | / | |/ |/|
| * Optionally work without pythonJohannes Schindelin2006-02-185-1/+19
| | | | | | | | | | | | | | | | 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>
* | Make git-reset delete empty directoriesShawn Pearce2006-02-171-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.]
* | Abstract test_create_repo out for use in tests.Carl Worth2006-02-171-6/+17
|/ | | | | Signed-off-by: Carl Worth <cworth@cworth.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* avoid echo -e, there are systems where it does not workAlex Riesen2006-02-121-1/+1
| | | | | | | | 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>
* fix "test: 2: unexpected operator" on bsdAlex Riesen2006-02-121-1/+1
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* t5500: adjust to change in pack-object reporting behaviour.Junio C Hamano2006-02-111-1/+1
| | | | | | | 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>
* Define GIT_(AUTHOR|COMMITTER)_(NAME|EMAIL) to known values.Junio C Hamano2006-02-101-4/+6
| | | | | | | | | | | 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>
* t6000: fix a careless test library add-on.Junio C Hamano2006-02-081-1/+6
| | | | | | | | 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>
* git-commit: revamp the git-commit semantics.Junio C Hamano2006-02-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - "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>
* tests: adjust breakage by stricter rev-parseJunio C Hamano2006-01-251-2/+2
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* t4011: "sleep 1" is not enough on FATJunio C Hamano2006-01-211-1/+1
| | | | | | | | | | | | | | | | | 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>
* show-branch: make the current branch and merge commits stand out.Junio C Hamano2006-01-151-3/+3
| | | | | | | | | | | 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>
* GIT 1.1.2v1.1.2Junio C Hamano2006-01-131-3/+3
|\
| * name-rev: do not omit leading components of ref name.Junio C Hamano2006-01-111-3/+3
| | | | | | | | | | | | | | | | | | | | 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>
* | GIT 1.1.0v1.1.0Junio C Hamano2006-01-081-1/+1
|\ \ | |/
| * Fix typo in debug stanza of t2001Yann Dirson2006-01-071-1/+1
| | | | | | | | | | Signed-off-by: Yann Dirson <ydirson@altern.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Add a test for rebase when a change was picked upstreamYann Dirson2006-01-081-0/+53
| | | | | | | | | | | | | | 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>
* | Add a minimal test for git-cherryYann Dirson2006-01-081-0/+53
| | | | | | | | | | | | | | | | | | | | | | This test checks that git-cherry finds the expected number of patches in two simple cases, and then tests the new limit arguments. [jc: collapsed two patches into one and added sleep to make sure the two commits would get different timestamps] Signed-off-by: Yann Dirson <ydirson@altern.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | ls-files --others --directory: testJunio C Hamano2006-01-071-6/+28
| | | | | | | | | | | | Add a test to run with --directory option. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge fixes up to GIT 1.0.7Junio C Hamano2006-01-056-18/+44
|\ \ | |/ | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * t3300: skip when filesystem does not like TAB in filenames.Junio C Hamano2006-01-051-3/+6
| | | | | | | | | | | | | | Instead of checking Cygwin explicitly, see if the filesystem lets us create funny filenames. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * trivial: check, if t/trash directory was successfully createdAlex Riesen2006-01-051-1/+1
| | | | | | | | | | | | | | | | and was successfully entered. Otherwise git-init-db will create it directly in the working directory (t/) which can be dangerous. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * trivial: use git-repo-config to detect how to run tests in the test repositoryAlex Riesen2006-01-052-7/+22
| | | | | | | | | | Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * trivial: use git-repo-config to detect if the test can be run on the repositoryAlex Riesen2006-01-051-0/+8
| | | | | | | | | | Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Fix skipping merge-order test with NO_OPENSSL=1.Gerrit Pape2005-12-281-7/+7
| | | | | | | | | | | | | | | | | | | | Move git-rev-list --merge-order usage check for 'OpenSSL not linked' after test 1; we cannot trigger this unless we try to actually use --merge-order by giving some ref, and we do not have any ref until we run the first test to create commits. Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge fixes up to GIT 1.0.6Junio C Hamano2005-12-273-3/+3
|\ \ | |/
| * Fix bogus tests on rev-list output.Junio C Hamano2005-12-272-2/+2
| | | | | | | | | | | | | | | | | | | | | | These tests seem to mean checking the output with expected result, but was not doing its handrolled test helper function. Also fix the guard to workaround wc output that have whitespace padding, which was broken but not exposed because the test was not testing it ;-). Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Guard a test against wc that pads its output with whitespaceJunio C Hamano2005-12-271-1/+1
| | | | | | | | | | | | Spotted by Johannes. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge fixes up to GIT 1.0.5Junio C Hamano2005-12-262-1/+92
|\ \ | |/
| * Handle symlinks graciouslyJohannes Schindelin2005-12-261-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | This patch converts a stat() to an lstat() call, thereby fixing the case when the date of a symlink was not the same as the one recorded in the index. The included test case demonstrates this. This is for the case that the symlink points to a non-existing file. If the file exists, worse things than just an error message happen. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * t5300: avoid false failures.Junio C Hamano2005-12-261-1/+7
| | | | | | | | | | | | | | | | | | Johannes found that the test has 1/256 chance of falsely producing an uncorrupted idx file, causing the check to detect corruption fail. Now we have 1/2^160 chance of false failure ;-). Signed-off-by: Junio C Hamano <junkio@cox.net>
| * check_packed_git_idx(): check integrity of the idx file itself.Junio C Hamano2005-12-231-0/+7
| | | | | | | | | | | | | | | | | | | | | | Although pack-check.c had routine to verify the checksum for the pack index file itself, the core did not check it before using it. This is stolen from the patch to tighten packname requirements. Signed-off-by: Junio C Hamano <junkio@cox.net> (cherry picked from 797bd6f490c91c07986382b9f268e0df712cb246 commit)
* | check_packed_git_idx(): check integrity of the idx file itself.Junio C Hamano2005-12-221-0/+7
| | | | | | | | | | | | | | | | | | | | Although pack-check.c had routine to verify the checksum for the pack index file itself, the core did not check it before using it. This is stolen from the patch to tighten packname requirements. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | merge-recursive: conflicting rename case.Junio C Hamano2005-12-211-0/+37
|/ | | | | | | | | | | | | | | | This changes the way the case two branches rename the same path to different paths is handled. Earlier, the code removed the original path and added both destinations to the index at stage0. This commit changes it to leave the original path at stage1, and two destination paths at stage2 and stage3, respectively. [jc: I am not really sure if this makes much difference in the real life merge situations. What should happen when our branch renames A to B and M to N, while their branch renames A to M? That is, M remains in our tree as is.] Signed-off-by: Junio C Hamano <junkio@cox.net>
* Racy GIT (part #2)Junio C Hamano2005-12-201-4/+13
| | | | | | | | | The previous round caught the most trivial case well, but broke down once index file is updated again. Smudge problematic entries (they should be very few if any under normal interactive workflow) before writing a new index file out. Signed-off-by: Junio C Hamano <junkio@cox.net>