aboutsummaryrefslogtreecommitdiff
path: root/contrib
Commit message (Collapse)AuthorAge
* Remove more sed invocations from within bash completion.Shawn O. Pearce2006-11-05
| | | | | | | | | | 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>
* Support bash completion on symmetric difference operator.Shawn O. Pearce2006-11-05
| | | | | | | | | | | | 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>
* Take --git-dir into consideration during bash completion.Shawn O. Pearce2006-11-05
| | | | | | | | | | | | | | | | | | 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>
* Bash completion support for remotes in .git/config.Shawn O. Pearce2006-11-05
| | | | | | | | | | | | | | | | | | | 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>
* Only load .exe suffix'd completions on Cygwin.Shawn O. Pearce2006-11-05
| | | | | | | | | 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>
* Added missing completions for show-branch and merge-base.Shawn O. Pearce2006-11-05
| | | | | | | | | 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>
* Added bash completion support for git-reset.Shawn O. Pearce2006-11-04
| | | | | | | | | 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>
* Added completion support for git-branch.exe.Shawn O. Pearce2006-11-04
| | | | | | | | | 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>
* git.el: Include MERGE_MSG in the log-edit buffer even when not committing a ↵Alexandre Julliard2006-11-04
| | | | | | | | | | 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>
* git.el: Move point after the log message header when entering log-edit mode.Alexandre Julliard2006-11-04
| | | | | | | Suggested by Han-Wen Nienhuys. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git.el: Added a function to open the current file in another window.Alexandre Julliard2006-11-04
| | | | | | | | 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>
* git.el: Added functions for moving to the next/prev unmerged file.Alexandre Julliard2006-11-04
| | | | | | | | 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>
* Bash completion support for aliasesDennis Stosberg2006-10-28
| | | | | | | | - 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>
* ignore-errors requires clKarl Hasselström2006-10-23
| | | | | | | | | 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>
* git-vc: better installation instructionsKarl Hasselström2006-10-22
| | | | | | | | 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>
* vc-git.el: Switch to using git-blame instead of git-annotate.Alexandre Julliard2006-10-05
| | | | | Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git.el: Fixed inverted "renamed from/to" message.Alexandre Julliard2006-10-05
| | | | | | | | 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>
* Contributed bash completion support for core Git tools.Junio C Hamano2006-09-28
| | | | | | | | | | | | | | | | | | 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>
* contrib/vim: add syntax highlighting file for commitsJeff King2006-09-13
| | | | | Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitview.txt: improve asciidoc markupJonas Fonseca2006-08-25
| | | | | Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Be nicer if git executable is not installedVille Skyttä2006-08-16
| | | | | | | | | 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>
* Merge branch 'pb/configure'Junio C Hamano2006-07-26
|\ | | | | | | | | | | * pb/configure: Rename man1 and man7 variables to man1dir and man7dir Allow INSTALL, bindir, mandir to be set in main Makefile
| * Rename man1 and man7 variables to man1dir and man7dirJakub Narebski2006-06-29
| | | | | | | | | | | | | | | | | | 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>
| * Allow INSTALL, bindir, mandir to be set in main MakefileJakub Narebski2006-06-29
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | git.el: Put the git customize group in the 'tools' parent group.Alexandre Julliard2006-07-23
| | | | | | | | | | Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | git.el: Try to reuse an existing buffer when running git-status.Alexandre Julliard2006-07-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>
* | git.el: Prepend a slash to the file name when adding to .gitignore.Alexandre Julliard2006-07-23
| | | | | | | | | | | | | | | | 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>
* | git.el: Run git-rerere on commits if the rr-cache directory exists.Alexandre Julliard2006-07-23
| | | | | | | | | | Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Display help for Git mode after pressing `h' or `?' in *git-status*Jakub Narebski2006-07-13
| | | | | | | | | | | | | | | | 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>
* | Wrap long lines in docstrings in contrib/emacs/git.elJakub Narebski2006-07-13
| | | | | | | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Fix more typos, primarily in the codePavel Roskin2006-07-10
| | | | | | | | | | | | | | | | | | 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>
* | git-svn: migrate out of contribEric Wong2006-07-06
| | | | | | | | | | | | | | | | | | 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>
* | Fix print-log and diff compatibility with recent vc versionsVille Skytt,Ad(B2006-07-05
| | | | | | | | | | | | | | 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>
* | git-svn: avoid fetching files outside of the URL we're trackingEric Wong2006-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | git-svn: allow a local target directory to be specified for initEric Wong2006-06-30
|/ | | | | | | | | | | | | 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>
* git-svn: be verbose by default on fetch/commit, add -q/--quiet optionEric Wong2006-06-28
| | | | | | | | | | | | | | 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>
* git-svn: add --follow-parent and --no-metadata options to fetchEric Wong2006-06-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --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>
* git-svn: add the commit-diff commandEric Wong2006-06-28
| | | | | | | 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>
* git-svn: several graft-branches improvementsEric Wong2006-06-28
| | | | | | | | | | | | | | | | | | | 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>
* git-svn: SVN 1.1.x library compatibilityEric Wong2006-06-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* git-svn: fix commit --edit flag when using SVN:: librariesEric Wong2006-06-22
| | | | | | | | 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>
* git-svn: fix --rmdir when using SVN:: librariesEric Wong2006-06-20
| | | | | | | | | | | | | 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>
* git-svn: rebuild convenience and bugfixesEric Wong2006-06-16
| | | | | | | | | | | | | 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>
* git-svn: svn (command-line) 1.0.x compatibilityEric Wong2006-06-16
| | | | | | | | | | | | | 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>
* git-svn: tests no longer fail if LC_ALL is not a UTF-8 localeEric Wong2006-06-16
| | | | Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: bugfix and optimize the 'log' commandEric Wong2006-06-16
| | | | | | | | | | | | | | | | | 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>
* git-svn: Eliminate temp file usage in libsvn_get_file()Eric Wong2006-06-16
| | | | | | | | | | 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>
* git-svn: fix several small bugs, enable branch optimizationEric Wong2006-06-16
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* git-svn: avoid creating some small filesEric Wong2006-06-16
| | | | | | | | | | 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>
* git-svn: make the $GIT_DIR/svn/*/revs directory obsoleteEric Wong2006-06-16
| | | | | | | | | | | | | | | | | | | | | 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>