aboutsummaryrefslogtreecommitdiff
path: root/contrib
Commit message (Collapse)AuthorAge
* bash-completion: Add non-command git help files to bash-completionMarcus Griep2008-08-16
| | | | | | | | | | | Git allows access to the gitattributes man page via `git help attributes`, but this is not discoverable via the bash-completion mechanism. This patch adds all current non-command man pages to the completion candidate list. Signed-off-by: Marcus Griep <marcus@griep.us> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* bash completion: Add '--merge' long option for 'git log'Lee Marlow2008-08-14
| | | | | | Signed-off-by: Lee Marlow <lee.marlow@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* bash completion: Add completion for 'git mergetool'Lee Marlow2008-08-14
| | | | | | | | | | | The --tool= long option to "git mergetool" can be completed with: kdiff3 tkdiff meld xxdiff emerge vimdiff gvimdiff ecmerge opendiff Signed-off-by: Lee Marlow <lee.marlow@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* bash completion: 'git apply' should use 'fix' not 'strip'Eric Raible2008-08-14
| | | | | | | | Bring completion up to date with the man page. Signed-off-by: Eric Raible <raible@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* bash: remove redundant check for 'git stash apply' optionsSZEDER Gábor2008-08-08
| | | | | | | | | It will never trigger anyway because of the first check, and even if it would, it would not offer the command line option. 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>
* bash completion: Add completion for 'git mv'Lee Marlow2008-08-05
| | | | | | | | | Add completions for all long options specified in the docs --dry-run Signed-off-by: Lee Marlow <lee.marlow@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* bash completion: Add completion for 'git ls-files'Lee Marlow2008-08-05
| | | | | | | | | | | | | | Add completions for all long options specified in the docs --cached --deleted --modified --others --ignored --stage --directory --no-empty-directory --unmerged --killed --exclude= --exclude-from= --exclude-per-directory= --exclude-standard --error-unmatch --with-tree= --full-name --abbrev --ignored --exclude-per-directory Signed-off-by: Lee Marlow <lee.marlow@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* bash completion: Add completion for 'git archive'Lee Marlow2008-08-05
| | | | | | | | | | | | | Add completions for all long options specified in the docs --format= --list --verbose --prefix= --remote= --exec= The --format= long option can be completed with available formats and the --remote= can be completed with defined remote repositories. Signed-off-by: Lee Marlow <lee.marlow@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* bash completion: More completions for 'git stash'Lee Marlow2008-08-05
| | | | | | | | | | Add branch subcommand to completions and USAGE for git-stash.sh. Complete stash names for show, apply, drop, pop, and branch. Add "--index" long option for apply. Signed-off-by: Lee Marlow <lee.marlow@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* bash completion: Add completion for 'git revert'Lee Marlow2008-08-05
| | | | | | | | | Add completions for all long options specified in the docs --edit --mainline --no-edit --no-commit --signoff Signed-off-by: Lee Marlow <lee.marlow@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* bash completion: Add completion for 'git init'Lee Marlow2008-08-05
| | | | | | | | | | Add completions for all long options specified in the docs --quiet --bare --template= --shared --shared={false|true|umask|group|all|world|everybody} Signed-off-by: Lee Marlow <lee.marlow@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* bash completion: Add completion for 'git clean'Lee Marlow2008-08-05
| | | | | | | | | Add completions for all long options specified in the docs --dry-run --quiet Signed-off-by: Lee Marlow <lee.marlow@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* bash completion: Add completion for 'git clone'Lee Marlow2008-08-05
| | | | | | | | | | | Add completions for all long options specified in the docs --local --no-hardlinks --shared --reference --quiet --no-checkout --bare --mirror --origin --upload-pack --template= --depth Signed-off-by: Lee Marlow <lee.marlow@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* bash completion: Add completion for 'git grep'Lee Marlow2008-08-04
| | | | | | | | | | | | | | | | | Add completions for all long options specified in the docs --cached --text --ignore-case --word-regexp --invert-match --full-name --extended-regexp --basic-regexp --fixed-strings --files-with-matches --name-only --files-without-match --count --and --or --not --all-match Signed-off-by: Lee Marlow <lee.marlow@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* bash completion: Add more long options for 'git log'Lee Marlow2008-08-02
| | | | | | | | Options added: --parents --children --full-history Signed-off-by: Lee Marlow <lee.marlow@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* bash completion: remove unused function _git_diff_treeLee Marlow2008-08-02
| | | | | | | | completion for git diff-tree was removed in 5cfb4fe Signed-off-by: Lee Marlow <lee.marlow@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Replace uses of "git-var" with "git var"Todd Zullinger2008-07-30
| | | | | Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* bash completion: Add completion for 'git help'Lee Marlow2008-07-27
| | | | | | | | | | | | | | | Rename cached __git_commandlist to __git_porcelain_commandlist and add __git_all_commandlist that only filters out *--* helpers. Completions for 'git help' will use the __git_all_commandlist, while the __git_porcelain_commandlist is used for git command completion. Users who actually read man pages may want to see help for plumbing commands. Signed-off-by: Lee Marlow <lee.marlow@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* bash completion: Add long options for 'git describe'Thomas Rast2008-07-27
| | | | | | 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>
* bash: offer only paths after '--' for 'git checkout'SZEDER Gábor2008-07-24
| | | | | | | | Commit d773c631 (bash: offer only paths after '--', 2008-07-08) did the same for several other git commands, but 'git checkout' went unnoticed. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-completion.bash: provide completion for 'show-branch'Thomas Rast2008-07-23
| | | | | | | | It previously used the same as 'log', but the options are quite different and the arguments must be single refs (or globs). Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* bash completion: Add long options for 'git rm'Lee Marlow2008-07-23
| | | | | | | Options added: --cached --dry-run --ignore-unmatch --quiet Signed-off-by: Lee Marlow <lee.marlow@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* svnimport: newer libsvn wants us to ask for the root with "", not "/"P. Christeas2008-07-23
| | | | | | | | | | | | | | In r27729, libsvn introduced an assert which explicitly forbids searching the tree at "/". Luckily enough, it still accepts an empty string "" as the starting point. http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_ra/ra_loader.c?r1=27653&r2=27729 Tested against libsvn0-1.5.0-4mdv2009.0 (needs the fix), libsvn0-1.4.6-5mdv2008.1 (works anyway) Signed-off-by: P. Christeas <p_christ@hol.gr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* am --abort: Add to bash-completion and mention in git-rerere documentationStephan Beyer2008-07-23
| | | | | | | | | The git-rerere documentation talks about commands that invoke "git rerere clear" automatically. git am --abort is added and a typo is fixed additionally. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* In perforce, RCS keywords are case-sensitiveDaniel Barkalow2008-07-23
| | | | | | | At least, this is true in 2007.2, according to the documentation. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Don't cut off last character of commit descriptions.Nikolaj Schumacher2008-07-21
| | | | | | | | | | This should have been part of 24a2293 (git-blame.el: show the when, who and what in the minibuffer., 2008-02-12), that changed from using --pretty=oneline to --pretty=format:... without terminating newline. Acked-by: David Kågedal <davidk@lysator.liu.se> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Rename .git/rebase to .git/rebase-applyJohannes Schindelin2008-07-21
| | | | | | | | | | With git-am, it sounds awkward to have the patches in ".git/rebase/", but for technical reasons, we have to keep the same directory name for git-am and git-rebase. ".git/rebase-apply" seems to be a good compromise. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'sb/dashless'Junio C Hamano2008-07-16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sb/dashless: Make usage strings dash-less t/: Use "test_must_fail git" instead of "! git" t/test-lib.sh: exit with small negagive int is ok with test_must_fail Conflicts: builtin-blame.c builtin-mailinfo.c builtin-mailsplit.c builtin-shortlog.c git-am.sh t/t4150-am.sh t/t4200-rerere.sh
* \ Merge branch 'mv/merge-in-c'Junio C Hamano2008-07-15
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * mv/merge-in-c: reduce_heads(): protect from duplicate input reduce_heads(): thinkofix Add a new test for git-merge-resolve t6021: add a new test for git-merge-resolve Teach merge.log to "git-merge" again Build in merge Fix t7601-merge-pull-config.sh on AIX git-commit-tree: make it usable from other builtins Add new test case to ensure git-merge prepends the custom merge message Add new test case to ensure git-merge reduces octopus parents when possible Introduce reduce_heads() Introduce get_merge_bases_many() Add new test to ensure git-merge handles more than 25 refs. Introduce get_octopus_merge_bases() in commit.c git-fmt-merge-msg: make it usable from other builtins Move read_cache_unmerged() to read-cache.c Add new test to ensure git-merge handles pull.twohead and pull.octopus Move parse-options's skip_prefix() to git-compat-util.h Move commit_list_count() to commit.c Move split_cmdline() to alias.c Conflicts: Makefile parse-options.c
| * | Build in mergeMiklos Vajna2008-07-07
| | | | | | | | | | | | | | | | | | Mentored-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Rename ".dotest/" to ".git/rebase" and ".dotest-merge" to "rebase-merge"Johannes Schindelin2008-07-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the files generated and used during a rebase are never to be tracked, they should live in $GIT_DIR. While at it, avoid the rather meaningless term "dotest" to "rebase", and unhide ".dotest-merge". This was wished for on the mailing list, but so far unimplemented. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | bash completion: Remove dashed command completion supportShawn O. Pearce2008-07-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since only 'git' and 'gitk' are in the user's $PATH now we do not expect users to need completion support for git-fetch, and expect they will instead rely upon the completion support for 'git fetch'. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'sp/maint-bash-completion-optim'Junio C Hamano2008-07-14
|\ \ \ | | | | | | | | | | | | | | | | | | | | * sp/maint-bash-completion-optim: bash completion: Resolve git show ref:path<tab> losing ref: portion bash completion: Append space after file names have been completed
| * | | bash completion: Resolve git show ref:path<tab> losing ref: portionShawn O. Pearce2008-07-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linus reported that the bash completion for git show often dropped the ref portion of the argument (stuff before the :) when trying to complete a file name of a file in another branch or tag. Björn Steinbrink tracked it down to the gvfs completion script which comes standard on many Fedora Core based systems. That is removing : from COMP_WORDBREAKS, making readline treat the entire argument (including the ref) as the name that must be completed. When the git completion routines supplied a completion of just the filename, readline replaced everything. Since Git users often need to use "ref:path" or "ref:ref" sort of arguments, and expect completion support on both sides of the : we really want the : in COMP_WORDBREAKS to provide a good user experience. This is also the default that ships with bash as it can be useful in other contexts, such as rcp/scp. We now try to add : back to COMP_WORDBREAKS if it has been removed by a script that loaded before us. However if this doesn't work (as the : is stripped after we load) we fallback in the completion routines to include "ref:" as part of the prefix for completions, allowing readine to fully insert the argument the user wanted. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | bash completion: Append space after file names have been completedShawn O. Pearce2008-07-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When completing `git show origin/maint:Makef<tab>` we should add a space after the filename has been completed, so that the user can immediately begin the next argument. I also added a special case for the symlink variant so we treat it just like a normal blob, as there are no items below it in the Git tree structure. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | bash: Add long option completion for 'git send-email'Teemu Likonen2008-07-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the following long options to be completed with 'git send-email': --bcc --cc --cc-cmd --chain-reply-to --compose --dry-run --envelope-sender --from --identity --in-reply-to --no-chain-reply-to --no-signed-off-by-cc --no-suppress-from --no-thread --quiet --signed-off-by-cc --smtp-pass --smtp-server --smtp-server-port --smtp-ssl --smtp-user --subject --suppress-cc --suppress-from --thread --to Short ones like --to and --cc are not usable for actual completion because of the shortness itself and because there are longer ones which start with same letters (--thread, --compose). It's still useful to have these shorter options _listed_ when user presses TAB key after typing two dashes. It gives user an idea what options are available (and --to and --cc are probably the most commonly used). Signed-off-by: Teemu Likonen <tlikonen@iki.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'sp/maint-bash-completion-optim'Junio C Hamano2008-07-13
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | * sp/maint-bash-completion-optim: bash completion: Don't offer "a.." as a completion for "a." bash completion: Improve responsiveness of git-log completion
| * | | bash completion: Don't offer "a.." as a completion for "a."Shawn O. Pearce2008-07-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the user is trying to complete "v1.5.3.<tab>" to see all of the available maintenance releases for 1.5.3 we should not give them an extra dot as the completion. Instead if the user wants a ".." or a "..." operator they should key the two dots out on their own. Its the same number of keystrokes either way. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | bash completion: Improve responsiveness of git-log completionShawn O. Pearce2008-07-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Junio noticed the bash completion has been taking a long time lately. Petr Baudis tracked it down to 72e5e989b ("bash: Add space after unique command name is completed."). Tracing the code showed we spent significant time inside of this loop within __gitcomp, due to the string copying overhead. [28.146109654] _git common over [28.164791148] gitrefs in [28.280302268] gitrefs dir out [28.300939737] gitcomp in [28.308378112] gitcomp pre-case * [28.313407453] gitcomp iter in * [28.701270296] gitcomp iter out [28.713370786] out normal Since __git_refs avoids this string copying by forking and using echo we use the same trick here when we need to finish generating the names for the caller. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'sg/stash-k-i'Junio C Hamano2008-07-13
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | * sg/stash-k-i: Documentation: tweak use case in "git stash save --keep-index" stash: introduce 'stash save --keep-index' option
| * | | stash: introduce 'stash save --keep-index' optionSZEDER Gábor2008-07-05
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'git stash save' saves local modifications to a new stash, and runs 'git reset --hard' to revert them to a clean index and work tree. When the '--keep-index' option is specified, after that 'git reset --hard' the previous contents of the index is restored and the work tree is updated to match the index. This option is useful if the user wants to commit only parts of his local modifications, but wants to test those parts before committing. Also add support for the completion of the new option, and add an example use case to the documentation. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'maint'Junio C Hamano2008-07-09
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | * maint: Start preparing release notes for 1.5.6.3 git-submodule - Fix bugs in adding an existing repo as a module bash: offer only paths after '--' Remove unnecessary pack-*.keep file after successful git-clone make deleting a missing ref more quiet
| * | bash: offer only paths after '--'SZEDER Gábor2008-07-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many git commands use '--' to separate subcommands, options, and refs from paths. However, the programmable completion for several of these commands does not respect the '--', and offer subcommands, options, or refs after a '--', although only paths are permitted. e.g. 'git bisect -- <TAB>' offers subcommands, 'git log -- --<TAB>' offers options and 'git log -- git<TAB>' offers all gitgui tags. The completion for the following commands share this wrong behaviour: am add bisect commit diff log reset shortlog submodule gitk. To avoid this, we check the presence of a '--' on the command line first and let the shell do filename completion, if one is found. 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>
* | | Git.pm: Add remote_refs() git-ls-remote frontendPetr Baudis2008-07-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch also converts the good ole' git-remote.perl to use it. It is otherwise used in the repo.or.cz machinery and I guess other scripts might find it useful too. Unfortunately, git-ls-remote --heads . is subtly different from git-ls-remote . refs/heads/ (since the second matches anywhere in the string, not just at the beginning) so we have to provide interface for both. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | completion: add branch options --contains --merged --no-mergedEric Raible2008-07-08
| | | | | | | | | | | | | | | | | | Signed-off-by: Eric Raible <raible@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'js/import-zip'Junio C Hamano2008-07-07
|\ \ \ | | | | | | | | | | | | | | | | * js/import-zip: Add another fast-import example, this time for .zip files
| * | | Add another fast-import example, this time for .zip filesJohannes Schindelin2008-07-01
| | |/ | |/| | | | | | | | | | Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | completion.bash: add 'skip' and 'run' to git-bisectDmitry Potapov2008-07-07
| | | | | | | | | | | | | | | | | | Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | hg-to-git: use git init instead of git init-dbMiklos Vajna2008-07-05
| | | | | | | | | | | | | | | Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | hg-to-git: rewrite "git-frotz" to "git frotz"Miklos Vajna2008-07-05
| | | | | | | | | | | | | | | | | | | | | | | | This is not just nice but necessary since git-frotz is no longer in PATH. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>