summaryrefslogtreecommitdiff
path: root/contrib
AgeCommit message (Collapse)AuthorFilesLines
2009-03-30Merge branch 'maint-1.6.1' into maintLibravatar Junio C Hamano1-2/+2
* maint-1.6.1: Fix bash completion in path with spaces bash completion: only show 'log --merge' if merging git-tag(1): add hint about commit messages Documentation: update graph api example. Conflicts: contrib/completion/git-completion.bash
2009-03-30Merge branch 'maint-1.6.0' into maint-1.6.1Libravatar Junio C Hamano1-2/+7
* maint-1.6.0: Fix bash completion in path with spaces bash completion: only show 'log --merge' if merging git-tag(1): add hint about commit messages Documentation: update graph api example.
2009-03-30Fix bash completion in path with spacesLibravatar Daniel Cheng (aka SDiZ)1-2/+2
Signed-off-by: Daniel Cheng (aka SDiZ) <j16sdiz+freenet@gmail.com> Trivially-acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-30bash completion: only show 'log --merge' if mergingLibravatar Thomas Rast1-1/+6
The gitk completion only shows --merge if MERGE_HEAD is present. Do it the same way for git-log completion. 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-03-29Merge branch 'maint-1.6.1' into maintLibravatar Junio C Hamano1-1/+2
* maint-1.6.1: import-zips: fix thinko
2009-03-29Merge branch 'maint-1.6.0' into maint-1.6.1Libravatar Junio C Hamano1-1/+2
* maint-1.6.0: import-zips: fix thinko
2009-03-29import-zips: fix thinkoLibravatar Johannes Schindelin1-1/+2
Embarrassingly, the common prefix calculation did not work properly, due to a mistake in the assignment: instead of assigning the dirname of the current file name, the dirname of the current common prefix needs to be assigned to common prefix, when the current prefix does not match the current file name. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-25Fix typo in contrib/examples/git-svnimport.txtLibravatar Michael J Gruber1-3/+3
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-24Convert git-* invocations to "git *" in the svnimport example.Libravatar Abhijit Menon-Sen1-18/+18
After these changes, git-svnimport worked fine for me. Signed-off-by: Abhijit Menon-Sen <ams@toroid.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-23git-p4: avoid syncing duplicate changesLibravatar Pete Wyckoff1-5/+6
When a particular changeset affects multiple depot paths, it will appear multiple times in the output of "p4 changes". Filter out the duplicates to avoid the extra empty commits that this otherwise would create. Signed-off-by: Pete Wyckoff <pw@padd.com> Acked-by: Simon Hausmann <simon@lst.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-21Add a README in the contrib/emacs directory.Libravatar Alexandre Julliard1-0/+39
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2009-02-21git.el: Improve the confirmation message on remove and revert.Libravatar Alexandre Julliard1-2/+6
If there's only one file, print its name instead of just "1 file". Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2009-02-21git.el: Make sure that file lists are sorted as they are created.Libravatar Alexandre Julliard1-13/+16
This avoids a possibly redundant sort in git-update-status-files and git-status-filenames-map, and allows callers to continue using the list without having to copy it. It also fixes the confusing success messages reported by Brent Goodrick. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2009-02-18bash completion: only show 'log --merge' if mergingLibravatar Thomas Rast1-1/+6
The gitk completion only shows --merge if MERGE_HEAD is present. Do it the same way for git-log completion. 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-02-18bash completion: refactor common log, shortlog and gitk optionsLibravatar Thomas Rast1-15/+34
Refactor options that are useful for more than one of them into a variable used by the relevant completions. This has the effect of adding the following options to git-log: --branches --tags --remotes --first-parent --dense --sparse --simplify-merges --simplify-by-decoration --first-parent --no-merges The following to git-shortlog: --branches --tags --remotes --first-parent And the following to gitk: --branches --tags --remotes --first-parent --no-merges --max-count= --max-age= --since= --after= --min-age= --until= --before= --dense --sparse --full-history --simplify-merges --simplify-by-decoration --left-right 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-02-16bash: update 'git svn' optionsLibravatar SZEDER Gábor1-6/+25
'git svn' got some new subcommands and otions in the last couple of months. This patch adds completion support for them. In particular: * 'fetch', 'clone', etc.: '--ignore-paths=' * 'init' and 'clone': '--prefix=', '--use-log-author', '--add-author-from' * 'dcommit': '--commit-url', '--revision' * 'log': '--color' * 'rebase': '--dry-run' * 'branch', 'tag', 'blame', 'migrate' subcommands and their options 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-02-16bash: add missing 'git merge' optionsLibravatar SZEDER Gábor1-0/+1
Namely: '--commit', '--stat', '--no-squash', '--ff', '--no-ff'. One might wonder why add options that specify the default behaviour anyway (e.g. '--commit', '--no-squash', etc.). Users can override the default with config options (e.g. 'branch.<name>.mergeoptions', 'merge.log'), but sometimes might still need the default behaviour. 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-02-14bash: fix misspelled 'git svn' optionLibravatar SZEDER Gábor1-1/+1
'--user-log-author' -> '--use-log-author' Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-13bash-completion: Complete the values of color.interactive, color.ui, color.pagerLibravatar Matt Kraai1-1/+5
Signed-off-by: Matt Kraai <kraai@ftbfs.org> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-11Fix contrib/hooks/post-receive-email for new duplicate branchLibravatar Pat Notz1-1/+3
In the show_new_revisions function, the original code: git rev-parse --not --branches | grep -v $(git rev-parse $refname) | isn't quite right since one can create a new branch and push it without any new commits. In that case, two refs will have the same sha1 but both would get filtered by the 'grep'. In the end, we'll show ALL the history which is not what we want. Instead, we should list the branches by name and remove the branch being updated and THEN pass that list through rev-parse. Revised as suggested by Jakub Narebski and Junio C Hamano to use git-for-each-ref instead of git-branch. (Thanks!) Signed-off-by: Pat Notz <pknotz@sandia.gov> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-08completion: Get rid of tabbed indentation in comments. Replace with spaces.Libravatar Ted Pavlic1-5/+5
Signed-off-by: Ted Pavlic <ted@tedpavlic.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-08completion: Fix GIT_PS1_SHOWDIRTYSTATE to prevent unbound variable errors.Libravatar Ted Pavlic1-1/+1
Signed-off-by: Ted Pavlic <ted@tedpavlic.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-07emacs: Remove the no longer maintained vc-git package.Libravatar Alexandre Julliard2-217/+1
vc-git is distributed with Emacs since version 22.2, and is maintained in the Emacs CVS tree. This file is obsolete and causes trouble for people who want to add contrib/emacs to their load-path. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2009-02-07git.el: Add some notes about Emacs versions compatibility.Libravatar Alexandre Julliard1-2/+10
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2009-02-07git.el: Use integer instead of character constants in case statement.Libravatar Alexandre Julliard1-15/+15
This is for compatibility with XEmacs. Reported by Vassili Karpov. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2009-02-07git.el: Set a regexp for paragraph-separate in log-edit mode.Libravatar Alexandre Julliard1-0/+1
This allows using fill-paragraph on the log message without interference from the various header fields. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2009-02-07git.el: Make git-run-command-region display the error if any.Libravatar Alexandre Julliard1-19/+19
This makes it easier to figure out why a commit has failed. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2009-02-07git.el: Add commands for cherry-pick and revert.Libravatar Alexandre Julliard1-0/+42
Support for cherry-picking and reverting commits, with automatic formatting of the commit log message. Bound to C-c C-p and C-c C-v respectively. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2009-02-07git.el: Add a command to create a new branch.Libravatar Alexandre Julliard1-0/+14
Prompts for a branch name, create a new branch at HEAD and switch to it. Bound to C-c C-b by default. Based on a patch by Rémi Vanicat <vanicat@debian.org>. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2009-02-07git.el: Add a checkout command.Libravatar Alexandre Julliard1-2/+31
Prompts for a branch name and checks it out. Bound to C-c C-o by default. Based on a patch by Rémi Vanicat <vanicat@debian.org>. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2009-02-04contrib git-resurrect: find traces of a branch name and resurrect itLibravatar Thomas Rast1-0/+180
Add a tool 'git-resurrect.sh <branch>' that tries to find traces of the <branch> in the HEAD reflog and, optionally, all merge commits in the repository. It can then resurrect the branch, pointing it at the most recent of all candidate commits found. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-03bash: offer to show (un)staged changesLibravatar Thomas Rast1-2/+24
Add a bit of code to __git_ps1 that lets it append '*' to the branch name if there are any unstaged changes, and '+' if there are any staged changes. Since this is a rather expensive operation and will force a lot of data into the cache whenever you first enter a repository, you have to enable it manually by setting GIT_PS1_SHOWDIRTYSTATE to a nonempty value. The configuration variable bash.showDirtyState can then be used to disable it again for some repositories. 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-01-31contrib/difftool: Don't repeat merge tool candidatesLibravatar David Aguilar1-19/+12
git difftool listed some candidates for mergetools twice, depending on the environment. This slightly changes the behavior when both KDE_FULL_SESSION and GNOME_DESKTOP_SESSION_ID are set at the same time; in such a case meld is used in favor of kdiff3 (the old code favored kdiff3 in such a case), but it should not matter in practice. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-31contrib/difftool: add support for KompareLibravatar Markus Heidelberg2-7/+12
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Acked-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-23Merge branch 'js/patience-diff'Libravatar Junio C Hamano1-0/+1
* js/patience-diff: bash completions: Add the --patience option Introduce the diff option '--patience' Implement the patience diff algorithm Conflicts: contrib/completion/git-completion.bash
2009-01-21bash completion: add 'rename' subcommand to git-remoteLibravatar Markus Heidelberg1-2/+2
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-01-19contrib/difftool: remove distracting 'echo' in the SIGINT handlerLibravatar Markus Heidelberg1-1/+0
When interrupting git-difftool with Ctrl-C, the output of this echo command led to having the cursor at the beginning of the line below the shell prompt. Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-19contrib/difftool: change trap condition from SIGINT to INTLibravatar Markus Heidelberg1-1/+1
git-difftool worked for me on an up-to-date Gentoo Linux at home, but didn't work on a somewhat older Ubuntu Linux 7.10 at work and failed with the following error, where 'Makefile' was locally modified: trap: 244: SIGINT: bad trap external diff died, stopping at Makefile. In 'man 1p trap' there is written: "The condition can be EXIT, 0 (equivalent to EXIT), or a signal specified using a symbolic name, without the SIG prefix, [...]" "Implementations may permit names with the SIG prefix or ignore case in signal names as an extension." So now we do it the POSIX compliant way instead of using an extension. Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-19bash completion: refactor diff optionsLibravatar Thomas Rast1-15/+21
diff, log and show all take the same diff options. Refactor them from __git_diff and __git_log into a variable, and complete them in __git_show too. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-19bash completion: move pickaxe options to logLibravatar Thomas Rast1-1/+2
Move the options --pickaxe-all and --pickaxe-regex to git-log, where they make more sense than with git-diff. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-18difftool: put the cursor on the editable file for VimLibravatar David Aguilar1-2/+6
You only need to edit worktree files when comparing against the worktree. Put the cursor automatically into its window for vimdiff and gvimdiff to avoid doing <C-w>l every time. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-18difftool: fix documentation problemsLibravatar David Aguilar2-13/+12
This patch makes the difftool docs always refer to the git-difftool script using the dashed form of the name. Only command examples use the non-dashed form now. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-18git-svn: Add --localtime option to "fetch"Libravatar Pete Harlan1-1/+1
By default git-svn stores timestamps of fetched commits in Subversion's UTC format. Passing --localtime to fetch will convert them to the timezone of the server on which git-svn is run. This makes the timestamps of a resulting "git log" agree with what "svn log" shows for the same repository. Signed-off-by: Pete Harlan <pgit@pcharlan.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-01-17contrib: add 'git difftool' for launching common merge toolsLibravatar David Aguilar3-0/+418
'git difftool' is a git command that allows you to compare and edit files between revisions using common merge tools. 'git difftool' does what 'git mergetool' does but its use is for non-merge situations such as when preparing commits or comparing changes against the index. It uses the same configuration variables as 'git mergetool' and provides the same command-line interface as 'git diff'. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-17bash: refactor 'git log --pretty=<format>' optionsLibravatar SZEDER Gábor1-4/+4
Both 'git log' and 'show' have the same '--pretty=<format>' option with the same formats. So refactor these formats into a common variable. While at it, also add 'format:' to the list. 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-01-17bash: add missing format-patch command line optionsLibravatar SZEDER Gábor1-0/+2
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-01-17bash: remove unnecessary checks for long options with argumentLibravatar SZEDER Gábor1-2/+0
__gitcomp takes care of it since 5447aac7 (bash: fix long option with argument double completion, 2008-03-05) 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-01-15bash-completion: Add comments to remind about required argumentsLibravatar Ted Pavlic1-0/+15
Add a few simple comments above commands that take arguments. These comments are meant to remind developers of potential problems that can occur when the script is sourced on systems with "set -u." Any function which requires arguments really ought to be called with explicit arguments given. Also adds a #!bash to the top of bash completions so that editing software can always identify that the file is of sh type. Signed-off-by: Ted Pavlic <ted@tedpavlic.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-15bash-completion: Try bash completions before simple filetypeLibravatar Ted Pavlic1-3/+6
When a git completion is not found, a bash shell should try bash-type completions first before going to standard filetype completions. This patch adds "-o bashdefault" to the completion line. If that option is not available, it uses the old method. This behavior was inspired by Mercurial's bash completion script. Signed-off-by: Ted Pavlic <ted@tedpavlic.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-15bash-completion: Support running when set -u is enabledLibravatar Ted Pavlic1-9/+9
Under "set -u" semantics, it is an error to access undefined variables. Some user environments may enable this setting in the interactive shell. In any context where the completion functions access an undefined variable, accessing a default empty string (aka "${1-}" instead of "$1") is a reasonable way to code the function, as it silences the undefined variable error while still supplying an empty string. In this patch, functions that should always take an argument still use $1. Functions that have optional arguments use ${1-}. Signed-off-by: Ted Pavlic <ted@tedpavlic.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>