Commit graph

833 commits

Author SHA1 Message Date
SZEDER Gábor c07838371b bash: offer refs instead of filenames for 'git revert'
The completion script for 'git revert' currently offers options and
filenames.  However, 'git revert' doesn't take any filenames from the
command line, but a single commit.  Therefore, it's more sane to offer
refs instead.

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>
2008-11-27 18:35:07 -08:00
SZEDER Gábor 8d8163f377 bash: remove dashed command leftovers
Commit 5a625b07 (bash: remove fetch, push, pull dashed form leftovers,
2008-10-03) did that already, but there were still some git-cmd left
here and there.

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>
2008-11-27 18:29:53 -08:00
Pete Wyckoff 3d51c853df git-p4: fix keyword-expansion regex
This text:

     my $dir = $File::Find::dir;
     return if ($dir !~ m,$options->{dirpat}$,);

was improperly converted to:

     my $dir = $File$dir !~ m,$options->{dirpat}$,);

by the keyword identifier expansion code.  Add a \n
to make sure the regex doesn't go across end-of-line
boundaries.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Acked-by: Simon Hausmann <simon@lst.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-27 13:17:58 -08:00
Markus Heidelberg 41d8cf7d7f bash completion: add doubledash to "git show"
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-31 00:46:27 -07:00
Dan McGee 3b1eb12493 contrib: update packinfo.pl to not use dashed commands
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-18 06:20:27 -07:00
Mikael Magnusson 6c2a6022db Typo "does not exists" when git remote update remote. 2008-10-16 08:20:15 -07:00
SZEDER Gábor 5a625b07bb bash: remove fetch, push, pull dashed form leftovers
We don't provide complation for git-commands in dashed form anymore,
so there is no need to keep those cases.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Tested-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-10-05 23:48:43 -07:00
Todd Zullinger 18309f4c3e Use dashless git commands in setgitperms.perl
Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-22 09:36:12 -07:00
Eric Raible aa5735bed4 completion: git commit should list --interactive
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>
2008-09-19 19:47:36 -07:00
Petr Baudis ff2549dc9a bash completion: Hide more plumbing commands
git <tab><tab> still shows way too many commands, some of them
are clearly plumbing. This patch hides the plumbing commands
liberally (that is, in special cases, users still might want to
call one of the hidden commands, a *normal* workflow should never
involve these, though - and if it does, we have a UI problem anyway).

Signed-off-by: Petr Baudis <pasky@suse.cz>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-03 20:41:47 -07:00
Simon Hausmann f5f7e4a18c Clean up the git-p4 documentation
This patch massages the documentation a bit for improved readability and cleans
it up from outdated options/commands.

Signed-off-by: Simon Hausmann <simon@lst.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-24 12:00:14 -07:00
Tor Arvid Lund 893d340f2c git-p4: Fix one-liner in p4_write_pipe function.
The function built a p4 command string via the p4_build_cmd function, but
ignored the result.

Signed-off-by: Tor Arvid Lund <torarvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-22 22:40:13 -07:00
Eric Raible f135aacb5a Completion: add missing '=' for 'diff --diff-filter'
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>
2008-08-22 16:15:21 -07:00
Junio C Hamano 25b3d4d6f3 completion: find out supported merge strategies correctly
"git-merge" is a binary executable these days, and looking for assignment
to $all_strategies variable with grep/sed does not work well.

When asked for an unknown strategy, pre-1.6.0 and post-1.6.0 "git merge"
commands respectively say:

    $ $HOME/git-snap-v1.5.6.5/bin/git merge -s help
    available strategies are: recur recursive octopus resolve stupid ours subtree
    $ $HOME/git-snap-v1.6.0/bin/git merge -s help
    Could not find merge strategy 'help'.
    Available strategies are: recursive octopus resolve ours subtree.

both on their standard error stream.  We can use this to learn what
strategies are supported.

The sed script is written in such a way that it catches both old and new
message styles ("Available" vs "available", and the full stop at the end).
It also allows future versions of "git merge" to line-wrap the list of
strategies, and add extra comments, like this:

    $ $HOME/git-snap-v1.6.1/bin/git merge -s help
    Could not find merge strategy 'help'.
    Available strategies are: blame recursive octopus resolve ours
    subtree.
    Also you have custom strategies: theirs

    Make sure you spell strategy names correctly.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-20 15:48:52 -07:00
Junio C Hamano a1975c4fea Merge branch 'ak/p4'
* ak/p4:
  Utilise our new p4_read_pipe and p4_write_pipe wrappers
  Add p4 read_pipe and write_pipe wrappers
  Put in the two other configuration elements found in the source
  Put some documentation in about the parameters that have been added
  Move git-p4.syncFromOrigin into a configuration parameters section
  Consistently use 'git-p4' for the configuration entries
  If the user has configured various parameters, use them.
  Switch to using 'p4_build_cmd'
  If we are in verbose mode, output what we are about to run (or return)
  Add a single command that will be used to construct the 'p4' command
  Utilise the new 'p4_system' function.
  Have a command that specifically invokes 'p4' (via system)
  Utilise the new 'p4_read_pipe_lines' command
  Create a specific version of the read_pipe_lines command for p4 invocations

Conflicts:
	contrib/fast-import/git-p4
2008-08-17 10:53:57 -07:00
Robert Blum 053fd0c1c3 git-p4: chdir now properly sets PWD environment variable in msysGit
P4 on Windows expects the PWD environment variable to be set to the
current working dir, but os.chdir in python doesn't do so.

