path: root/t
AgeCommit message (Collapse)Author
2007-01-01git-svn: t/t91??-*: optimize the tests a bitEric Wong
This removes some unnecessary 'svn up' calls throughout * removed an 'svn log' call that was leftover from debugging * removed multiple git-svn calls with a multi-init / multi-fetch combination (which weren't tested before, either) * replaced `rev-list ... | head -n1` with `rev-parse ...` (not sure what I was thinking when I wrote that) All this saves about 9 seconds from a test run (53s -> 44s for 'make t91*') on my 1.3GHz Athlon Signed-off-by: Eric Wong <> Signed-off-by: Junio C Hamano <>
2007-01-01git-svn: t/t9100-git-svn-basic: remove old check for NO_SYMLINKEric Wong
We don't support the svn command-line client anymore; nor do we support anything before SVN 1.1.0, so we can be certain symlinks will be supported in the SVN repository. Signed-off-by: Eric Wong <> Signed-off-by: Junio C Hamano <>
2007-01-01git-svn: remove svnadmin dependency from the testsEric Wong
We require the libraries now, so we can create repositories using them (and save some executable load time while we're at it). Signed-off-by: Eric Wong <> Signed-off-by: Junio C Hamano <>
2006-12-31Add test case for update hooks in receive-pack.Shawn O. Pearce
Verify that the update hooks work as documented/advertised. This is a simple set of tests to check that the update hooks run with the parameters expected, have their STDOUT and STDERR redirected to the client side of the connection, and that their STDIN does not contain any data (as its actually /dev/null). Signed-off-by: Shawn O. Pearce <> Signed-off-by: Junio C Hamano <>
2006-12-31Teach Git how to parse standard power of 2 suffixes.Shawn O. Pearce
Sometimes its necessary to supply a value as a power of two in a configuration parameter. In this case the user may want to use the standard suffixes such as K, M, or G to indicate that the numerical value should be multiplied by a constant base before being used. Shell scripts/etc. can also benefit from this automatic option parsing with `git repo-config --int`. [jc: with a couple of test and a slight input tightening] Signed-off-by: Shawn O. Pearce <> Signed-off-by: Junio C Hamano <>
2006-12-30t3900: test log --encoding=noneJunio C Hamano
Signed-off-by: Junio C Hamano <>
2006-12-29Fix 'git add' with .gitignoreJunio C Hamano
When '*.ig' is ignored, and you have two files f.ig and d.ig/foo in the working tree, $ git add . correctly ignored f.ig but failed to ignore d.ig/foo. This was caused by a thinko in an earlier commit 4888c534, when we tried to allow adding otherwise ignored files. After reverting that commit, this takes a much simpler approach. When we have an unmatched pathspec that talks about an existing pathname, we know it is an ignored path the user tried to add, so we include it in the set of paths directory walker returned. This does not let you say "git add -f D" on an ignored directory D and add everything under D. People can submit a patch to further allow it if they want to, but I think it is a saner behaviour to require explicit paths to be spelled out in such a case. Signed-off-by: Junio C Hamano <>
2006-12-29Add info about new test families (8 and 9) to t/READMEJakub Narebski
Signed-off-by: Jakub Narebski <> Signed-off-by: Junio C Hamano <>
2006-12-29t5400 send-pack test: try a bit more nontrivial transfer.Junio C Hamano
Not that this reveals anything new, but I did test_tick shell function in test-lib and found it rather cute and nice. Signed-off-by: Junio C Hamano <>
2006-12-29Merge branch 'jc/utf8'Junio C Hamano
* jc/utf8: t3900: test conversion to non UTF-8 as well Rename t3900 test vector file UTF-8: introduce i18n.logoutputencoding. Teach log family --encoding i18n.logToUTF8: convert commit log message to UTF-8 Move encoding conversion routine out of mailinfo to utf8.c Conflicts: commit.c
2006-12-29GIT_SKIP_TESTS: allow users to omit tests that are known to breakJunio C Hamano
In some environments, certain tests have no way of succeeding due to platform limitation, such as lack of 'unzip' program, or filesystem that do not allow arbitrary sequence of non-NUL bytes as pathnames. You should be able to say something like $ cd t $ GIT_SKIP_TESTS=t9200.8 and even: $ GIT_SKIP_TESTS='t[0-4]??? t91?? t9200.8' make test to omit such tests. The value of the environment variable is a SP separated list of patterns that tells which tests to skip, and either can match the "t[0-9]{4}" part to skip the whole test, or t[0-9]{4} followed by ".$number" to say which particular test to skip. Note that some tests in the existing test suite rely on previous test item, so you cannot arbitrarily disable one and expect the remainder of test to check what the test originally was intended to check. Signed-off-by: Junio C Hamano <>
2006-12-29t3900: test conversion to non UTF-8 as wellJunio C Hamano
Signed-off-by: Junio C Hamano <>
2006-12-28xdl_merge(): fix a segmentation fault when refining conflictsJohannes Schindelin
The function xdl_refine_conflicts() tries to break down huge conflicts by doing a diff on the conflicting regions. However, this does not make sense when one side is empty. Worse, when one side is not only empty, but after EOF, the code accessed unmapped memory. Noticed by Luben Tuikov, Shawn Pearce and Alexandre Julliard, the latter providing a test case. Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
2006-12-28git-svn: remove non-delta fetch code pathsEric Wong
We have less code to worry about now. As a bonus, --revision can be used to reliably skip parts of history whenever fetch is run, not just the first time. I'm not sure why anybody would want to skip history in the middle, however... For people (nearly everyone at the moment) without the do_switch() function in their Perl SVN library, the entire tree must be refetched if --follow-parent is used and a parent is found. Future versions of SVN will have a working do_switch() function accessible via Perl. Accessing repositories on the local machine (especially file:// ones) is also slightly slower as a result; but I suspect most git-svn users will be using it to access remote repositories. Signed-off-by: Eric Wong <> Signed-off-by: Junio C Hamano <> quiet down commitEric Wong
Also, fixed an unportable use of 'export'. Signed-off-by: Eric Wong <> Signed-off-by: Junio C Hamano <>
2006-12-28test-lib: quiet down init-db output for testsEric Wong
I don't think anybody running tests needs to know they're running init-db and creating a repository for testing. Signed-off-by: Eric Wong <> Signed-off-by: Junio C Hamano <>
2006-12-28t6024-recursive-merge: quiet down this testEric Wong
We get an extra measure of error checking here as well. While we're at it, also removed a less portable use of export. Signed-off-by: Eric Wong <> Signed-off-by: Junio C Hamano <>
2006-12-28Rename t3900 test vector fileJunio C Hamano
It appears ISO-2022-JP is more widely accepted than ISO2022JP, so rename it that way. We probably would need to have a way to skip this test altogether in locale-challenged environments. Signed-off-by: Junio C Hamano <>
2006-12-28UTF-8: introduce i18n.logoutputencoding.Junio C Hamano
It is plausible for somebody to want to view the commit log in a different encoding from i18n.commitencoding -- the project's policy may be UTF-8 and the user may be using a commit message hook to run iconv to conform to that policy (and either not have i18n.commitencoding to default to UTF-8 or have it explicitly set to UTF-8). Even then, Latin-1 may be more convenient for the usual pager and the terminal the user uses. The new variable i18n.logoutputencoding is used in preference to i18n.commitencoding to decide what encoding to recode the log output in when git-log and friends formats the commit log message. Signed-off-by: Junio C Hamano <>
2006-12-27Merge branch 'master' into js/shallowJunio C Hamano
This is to adjust to: count-objects -v: show number of packs as well. which will break a test in this series. Signed-off-by: Junio C Hamano <>
2006-12-27git-svn: quiet down tests and fix some unportable shell constructsEric Wong
The latest changes to git-commit have made it more verbose; and I was running the setup of the tests outside of the test_expect_*, so errors in those were not caught. Now we move them to where they can be eval'ed and have their output trapped. export var=value has been removed Signed-off-by: Eric Wong <> Signed-off-by: Junio C Hamano <>
2006-12-25t3600: update the test for updated git rmJunio C Hamano
Signed-off-by: Junio C Hamano <>
2006-12-25Merge branch 'jc/skip-count'Junio C Hamano
* jc/skip-count: revision: --skip=<n>
2006-12-24Merge branch 'sb/merge-friendly'Junio C Hamano
* sb/merge-friendly: Display 'theirs' branch name when possible in merge. Use extended SHA1 syntax in merge-recursive conflicts.
2006-12-23Display 'theirs' branch name when possible in merge.Shawn O. Pearce
Displaying the SHA1 of 'their' branch (the branch being merged into the current branch) is not nearly as friendly as just displaying the name of that branch, especially if that branch is already local to this repository. git-merge now sets the environment variable 'GITHEAD_%(sha1)=%(name)' for each argument it gets passed, making the actual input name that resolved to the commit '%(sha1)' easily available to the invoked merge strategy. git-merge-recursive makes use of these environment variables when they are available by using '%(name)' whenever it outputs the commit identification rather than '%(sha1)'. This is most obvious in the conflict hunks created by xdl_merge: $ git mege sideb~1 <<<<<<< HEAD:INSTALL Good! ======= Oops. >>>>>>> sideb~1:INSTALL [jc: adjusted a test script and a minor constness glitch.] Signed-off-by: Shawn O. Pearce <> Signed-off-by: Junio C Hamano <>
2006-12-22Add a test for git-rerereJohannes Schindelin
Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
2006-12-21Merge branch 'ew/svn-pm'Junio C Hamano
* ew/svn-pm: git-svn: rename 'commit' command to 'set-tree' git-svn: remove support for the svn command-line client git-svn: convert to using
2006-12-20revision: --skip=<n>Junio C Hamano
This adds --skip=<n> option to revision traversal machinery. Documentation and test were added by Robert Fitzsimons. Signed-off-by: Robert Fitzsimons <> Signed-off-by: Junio C Hamano <>
2006-12-19Do not create $GIT_DIR/remotes/ directory anymore.Junio C Hamano
Because we do not use --no-separate-remote anymore, there is no reason to create that directory from the template. t5510 test is updated to test both $GIT_DIR/remotes/ based configuration and $GIT_DIR/config variable (credits to Johannes). Signed-off-by: Junio C Hamano <>
2006-12-19Introduce GIT_TEMPLATE_DIRJohannes Schindelin
Instead of passing --template explicitely to init-db and clone, you can just set the environment variable GIT_TEMPLATE_DIR. Also make use of it in the tests, to make sure that the templates are copied. Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
2006-12-19Revert "fix testsuite: make sure they use templates freshly built from the ↵Junio C Hamano
source" This reverts commit 74d20040cafdced657efbf49795183d209a3a07b. Version from Johannes to introduce GIT_TEMPLATE_DIR is simpler, although I unconsciously stayed away from introducing yet another environment variable.
2006-12-19fix testsuite: make sure they use templates freshly built from the sourceJunio C Hamano
The initial t/trash repository for testing was created properly but over time we gained many tests that create secondary test repositories with init-db or clone and they were not careful enough. This fixes it. Signed-off-by: Junio C Hamano <>
2006-12-18Merge branch 'js/branch-config'Junio C Hamano
* js/branch-config: git-branch: rename config vars branch.<branch>.*, too add a function to rename sections in the config
2006-12-17Fix check_file_directory_conflict().Junio C Hamano
When replacing an existing file A with a directory A that has a file A/B in it in the index, 'update-index --replace --add A/B' did not properly remove the file to make room for the new directory. There was a trivial logic error, most likely a cut & paste one, dating back to quite early days of git. Signed-off-by: Junio C Hamano <>
2006-12-16git-branch: rename config vars branch.<branch>.*, tooJohannes Schindelin
When renaming a branch, the corresponding config section should be renamed, too. Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
2006-12-16add a function to rename sections in the configJohannes Schindelin
Given a config like this: # A config [very.interesting.section] not The command $ git repo-config --rename-section very.interesting.section bla.1 will lead to this config: # A config [bla "1"] not Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
2006-12-16git-svn: rename 'commit' command to 'set-tree'Eric Wong
'set-tree' probably accurately describes what the command formerly known as 'commit' does. I'm not entirely sure that 'dcommit' should be renamed to 'commit' just yet... Perhaps 'push' or 'push-changes'? Signed-off-by: Eric Wong <> Signed-off-by: Junio C Hamano <>
2006-12-16git-svn: remove support for the svn command-line clientEric Wong
Using the command-line client was great for prototyping and getting something working quickly. Eventually I found time to study the library documentation and add support for using the libraries which are much faster and more flexible when it comes to supporting new features. Note that we require version 1.1 of the SVN libraries, whereas we supported the command-line svn client down to version 1.0. Signed-off-by: Eric Wong <> Signed-off-by: Junio C Hamano <>
2006-12-16Add --add option to git-repo-configBrian Gernhardt
For multivars, the "git-repo-config name value ^$" is useful but nonintuitive and troublesome to do repeatedly (since the value is not at the end of the command line). This commit simply adds an --add option that adds a new value to a multivar. Particularly useful for tracking a new branch on a remote: git-repo-config --add remote.origin.fetch +next:origin/next Includes documentation and test. Signed-off-by: Brian Gernhardt <> Signed-off-by: Junio C Hamano <>
2006-12-16Enable reflogs by default in any repository with a working directory.Shawn O. Pearce
New and experienced Git users alike are finding out too late that they forgot to enable reflogs in the current repository, and cannot use the information stored within it to recover from an incorrectly entered command such as `git reset --hard HEAD^^^` when they really meant HEAD^^ (aka HEAD~2). So enable reflogs by default in all future versions of Git, unless the user specifically disables it with: [core] logAllRefUpdates = false in their .git/config or ~/.gitconfig. We only enable reflogs in repositories that have a working directory associated with them, as shared/bare repositories do not have an easy means to prune away old log entries, or may fail logging entirely if the user's gecos information is not valid during a push. This heuristic was suggested on the mailing list by Junio. Documentation was also updated to indicate the new default behavior. We probably should start to teach usuing the reflog to recover from mistakes in some of the tutorial material, as new users are likely to make a few along the way and will feel better knowing they can recover from them quickly and easily, without fsck-objects' lost+found features. Signed-off-by: Shawn O. Pearce <> Signed-off-by: Junio C Hamano <>
2006-12-16make commit message a little more consistent and confortingNicolas Pitre
It is nicer to let the user know when a commit succeeded all the time, not only the first time. Also the commit sha1 is much more useful than the tree sha1 in this case. This patch also introduces a -q switch to supress this message as well as the summary of created/deleted files. Signed-off-by: Nicolas Pitre <> Signed-off-by: Junio C Hamano <>
2006-12-13Merge branch 'jc/read-tree-ignore'Junio C Hamano
* jc/read-tree-ignore: read-tree: document --exclude-per-directory Loosen "working file will be lost" check in Porcelain-ish read-tree: further loosen "working file will be lost" check.
2006-12-13Merge branch 'lh/branch-rename'Junio C Hamano
* lh/branch-rename: git-branch: let caller specify logmsg rename_ref: use lstat(2) when testing for symlink git-branch: add options and tests for branch renaming Conflicts: builtin-branch.c
2006-12-13Merge branch 'rr/cvsexportcommit'Junio C Hamano
* rr/cvsexportcommit: Make cvsexportcommit work with filenames with spaces and non-ascii characters.
2006-12-13Merge branch 'js/merge'Junio C Hamano
* js/merge: merge-recursive: add/add really is modify/modify with an empty base Get rid of the dependency on RCS' merge program merge-file: support -p and -q; fix compile warnings Add builtin merge-file, a minimal replacement for RCS merge xdl_merge(): fix and simplify conflict handling xdl_merge(): fix thinko xdl_merge(): fix an off-by-one bug merge-recursive: use xdl_merge(). xmerge: make return value from xdl_merge() more usable. xdiff: add xdl_merge()
2006-12-13Remove uncontested renamed files during merge.Shawn Pearce
Prior to 65ac6e9c3f47807cb603af07a6a9e1a43bc119ae we deleted a file from the working directory during a merge if the file existed before the merge started but was renamed by the branch being merged in. This broke in 65ac6e as git-merge-recursive did not actually update the working directory on an uncontested rename. Signed-off-by: Shawn O. Pearce <> Signed-off-by: Junio C Hamano <>
2006-12-13merge-recursive: add/add really is modify/modify with an empty baseJohannes Schindelin
Unify the handling for cases C (add/add) and D (modify/modify). Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
2006-12-13Merge branch 'master' into js/mergeJunio C Hamano
* master: (42 commits) git-svn: correctly handle packed-refs in refs/remotes/ add test case for recursive merge git-svn: correctly display fatal() error messages git-svn: allow dcommit to take an alternate head git-svn: enable logging of information not supported by git Clarify fetch error for missing objects. Move Fink and Ports check to after config file shortlog: fix segfault on empty authorname shortlog: remove "[PATCH]" prefix from shortlog output Make sure the empty tree exists when needed in merge-recursive. Don't use memcpy when source and dest. buffers may overlap no need to install manpages as executable Documentation: simpler shared repository creation shortlog: fix segfault on empty authorname Add branch.*.merge warning and documentation update Fix perl/ build. git-svn: use do_switch for --follow-parent if the SVN library supports it Fix documentation copy&paste typo git-svn: extra error check to ensure we open a file correctly Documentation: update git-clone man page with new behavior ...
2006-12-13Get rid of the dependency on RCS' merge programJohannes Schindelin
Now that we have git-merge-file, an RCS merge lookalike, we no longer need it. So long, merge, and thanks for all the fish! Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
2006-12-13add test case for recursive mergeJunio C Hamano
This test case is based on the bug report by Shawn Pearce. Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>