summaryrefslogtreecommitdiff
path: root/contrib
AgeCommit message (Collapse)AuthorFilesLines
2006-11-05Remove more sed invocations from within bash completion.Libravatar Shawn O. Pearce1-7/+7
This change removes between 1 and 4 sed invocations per completion entered by the user. In the case of cat-file the 4 invocations per completion can take a while on Cygwin; running these replacements directly within bash saves some time for the end user. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-05Support bash completion on symmetric difference operator.Libravatar Shawn O. Pearce1-3/+8
Now that log, whatchanged, rev-list, etc. support the symmetric difference operator '...' we should provide bash completion for it just like we do for '..'. While we are at it we can remove two sed invocations during the interactive prompt and replace them with internal bash operations. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-05Take --git-dir into consideration during bash completion.Libravatar Shawn O. Pearce1-53/+70
If the user has setup a command line of "git --git-dir=baz" then anything we complete must be performed within the scope of "baz" and not the current working directory. This is useful with commands such as "git --git-dir=git.git log m" to complete out "master" and view the log for the master branch of the git.git repository. As a nice side effect this also works for aliases within the target repository, just as git would honor them. Unfortunately because we still examine arguments by absolute position in most of the more complex commands (e.g. git push) using --git-dir with those commands will probably still cause completion to fail. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-05Bash completion support for remotes in .git/config.Libravatar Shawn O. Pearce1-5/+21
Now that Git natively supports remote specifications within the config file such as: [remote "origin"] url = ... we should provide bash completion support "out of the box" for these remotes, just like we do for the .git/remotes directory. Also cleaned up the __git_aliases expansion to use the same form of querying and filtering repo-config as this saves two fork/execs in the middle of a user prompted completion. Finally also forced the variable 'word' to be local within __git_aliased_command. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-05Only load .exe suffix'd completions on Cygwin.Libravatar Shawn O. Pearce1-0/+2
The only platform which actually needs to define .exe suffixes as part of its completion set is Cygwin. So don't define them on any other platform. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-05Added missing completions for show-branch and merge-base.Libravatar Shawn O. Pearce1-0/+4
The show-branch and merge-base commands were partially supported when it came to bash completions as they were only specified in one form another. Now we specify them in both forms. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-04Added bash completion support for git-reset.Libravatar Shawn O. Pearce1-0/+9
Completion for the --hard/--soft/--mixed modes of operation as well as a ref name for <commit-ish> can be very useful and save some fingers. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-04Added completion support for git-branch.exe.Libravatar Shawn O. Pearce1-0/+1
On Cygwin a user might complete the new git-branch builtin as git-branch.exe, at which point bash requires a new completion registration for the command. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-04git.el: Include MERGE_MSG in the log-edit buffer even when not committing a ↵Libravatar Alexandre Julliard1-1/+2
merge. This lets us take advantage of the fact that git-cherry-pick now saves the message in MERGE_MSG too. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-04git.el: Move point after the log message header when entering log-edit mode.Libravatar Alexandre Julliard1-1/+2
Suggested by Han-Wen Nienhuys. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-04git.el: Added a function to open the current file in another window.Libravatar Alexandre Julliard1-0/+10
Bound to 'o' by default, compatible with pcl-cvs and buffer-mode. Suggested by Han-Wen Nienhuys. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-04git.el: Added functions for moving to the next/prev unmerged file.Libravatar Alexandre Julliard1-0/+28
This is useful when doing a merge that changes many files with only a few conflicts here and there. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-28Bash completion support for aliasesLibravatar Dennis Stosberg1-2/+27
- Add aliases to the list of available git commands. - Make completion work for aliased commands. Signed-off-by: Dennis Stosberg <dennis@stosberg.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-23ignore-errors requires clLibravatar Karl Hasselström1-0/+2
vc-git complains that it can't find the definition of ignore-errors unless I (require 'cl). So I guess the correct place to do that is in the file itself. Signed-off-by: Karl Hasselström <kha@treskal.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-22git-vc: better installation instructionsLibravatar Karl Hasselström1-1/+4
Provide some more detailed installation instructions, for the elisp-challenged among us. Signed-off-by: Karl Hasselström <kha@treskal.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-05vc-git.el: Switch to using git-blame instead of git-annotate.Libravatar Alexandre Julliard1-2/+2
Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-05git.el: Fixed inverted "renamed from/to" message.Libravatar Alexandre Julliard1-2/+2
The deleted file should be labeled "renamed to" and the added file "renamed from", not the other way around (duh!) Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-28Contributed bash completion support for core Git tools.Libravatar Junio C Hamano1-0/+324
This is a set of bash completion routines for many of the popular core Git tools. I wrote these routines from scratch after reading the git-compl and git-compl-lib routines available from the gitcompletion package at http://gitweb.hawaga.org.uk/ and found those to be lacking in functionality for some commands. Consequently there may be some similarities but many differences. Since these are completion routines only for tools shipped with core Git and since bash is a popular shell on many of the native core Git platforms (Linux, Mac OS X, Solaris, BSD) including these routines as part of the stock package would probably be convienent for many users. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-13contrib/vim: add syntax highlighting file for commitsLibravatar Jeff King2-0/+26
Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-25gitview.txt: improve asciidoc markupLibravatar Jonas Fonseca1-23/+33
Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-16Be nicer if git executable is not installedLibravatar Ville Skyttä1-1/+1
This patch avoids problems if vc-git.el is installed and activated, but the git executable is not available, for example http://list-archive.xemacs.org/xemacs-beta/200608/msg00062.html Signed-off-by: Ville Skyttä <scop@xemacs.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-26Merge branch 'pb/configure'Libravatar Junio C Hamano1-2/+2
* pb/configure: Rename man1 and man7 variables to man1dir and man7dir Allow INSTALL, bindir, mandir to be set in main Makefile
2006-07-23git.el: Put the git customize group in the 'tools' parent group.Libravatar Alexandre Julliard1-1/+2
Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-23git.el: Try to reuse an existing buffer when running git-status.Libravatar Alexandre Julliard1-1/+23
By default, running git-status again will now reuse an existing buffer that displays the same directory. The old behavior of always creating a new buffer can be obtained by customizing the git-reuse-status-buffer option. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-23git.el: Prepend a slash to the file name when adding to .gitignore.Libravatar Alexandre Julliard1-1/+1
This way the ignore command will really only ignore the marked files and not files with the same name in subdirectories. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-23git.el: Run git-rerere on commits if the rr-cache directory exists.Libravatar Alexandre Julliard1-0/+2
Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-13Display help for Git mode after pressing `h' or `?' in *git-status*Libravatar Jakub Narebski1-0/+7
Add bindings for "h" and "?" in git-status-mode to display help about the mode, including keymap via (describe-function 'git-status-mode), like in PCL-CVS. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-13Wrap long lines in docstrings in contrib/emacs/git.elLibravatar Jakub Narebski1-3/+7
Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-10Fix more typos, primarily in the codeLibravatar Pavel Roskin1-1/+1
The only visible change is that git-blame doesn't understand "--compability" anymore, but it does accept "--compatibility" instead, which is already documented. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-06git-svn: migrate out of contribLibravatar Eric Wong11-4325/+0
Allow NO_SVN_TESTS to be defined to skip git-svn tests. These tests are time-consuming due to SVN being slow, and even more so if SVN Perl libraries are not available. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-05Fix print-log and diff compatibility with recent vc versionsLibravatar Ville Skytt,Ad(B1-6/+7
Here's a patch that fixes print-log and diff compatibility with recent vc versions, such as current GNU Emacs CVS. Signed-off-by: Ville Skytt,Ad(B <scop@xemacs.org>
2006-07-05git-svn: avoid fetching files outside of the URL we're trackingLibravatar Eric Wong1-1/+1
Thanks to Santi <sbejar@gmail.com> for the bug report and explanation: > /path/to/repository/project/file > /path/to/repository/project-2/file <...> > you end up with a project with the following files: > > file > -2/file Signed-off-by: Eric Wong <normalperson@yhbt.net>
2006-06-30git-svn: allow a local target directory to be specified for initLibravatar Eric Wong1-2/+12
git-svn init url://to/the/repo local-repo will create the local-repo dirrectory if doesn't exist yet and populate it as expected. Original patch by Luca Barbato, cleaned up and made to work for the current version of git-svn by me (Eric Wong). Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-29Rename man1 and man7 variables to man1dir and man7dirLibravatar Jakub Narebski1-2/+2
This patch renames man1 and man7 variables to man1dir and man7dir, according to "Makefile Conventions: Variables for Installation Directories" in make.info of GNU Make. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-29Allow INSTALL, bindir, mandir to be set in main MakefileLibravatar Jakub Narebski2-4/+4
Makefiles in subdirectories now use existing value of INSTALL, bindir, mandir if it is set, allowing those to be set in main Makefile or in included config.mak. Main Makefile exports variables which it sets. Accidentally it renames bin to bindir in Documentation/Makefile (should be bindir from start, but is unused, perhaps to be removed). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-28git-svn: be verbose by default on fetch/commit, add -q/--quiet optionLibravatar Eric Wong1-11/+23
Slower connections can make git-svn look as if it's doing nothing for a long time; leaving the user wondering if we're actually doing anything. Now we print some file progress just to assure the user that something is going on while they're waiting. Added the -q/--quiet option to users to revert to the old method if they preferred it. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-28git-svn: add --follow-parent and --no-metadata options to fetchLibravatar Eric Wong2-46/+167
--follow-parent: This is especially helpful when we're tracking a directory that has been moved around within the repository, or if we started tracking a branch and never tracked the trunk it was descended from. This relies on the SVN::* libraries to work. We can't reliably parse path info from the svn command-line client without relying on XML, so it's better just to have the SVN::* libs installed. This also removes oldvalue verification when calling update-ref In SVN, branches can be deleted, and then recreated under the same path as the original one with different ancestry information, causing parent information to be mismatched / misordered. Also force the current ref, if existing, to be a parent, regardless of whether or not it was specified. --no-metadata: This gets rid of the git-svn-id: lines at the end of every commit. With this, you lose the ability to use the rebuild command. If you ever lose your .git/svn/git-svn/.rev_db file, you won't be able to fetch again, either. This is fine for one-shot imports. Also fix some issues with multi-fetch --follow-parent that were exposed while testing this. Additionally, repack checking is simplified greatly. git-svn log will not work on repositories using this, either. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-28git-svn: add the commit-diff commandLibravatar Eric Wong2-19/+112
This is intended for interoperability with git-svnimport. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-28git-svn: several graft-branches improvementsLibravatar Eric Wong2-13/+230
The 'graft-branches' command can now analyze tree matches for merge detection after commits are done, when --branch or --branch-all-refs options are used. We ensure that tree joins (--branch and --branch-all-refs options) during commit time only add SVN parents that occurred before the commit we're importing Also fixed branch detection via merge messages, this manner of merge detection (a la git-svnimport) is really all fuzzy, but at least it actually works now :) Add some new tests to go along with these fixes, too. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-28git-svn: SVN 1.1.x library compatibilityLibravatar Eric Wong4-12/+44
Tested on a plain Ubuntu Hoary installation using subversion 1.1.1-2ubuntu3 1.1.x issues I had to deal with: * Avoid the noisy command-line client compatibility check if we use the libraries. * get_log() arguments differ (now using a nice wrapper from Junio's suggestion) * get_file() is picky about what kind of file handles it gets, so I ended up redirecting STDOUT. I'm probably overflushing my file handles, but that's the safest thing to do... * BDB kept segfaulting on me during tests, so svnadmin will use FSFS whenever we can. * If somebody used an expanded CVS $Id$ line inside a file, then propsetting it to use svn:keywords will cause the original CVS $Id$ to be retained when asked for the original file. As far as I can see, this is a server-side issue. We won't care in the test anymore, as long as it's not expanded by SVN, a static CVS $Id$ line is fine. While we're at making ourselves more compatible, avoid grep along with the -q flag, which is GNU-specific. (grep avoidance tip from Junio, too) Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-22git-svn: fix commit --edit flag when using SVN:: librariesLibravatar Eric Wong1-6/+8
Trying to open an interactive editor in the console while stdout is being piped to the parent process doesn't work out very well. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-20git-svn: fix --rmdir when using SVN:: librariesLibravatar Eric Wong3-6/+41
When tracking directories with nearly all of its files at the most nested levels, --rmdir would accidentally go too far when deleting. Of course, we'll add a test for this condition, too. Makefile: automatically run new tests as they appear in t/ Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-16git-svn: rebuild convenience and bugfixesLibravatar Eric Wong1-2/+19
We will now automatically fetch the refs/remotes/git-svn ref from origin and store a Pull: line for it. --remote=<origin> may be passed if your remote is named something other than 'origin' Also, remember to make GIT_SVN_DIR whenever we need to create .rev_db Signed-off-by: Eric Wong <normalperson@yhbt.net>
2006-06-16git-svn: svn (command-line) 1.0.x compatibilityLibravatar Eric Wong2-43/+51
Tested on a plain Ubuntu Warty installation using subversion 1.0.6-1.2ubuntu3 svn add --force was never needed, as it only affected directories, which git (thankfully) doesn't track The 1.0.x also didn't support symlinks(!), so allow NO_SYMLINK to be defined for running tests Signed-off-by: Eric Wong <normalperson@yhbt.net>
2006-06-16git-svn: tests no longer fail if LC_ALL is not a UTF-8 localeLibravatar Eric Wong2-4/+9
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2006-06-16git-svn: bugfix and optimize the 'log' commandLibravatar Eric Wong1-8/+52
Revisions with long commit messages were being skipped, since the 'git-svn-id' metadata line was at the end and git-log uses a 32k buffer to print the commits. Also the last 'git-svn-id' metadata line in a commit is always the valid one, so make sure we use that, as well. Made the verbose flag work by passing the correct option switch ('--summary') to git-log. Finally, optimize -r/--revision argument handling by passing the appropriate limits to revision Signed-off-by: Eric Wong <normalperson@yhbt.net>
2006-06-16git-svn: Eliminate temp file usage in libsvn_get_file()Libravatar Eric Wong1-33/+23
This means we'll have a loose object when we encounter a symlink but that's not the common case. We also don't have to worry about svn:eol-style when using the SVN libraries, either. So remove the code to deal with that. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2006-06-16git-svn: fix several small bugs, enable branch optimizationLibravatar Eric Wong1-65/+81
Share the repack counter between branches when doing multi-fetch. Pass the -d flag to git repack by default. That's the main reason we will want automatic pack generation, to save space and improve disk cache performance. I won't add -a by default since it can generate extremely large packs that make RAM-starved systems unhappy. We no longer generate the .git/svn/$GIT_SVN_ID/info/uuid file, either. It was never read in the first place. Check for and create .rev_db if we need to during fetch (in case somebody manually blew away their .rev_db and wanted to start over. Mainly makes debugging easier). Croak with $? instead of $! if there's an error closing pipes Quiet down some of the chatter, too. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2006-06-16git-svn: avoid creating some small filesLibravatar Eric Wong1-18/+8
repo_path_split() is already pretty fast, and is already optimized via caching. We also don't need to create an exclude file if we're relying on the SVN libraries. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2006-06-16git-svn: make the $GIT_DIR/svn/*/revs directory obsoleteLibravatar Eric Wong4-132/+224
This is a very intrusive change, so I've beefed up the tests significantly. Added 'full-test' a target to the Makefile, to test different possible configurations. This is intended for maintainers only. Users should only be concerned with 'test' succeeding. We now have a very simple custom database format for handling mapping of svn revisions => git commits. Of course, we're not really using it yet, either. Also disabled automatic branch-finding on new trees for now. It's too easily broken. revisions_eq() function should be helpful for branch detection. Also removed an extra assertion in fetch_cmd() that wasn't correctly done. This bug was found by full-test. Signed-off-by: Eric Wong <normalperson@yhbt.net>