Signed-off-by: Robert Blum <rob.blum@gmail.com>
Acked-by: Simon Hausmann <simon@lst.de>
Acked-by: Han-Wen Nienhuys <hanwen@xs4all.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-16 23:37:04 -07:00
Marcus Griep 2946cccfdf bash-completion: Add non-command git help files to bash-completion
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>
2008-08-16 02:32:01 -07:00
Anand Kumria a7d3ef9d09 Utilise our new p4_read_pipe and p4_write_pipe wrappers
Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-14 18:14:24 -07:00
Anand Kumria d9429194f6 Add p4 read_pipe and write_pipe wrappers
Two additional wrappers to cover 3 places where we utilise p4 in piped
form.  Found by Tor Arvid Lund.

Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-14 18:14:23 -07:00
Lee Marlow 5a13c8f6f7 bash completion: Add '--merge' long option for 'git log'
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>
2008-08-14 17:49:12 -07:00
Lee Marlow b4c72162f6 bash completion: Add completion for 'git mergetool'
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>
2008-08-14 17:49:12 -07:00
Eric Raible 7950659dc9 bash completion: 'git apply' should use 'fix' not 'strip'
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>
2008-08-14 17:49:12 -07:00
Anand Kumria 5b5aa22f00 Put in the two other configuration elements found in the source
I am not entirely clear what these parameters do but felt it
 useful to call them out in the documentation.

Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:04 -07:00
Anand Kumria b87a659635 Put some documentation in about the parameters that have been added
Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:04 -07:00
Anand Kumria bc02acfc76 Move git-p4.syncFromOrigin into a configuration parameters section
Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:04 -07:00
Anand Kumria 3cafb7d8ce Consistently use 'git-p4' for the configuration entries
Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:04 -07:00
Anand Kumria abcaf07360 If the user has configured various parameters, use them.
Some repositories require authentication and access to certain
 hosts. Allow git-p4 to pull this information from the configuration

Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:04 -07:00
Anand Kumria 155af83491 Switch to using 'p4_build_cmd'
Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:04 -07:00
Anand Kumria ee06427aa6 If we are in verbose mode, output what we are about to run (or return)
Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:04 -07:00
Anand Kumria 21a5075385 Add a single command that will be used to construct the 'p4' command
Rather than having three locations where the 'p4' command is built up,
 refactor this into the one place. This will, eventually, allow us to
 have one place where we modify the evironment or pass extra
 command-line options to the 'p4' binary.

Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:04 -07:00
Anand Kumria 87b611d5fd Utilise the new 'p4_system' function.
Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:03 -07:00
Anand Kumria bf9320f151 Have a command that specifically invokes 'p4' (via system)
Similiar to our 'p4_read_pipe_lines' command, we can isolate
 specific changes to the invocation method in the one location
 with this change.

Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:03 -07:00
Anand Kumria b340fa4301 Utilise the new 'p4_read_pipe_lines' command
Now that we have the new command, we can utilise it and then
 eventually, isolate any changes required to the one place.

Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:03 -07:00
Anand Kumria 2318121bab Create a specific version of the read_pipe_lines command for p4 invocations
This will make it easier to isolate changes to how 'p4' is invoked
 (whether with parameters or not, etc.).

Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:03 -07:00
SZEDER Gábor 5a7ebd4faa bash: remove redundant check for 'git stash apply' options
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>
2008-08-08 16:10:39 -07:00
Lee Marlow 1127c51cfe bash completion: Add completion for 'git mv'
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>
2008-08-05 21:21:20 -07:00
Lee Marlow b1bc1494ed bash completion: Add completion for 'git ls-files'
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>
2008-08-05 21:21:19 -07:00
Lee Marlow b3191ce2d5 bash completion: Add completion for 'git archive'
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>
2008-08-05 21:21:19 -07:00
Lee Marlow 95d43780cf bash completion: More completions for 'git stash'
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>
2008-08-05 21:21:19 -07:00
Lee Marlow a6c2be244f bash completion: Add completion for 'git revert'
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>
2008-08-05 21:21:19 -07:00
Lee Marlow 5dad868b26 bash completion: Add completion for 'git init'
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>
2008-08-05 21:21:19 -07:00
Lee Marlow 4181c7e8a7 bash completion: Add completion for 'git clean'
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>
2008-08-05 21:21:19 -07:00
Lee Marlow 3eb1101207 bash completion: Add completion for 'git clone'
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>
2008-08-05 21:21:19 -07:00
Lee Marlow c72e0db1ff bash completion: Add completion for 'git grep'
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>
2008-08-04 21:48:51 -07:00
Lee Marlow e49b99a6f5 bash completion: Add more long options for 'git log'
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>
2008-08-02 15:22:10 -07:00
Lee Marlow 7339479c2b bash completion: remove unused function _git_diff_tree
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>
2008-08-02 15:22:10 -07:00
Todd Zullinger 5354a56fe7 Replace uses of "git-var" with "git var"
Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-30 11:42:01 -07:00
Lee Marlow 1eb7e2f834 bash completion: Add completion for 'git help'
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>
2008-07-27 14:14:01 -07:00
Thomas Rast cbb504c974 bash completion: Add long options for 'git describe'
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>
2008-07-27 14:14:00 -07:00
SZEDER Gábor c84bb14ce5 bash: offer only paths after '--' for 'git checkout'
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>
2008-07-24 23:29:50 -07:00