summaryrefslogtreecommitdiff
path: root/contrib
AgeCommit message (Collapse)Author
2010-01-12hg-to-git: fix COMMITTER type-oBart Trojanowski
This script passes the author and committer to git-commit via environment variables, but it was missing the seccond T of COMMITTER in a few places. Signed-off-by: Bart Trojanowski <bart@jukie.net> Acked-by: Stelian Pop <stelian@popies.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-10Merge branch 'tr/maint-1.6.5-bash-prompt-show-submodule-changes'Junio C Hamano
* tr/maint-1.6.5-bash-prompt-show-submodule-changes: bash completion: factor submodules into dirty state
2009-12-31bash completion: factor submodules into dirty stateThomas Rast
In the implementation of GIT_PS1_SHOWDIRTYSTATE in 738a94a (bash: offer to show (un)staged changes, 2009-02-03), I cut&pasted the git-diff invocations from dirty-worktree checks elsewhere, carrying along the --ignore-submodules option. As pointed out by Kevin Ballard, this doesn't really make sense: to the _user_, a changed submodule counts towards uncommitted changes. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-31bash completion: add space between branch name and status flagsShawn O. Pearce
Improve the readability of the bash prompt by adding a space between the branch name and the status flags (dirty, stash, untracked). While we are cleaning up this section of code, the two cases for formatting the prompt are identical except for the format string, so make them the same. Suggested-by: Roman Fietze <roman.fietze@telemotive.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-30Add completion for git-svn mkdirs,reset,and gcRobert Zeh
Signed-off-by: Robert Zeh <robert.a.zeh@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-12bash: Support new 'git fetch' optionsBjörn Gustavsson
Support the new options --all, --prune, and --dry-run for 'git fetch'. As the --multiple option was primarily introduced to enable 'git remote update' to be re-implemented in terms of 'git fetch' (16679e37) and is not likely to be used much from the command line, it does not seems worthwhile to complicate the code (to support completion of multiple remotes) to handle it. Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-06bash: update 'git commit' completionSZEDER Gábor
I just wanted to add the recently learnt '--reset-author' option, but then noticed that there are many more options missing. This patch adds support for all of 'git commit's options, except '--allow-empty', because it is primarily there for foreign scm interfaces. Furthermore, this patch also adds support for completing the arguments of those options that take a non-filename argument: valid modes are offered for '--cleanup' and '--untracked-files', while refs for '--reuse-message' and '--reedit-message', because these two take a commit as argument. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-23Merge branch 'jn/faster-completion-startup'Junio C Hamano
* jn/faster-completion-startup: Speed up bash completion loading
2009-11-21Merge branch 'jn/editor-pager'Junio C Hamano
* jn/editor-pager: Provide a build time default-pager setting Provide a build time default-editor setting am -i, git-svn: use "git var GIT_PAGER" add -i, send-email, svn, p4, etc: use "git var GIT_EDITOR" Teach git var about GIT_PAGER Teach git var about GIT_EDITOR Suppress warnings from "git var -l" Do not use VISUAL editor on dumb terminals Handle more shell metacharacters in editor names
2009-11-21Merge branch 'jn/help-everywhere'Junio C Hamano
* jn/help-everywhere: (23 commits) diff --no-index: make the usage string less scary merge-{recursive,subtree}: use usagef() to print usage Introduce usagef() that takes a printf-style format Let 'git <command> -h' show usage without a git dir Show usage string for 'git http-push -h' Let 'git http-fetch -h' show usage outside any git repository Show usage string for 'git stripspace -h' Show usage string for 'git unpack-file -h' Show usage string for 'git show-index -h' Show usage string for 'git rev-parse -h' Show usage string for 'git merge-one-file -h' Show usage string for 'git mailsplit -h' Show usage string for 'git imap-send -h' Show usage string for 'git get-tar-commit-id -h' Show usage string for 'git fast-import -h' Show usage string for 'git check-ref-format -h' http-fetch: add missing initialization of argv0_path Show usage string for 'git show-ref -h' Show usage string for 'git merge-ours -h' Show usage string for 'git commit-tree -h' ... Conflicts: imap-send.c
2009-11-18Merge branch 'ef/msys-imap'Junio C Hamano
* ef/msys-imap: Windows: use BLK_SHA1 again MSVC: Enable OpenSSL, and translate -lcrypto mingw: enable OpenSSL mingw: wrap SSL_set_(w|r)fd to call _get_osfhandle imap-send: build imap-send on Windows imap-send: fix compilation-error on Windows imap-send: use run-command API for tunneling imap-send: use separate read and write fds imap-send: remove useless uid code
2009-11-18Speed up bash completion loadingJonathan Nieder
Since git is not used in each and every interactive xterm, it seems best to load completion support with cold caches and then load each needed thing lazily. This has most of the speed advantage of pre-generating everything at build time, without the complication of figuring out at build time what commands will be available at run time. On this slow laptop, this decreases the time to load git-completion.bash from about 500 ms to about 175 ms. Suggested-by: Kirill Smelkov <kirr@mns.spb.ru> Acked-by: Shawn O. Pearce <spearce@spearce.org> Cc: Stephen Boyd <bebarino@gmail.com> Cc: SZEDER Gábor <szeder@ira.uka.de> Cc: Sverre Rabbelier <srabbelier@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-16Merge branch 'fc/doc-fast-forward'Junio C Hamano
* fc/doc-fast-forward: Use 'fast-forward' all over the place Conflicts: builtin-merge.c
2009-11-16Merge branch 'sc/difftool-p4merge'Junio C Hamano
* sc/difftool-p4merge: mergetool--lib: add p4merge as a pre-configured mergetool option
2009-11-14bash: add the merge option --ff-onlyBjörn Gustavsson
Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-13add -i, send-email, svn, p4, etc: use "git var GIT_EDITOR"Jonathan Nieder
Use the new "git var GIT_EDITOR" feature to decide what editor to use, instead of duplicating its logic elsewhere. This should make the behavior of commands in edge cases (e.g., editor names with spaces) a little more consistent. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-10Retire fetch--tool helper to contrib/examplesJonathan Nieder
When git-fetch was builtin-ized, the previous script was moved to contrib/examples. Now, it is the sole remaining user for 'git fetch--tool'. The fetch--tool code is still worth keeping around so people can try out the old git-fetch.sh, for example when investigating regressions from the builtinifaction. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-30Make the MSVC projects use PDB/IDB files named after the projectSebastian Schuberth
Instead of having all PDB files for all projects named "vc90.pdb", name them after the respective project to make the relation more clear (and to avoid name clashes when copying files around). Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com> Acked-by: Marius Storm-Olsen <mstormo@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-28mergetool--lib: add p4merge as a pre-configured mergetool optionScott Chacon
Add p4merge to the set of built-in diff/merge tools, and update bash completion and documentation. Signed-off-by: Scott Chacon <schacon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-28bash completion: difftool accepts the same options as diffMarkus Heidelberg
So complete refs, files after the double-dash and some diff options that make sense for difftool. Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-28bash: complete more options for 'git rebase'Björn Gustavsson
Complete all long options for 'git rebase' except --no-verify (probably used very seldom) and the long options corresponding to -v, -q, and -f. Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-26Merge branch 'iv/tar-lzma-xz'Junio C Hamano
* iv/tar-lzma-xz: import-tars: Add support for tarballs compressed with lzma, xz
2009-10-25Use 'fast-forward' all over the placeFelipe Contreras
It's a compound word. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-23MSVC: Enable OpenSSL, and translate -lcryptoMarius Storm-Olsen
We don't use crypto, but rather require libeay32 and ssleay32. handle it in both the Makefile msvc linker script, and the buildsystem generator. Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-22import-tars: Add support for tarballs compressed with lzma, xzIngmar Vanhassel
Also handle the extensions .tlz and .txz, aliases for .tar.lzma and .tar.xz respectively. Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org> Liked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-19Merge branch 'dk/blame-el'Junio C Hamano
* dk/blame-el: git-blame.el: Change how blame information is shown.
2009-10-12bash completion: complete refs for git-grepThomas Rast
Before the --, always attempt ref completion. This helps with entering the <treeish> arguments to git-grep. As a bonus, you can work around git-grep's current lack of --all by hitting M-*, ugly as the resulting command line may be. Strictly speaking, completing the regular expression argument (or option argument) makes no sense. However, we cannot prevent _all_ completion (it will fall back to filenames), so we dispense with any additional complication to detect whether the user still has to enter a regular expression. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09bash: add support for 'git replace'Björn Gustavsson
Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09completion: fix alias listings with newlinesStephen Boyd
Aliases with newlines have been a problem since commit 56fc25f (Bash completion support for remotes in .git/config., 2006-11-05). The chance of the problem occurring has been slim at best, until commit 518ef8f (completion: Replace config --list with --get-regexp, 2009-09-11) removed the case statement introduced by commit 56fc25f. Before removing the case statement, most aliases with newlines would work unless they were specially crafted as follows [alias] foo = "log -1 --pretty='format:%s\nalias.error=broken'" After removing the case statement, a more benign alias like [alias] whowhat = "log -1 --pretty='format:%an <%ae>\n%s'" wont-complete = ... would cause the completion to break badly. For now, revert the removal of the case statement until someone comes up with a better way to get keys from git-config. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09completion: fix completion of git <TAB><TAB>Stephen Boyd
After commit 511a3fc (wrap git's main usage string., 2009-09-12), the bash completion for git commands includes COMMAND and [ARGS] when it shouldn't. Fix this by grepping more strictly for a line with git commands. It's doubtful whether git will ever have commands starting with anything besides numbers and letters so this should be fine. At least by being stricter we'll know when we break the completion earlier. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09import-tars: Add missing closing bracketIngmar Vanhassel
This fixes an obvious syntax error that snuck in commit 7e787953: syntax error at /home/ingmar/bin//git-import-tars line 143, near "/^$/ { " syntax error at /home/ingmar/bin//git-import-tars line 145, near "} else" syntax error at /home/ingmar/bin//git-import-tars line 152, near "}" Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org> Acked-and-Tested-by: Peter Krefting <peter@softwolves.pp.se> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-08completion: add dirstat and friends to diff optionsv1.6.5-rc3Stephen Boyd
Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-08completion: update am, commit, and logStephen Boyd
git am learned --scissors, git commit learned --dry-run and git log learned --decorate=long|short recently. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-29git-blame.el: Change how blame information is shown.David Kågedal
It is more customizable, and uses a line prefix to show the commit. Signed-off-by: David Kågedal <davidk@lysator.liu.se> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-09-29Make just opening the generated MSVC solution file not modify itSebastian Schuberth
The format of the generated MSVC solution file is fixed in a way that just opening it in Visual Studio and immediately closing it again without performing any modifications does not trigger a prompt to save the solution file. This behavior was caused by several minor incompatibilities between the generated file and what Visual Studio 2008 expected, so Visual Studio transparently fixed the file format, marking it internally as modified. Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com> Acked-by: Marius Storm-Olsen <mstormo@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-09-29Make generated MSVC solution file open from Windows ExplorerSebastian Schuberth
In order to be able to open the generated solution file by double- clicking it in Windows Explorer, all project files need to use DOS line-endings and a comment about the Visual Studio version needs to be added to the header of the solution file. This also fixes the icon that is displayed for the solution file in Windows Explorer. Note that opening the solution file from a running instance of Visual Studio already worked before. Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com> Acked-by: Marius Storm-Olsen <mstormo@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-09-29generators/vcproj.pm: remove UNICODE from buildMichael Wookey
Defining UNICODE for MSVC IDE builds results in certain Win32 WIDE API's receiving ANSI strings. The result of which is an invalid use of the API and will end in either data corruption or an application crash. Prevent the use of WIDE API's when building with the MSVC IDE for compatibility with msysGit. Signed-off-by: Michael Wookey <michaelwookey@gmail.com> Acked-by: Marius Storm-Olsen <mstormo@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-09-25bash: teach 'git checkout' optionsSZEDER Gábor
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-09-22bash: teach 'git reset --patch'SZEDER Gábor
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-22bash: update 'git stash' completionSZEDER Gábor
This update adds 'git stash (apply|pop) --quiet' and all options known to 'git stash save', and handles the DWIMery from 3c2eb80f (stash: simplify defaulting to "save" and reject unknown options, 2009-08-18). Care is taken to avoid offering subcommands in the DWIM case. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-22bash: rename __git_find_subcommand() to __git_find_on_cmdline()SZEDER Gábor
__git_find_subcommand() was originally meant to check whether subcommands are already present on the command line. But the code is general enough to be used for checking the presence of command line options as well, and the next commit will use it for that purpose, so let's give it a more general name. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-19Add scripts to generate projects for other buildsystems (MSVC vcproj, QMake)Marius Storm-Olsen
These scripts generate projects for the MSVC IDE (.vcproj files) or QMake (.pro files), based on the output of a 'make -n MSVC=1 V=1' run. This enables us to simply do the necesarry changes in the Makefile, and you can update the other buildsystems by regenerating the files. Keeping the other buildsystems up-to-date with main development. The generator system is designed to easily drop in pm's for other buildsystems as well, if someone has an itch. However, the focus has been Windows development, so the 'engine' might need patches to support any platform. Also add some .gitignore entries for MSVC files. Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13completion: Replace config --list with --get-regexpTodd Zullinger
James Bardin noted that the completion spewed warnings when no git config file is present. This is likely a bug to be fixed in git config, but it's also good to simplify the completion code by using the --get-regexp option as Jeff King pointed out. Signed-off-by: Todd Zullinger <tmz@pobox.com> Trivially-acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13Merge branch 'pk/fast-import-tars'Junio C Hamano
* pk/fast-import-tars: import-tars: Allow per-tar author and commit message.
2009-09-13Merge branch 'pk/fast-import-dirs'Junio C Hamano
* pk/fast-import-dirs: Add script for importing bits-and-pieces to Git.
2009-09-13Merge branch 'jt/pushinsteadof'Junio C Hamano
* jt/pushinsteadof: Add url.<base>.pushInsteadOf: URL rewriting for push only Wrap rewrite globals in a struct in preparation for adding another set
2009-09-10git-p4: Avoid modules deprecated in Python 2.6.Reilly Grant
The popen2, sha and sets modules are deprecated in Python 2.6 (sha in Python 2.5). Both popen2 and sha are not actually used in git-p4. Replace usage of sets.Set with the builtin set object. The built-in set object was added in Python 2.4 and is already used in other parts of this script, so this dependency is nothing new. Signed-off-by: Reilly Grant <reillyeon@qotw.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-09git.el: Use git-add-file for unmerged files, remove git-resolve-fileMartin Nordholts
Use `git-add-file' to mark unmerged files as resolved in the *git-status* buffer to be consistent with git's CLI instructions. Also remove `git-resolve-file' to make it clear that that "R" is a now a free keybinding. Signed-off-by: Martin Nordholts <martinn@src.gnome.org> Acked-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-08Add url.<base>.pushInsteadOf: URL rewriting for push onlyJosh Triplett
This configuration option allows systematically rewriting fetch-only URLs to push-capable URLs when used with push. For instance: [url "ssh://example.org/"] pushInsteadOf = "git://example.org/" This will allow clones of "git://example.org/path/to/repo" to subsequently push to "ssh://example.org/path/to/repo", without manually configuring pushurl for that remote. Includes documentation for the new option, bash completion updates, and test cases (both that pushInsteadOf applies to push, that it does not apply to fetch, and that it is ignored when pushURL is already defined). Signed-off-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-03Add script for importing bits-and-pieces to Git.Peter Krefting
Allows the user to import version history that is stored in bits and pieces in the file system, for instance snapshots of old development trees, or day-by-day backups. A configuration file is used to describe the relationship between the different files and allow describing branches and merges, as well as authorship and commit messages. Output is created in a format compatible with git-fast-import. Full documentation is provided inline in perldoc format. Signed-off-by: Peter Krefting <peter@softwolves.pp.se> Signed-off-by: Junio C Hamano <gitster@pobox.com>