summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)Author
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 <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
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 <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
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 <junkio@cox.net>
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 <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-25t3600: update the test for updated git rmJunio C Hamano
Signed-off-by: Junio C Hamano <junkio@cox.net>
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 <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-22Add a test for git-rerereJohannes Schindelin
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
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 Git.pm
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 <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
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 <junkio@cox.net>
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 <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
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 <junkio@cox.net>
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 <junkio@cox.net>
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 <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
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 <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
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 <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
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 <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
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 <benji@silverinsanity.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
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 <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
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 <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
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 <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
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 <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
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 <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
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 <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-11Make cvsexportcommit work with filenames with spaces and non-ascii characters.Robin Rosenberg
This patch uses git-apply to do the patching which simplifies the code a lot and also uses one pass to git-diff. git-apply gives information on added, removed files as well as which files are binary. Removed the test for checking for matching binary files when deleting them since git-apply happily deletes the file. This is matter of taste since we allow some fuzz for text patches also. Error handling was cleaned up, but not much tested. Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-06Add builtin merge-file, a minimal replacement for RCS mergeJohannes Schindelin
merge-file has the same syntax as RCS merge, but supports only the "-L" option. For good measure, a test is added, which is quite minimal, though. [jc: further fix for compliation errors included.] Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-06rename_ref: use lstat(2) when testing for symlinkLars Hjemli
The current check for symlinked reflogs was based on stat(2), which is utterly embarrassing. Fix it, and add a matching testcase. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-06git-branch: add options and tests for branch renamingLars Hjemli
Extend git-branch with the following options: git-branch -m|-M [<oldbranch>] newbranch The -M variation is required to force renaming over an exsisting branchname. This also indroduces $GIT_DIR/RENAME_REF which is a "metabranch" used when renaming branches. It will always hold the original sha1 for the latest renamed branch. Additionally, if $GIT_DIR/logs/RENAME_REF exists, all branch rename events are logged there. Finally, some testcases are added to verify the new options. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-06read-tree: further loosen "working file will be lost" check.Junio C Hamano
This follows up commit ed93b449 where we removed overcautious "working file will be lost" check. A new option "--exclude-per-directory=.gitignore" can be used to tell the "git-read-tree" command that the user does not mind losing contents in untracked files in the working tree, if they need to be overwritten by a merge (either a two-way "switch branches" merge, or a three-way merge). Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-05diff -b: ignore whitespace at end of lineJohannes Schindelin
This is _not_ the same as "treat eol as whitespace", since that would mean that multiple empty lines would be treated as equal to e.g. a space. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-05Merge branch 'maint'Junio C Hamano
* maint: receive-pack: do not insist on fast-forward outside refs/heads/ git-mv: search more precisely for source directory in index Conflicts: receive-pack.c
2006-12-04Set permissions of each new file before "cvs add"ing it.Jim Meyering
Otherwise, an executable script in git would end up being checked into the CVS repository without the execute bit. [jc: with an additional test script from Robin Rosenberg.] Signed-off-by: Jim Meyering <jim@meyering.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-04git-mv: search more precisely for source directory in indexJohannes Schindelin
A move of a directory should find the entries in the index by searching for the name _including_ the slash. Otherwise, the directory can be shadowed by a file when it matches the prefix and is lexicographically smaller, e.g. "ab.c" shadows "ab/". Noticed by Sergey Vlasov. [jc: added Sergey's original reproduction recipe as a test case at the end of t7001.] Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-28git-svn: update tests for recent changesEric Wong
* Enable test for delta transfers in full-svn-test. * Run tests against the root of the repository so we won't have to revisit 308906fa6e98132cab839a4f42701386fba368ef and efe4631def181d32f932672a7ea31e52ee0ab308 again. The graft-branches test still runs as before. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-27Merge branch 'jc/push-delete-ref'Junio C Hamano
* jc/push-delete-ref: Allow git push to delete remote ref.
2006-11-27Merge branch 'jc/merge'Junio C Hamano
* branch 'jc/merge': git-merge: do not leak rev-parse output used for checking internally. git-merge: tighten error checking. merge: allow merging into a yet-to-be-born branch. git-merge: make it usable as the first class UI remove merge-recursive-old
2006-11-24add tests for shallow stuffJohannes Schindelin
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-24Allow git push to delete remote ref.Junio C Hamano
This allows you to say git send-pack $URL :refs/heads/$branch to delete the named remote branch. The refspec $src:$dst means replace the destination ref with the object known as $src on the local side, so this is a natural extension to make an empty $src mean "No object" to delete the target. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-24config option log.showroot to show the diff of root commitsPeter Baumann
This allows one to see a root commit as a diff in commands like git-log, git-show and git-whatchanged. Signed-off-by: Peter Baumann <Peter.B.Baumannn@stud.informatik.uni-erlangen.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-23trust-executable-bit: fix breakage for symlinksJunio C Hamano
An earlier commit f28b34a broke symlinks when trust-executable-bit is not set because it incorrectly assumed that everything was a regular file. Reported by Juergen Ruehle. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-22remove merge-recursive-oldJunio C Hamano
This frees the Porcelain-ish that comes with the core Python-free. Signed-off-by: Junio C Hamano <junkio@cox.net>