Commit graph

1671 commits

Author SHA1 Message Date
Felipe Contreras 7655fa7fa9 completion: add more cherry-pick options
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-12 10:43:20 -07:00
Felipe Contreras fa7285dc3d remote-bzr: improve tag handling
revision_history() is deprecated and doesn't do what we want (revno
instead of dotted_revno?).

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-08 14:17:07 -07:00
Christophe Simonis 5ff4fc649e remote-bzr: fix utf-8 support for fetching
The previous patches didn't deal with all the scenarios.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-08 14:09:31 -07:00
Junio C Hamano 52a3e011c7 Sync with 1.8.2.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-07 15:28:50 -07:00
Junio C Hamano 41e9da40a8 Merge branch 'fc/remote-helpers-test-updates'
* fc/remote-helpers-test-updates:
  remote-hg: fix hg-git test-case
  remote-bzr: remove stale check code for tests
  remote-helpers: fix the run of all tests
  remote-bzr: avoid echo -n
2013-04-07 14:33:02 -07:00
Junio C Hamano 6466fbbeef Sync with 1.8.1.6 2013-04-07 13:17:50 -07:00
Torsten Bögershausen 0e9b327227 remote-helpers/test-bzr.sh: do not use "grep '\s'"
Using grep "devel\s\+3:" to find at least one whitspace is not
portable on all grep versions; not all grep versions understand "\s"
as a "whitespace".

Use a literal TAB followed by SPACE.

The + as a qualifier for "one or more" is not a basic regular
expression; use egrep instead of grep.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-07 08:41:34 -07:00
Felipe Contreras 6ff8d4e748 remote-bzr: add utf-8 support for pushing
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-07 00:39:28 -07:00
Timotheus Pokorra 5445b24e22 remote-bzr: add utf-8 support for fetching
[fc: added tests]

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-07 00:39:27 -07:00
Felipe Contreras 8954441ac7 remote-bzr: avoid unreferred tags
They have no content, there's nothing we can do with them.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-07 00:39:27 -07:00
Felipe Contreras f00f2511d9 remote-bzr: only update workingtree on local repos
Apparently, that's the only way it's possible.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-07 00:39:27 -07:00
David Engster 9d9d698c43 remote-bzr: set author if available
[fc: added tests]

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-07 00:39:27 -07:00
Christophe Simonis bc51f7c3e2 remote-bzr: remove files before modifications
Allow re-add of a deleted file in the same commit.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-07 00:39:26 -07:00
Christophe Simonis 82447e3361 remote-bzr: fix directory renaming
Git does not handle directories, renaming a directory is renaming every
files in this directory.

[fc: added tests]

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-07 00:39:26 -07:00
Junio C Hamano bfd70c53b3 Sync with maint
* maint:
  mailmap: update Pasky's address
  git-remote-mediawiki: new wiki URL in documentation
2013-04-04 13:03:50 -07:00
Matthieu Moy 9b924eee98 git-remote-mediawiki: new wiki URL in documentation
The Bibzball wiki is not maintained anymore.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-04 09:54:38 -07:00
Felipe Contreras 091e051e88 remote-hg: fix hg-git test-case
There was some lingering code that shouldn't have been there in the
first place.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-04 09:35:51 -07:00
Felipe Contreras c0e1ba4e17 remote-bzr: remove stale check code for tests
The fastimport plugin was only required in the early stage of
development.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-04 09:35:42 -07:00
Felipe Contreras e4f0e34c89 remote-helpers: fix the run of all tests
We don't need to check for duplicate test numbers, we don't have them,
and either way test-lint-duplicates doesn't work in this situation.

Also, while we are on it, enable test-lint-shell-syntax to check for sh
errors.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-04 09:35:20 -07:00
Felipe Contreras afeb525980 remote-bzr: avoid echo -n
It's not portable, as reported by test-lint.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-04 09:35:00 -07:00
Junio C Hamano 5ab3e4c1b2 Merge branch 'rr/prompt-revert-head'
The prompt string generator did not notice when we are in a middle
of a "git revert" session.

* rr/prompt-revert-head:
  bash: teach __git_ps1 about REVERT_HEAD
2013-04-03 09:34:43 -07:00
Junio C Hamano 41e603af58 Merge branch 'da/downcase-u-in-usage' into maint
* da/downcase-u-in-usage:
  contrib/mw-to-git/t/install-wiki.sh: use a lowercase "usage:" string
  contrib/examples/git-remote.perl: use a lowercase "usage:" string
  tests: use a lowercase "usage:" string
  git-svn: use a lowercase "usage:" string
  Documentation/user-manual.txt: use a lowercase "usage:" string
  templates/hooks--update.sample: use a lowercase "usage:" string
  contrib/hooks/setgitperms.perl: use a lowercase "usage:" string
  contrib/examples: use a lowercase "usage:" string
  contrib/fast-import/import-zips.py: use spaces instead of tabs
  contrib/fast-import/import-zips.py: fix broken error message
  contrib/fast-import: use a lowercase "usage:" string
  contrib/credential: use a lowercase "usage:" string
  git-cvsimport: use a lowercase "usage:" string
  git-cvsimport: use a lowercase "usage:" string
  git-cvsexportcommit: use a lowercase "usage:" string
  git-archimport: use a lowercase "usage:" string
  git-merge-one-file: use a lowercase "usage:" string
  git-relink: use a lowercase "usage:" string
  git-svn: use a lowercase "usage:" string
  git-sh-setup: use a lowercase "usage:" string
2013-04-01 09:19:04 -07:00
Robin Rosenberg 3ee4452837 bash: teach __git_ps1 about REVERT_HEAD
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-03-31 19:07:26 -07:00
Junio C Hamano b03b41e24c Merge branch 'jl/submodule-deinit'
There was no Porcelain way to say "I no longer am interested in
this submodule", once you express your interest in a submodule with
"submodule init".  "submodule deinit" is the way to do so.

* jl/submodule-deinit:
  submodule: add 'deinit' command
2013-03-25 14:00:29 -07:00
Junio C Hamano ea11711210 Merge branch 'tz/credential-authinfo'
A new read-only credential helper (in contrib/) to interact with
the .netrc/.authinfo files.  Hopefully mn/send-email-authinfo topic
can rebuild on top of something like this.

* tz/credential-authinfo:
  Add contrib/credentials/netrc with GPG support
2013-03-21 14:03:00 -07:00
Junio C Hamano c2bf648b84 Merge branch 'da/downcase-u-in-usage'
* da/downcase-u-in-usage:
  contrib/mw-to-git/t/install-wiki.sh: use a lowercase "usage:" string
  contrib/examples/git-remote.perl: use a lowercase "usage:" string
  tests: use a lowercase "usage:" string
  git-svn: use a lowercase "usage:" string
  Documentation/user-manual.txt: use a lowercase "usage:" string
  templates/hooks--update.sample: use a lowercase "usage:" string
  contrib/hooks/setgitperms.perl: use a lowercase "usage:" string
  contrib/examples: use a lowercase "usage:" string
  contrib/fast-import/import-zips.py: use spaces instead of tabs
  contrib/fast-import/import-zips.py: fix broken error message
  contrib/fast-import: use a lowercase "usage:" string
  contrib/credential: use a lowercase "usage:" string
  git-cvsimport: use a lowercase "usage:" string
  git-cvsimport: use a lowercase "usage:" string
  git-cvsexportcommit: use a lowercase "usage:" string
  git-archimport: use a lowercase "usage:" string
  git-merge-one-file: use a lowercase "usage:" string
  git-relink: use a lowercase "usage:" string
  git-svn: use a lowercase "usage:" string
  git-sh-setup: use a lowercase "usage:" string
2013-03-19 12:15:54 -07:00
Junio C Hamano f1eba9f055 Merge branch 'mp/complete-paths'
* mp/complete-paths:
  git-completion.bash: zsh does not implement function redirection correctly
2013-03-11 10:32:16 -07:00
Matthieu Moy 35ba83ccf6 git-completion.bash: zsh does not implement function redirection correctly
A recent change added functions whose entire standard error stream
is redirected to /dev/null using a construct that is valid POSIX.1
but is not widely used:

	funcname () {
		cd "$1" && run some command "$2"
	} 2>/dev/null

Even though this file is "git-completion.bash", zsh completion
support dot-sources it (instead of asking bash to grok it like tcsh
completion does), and zsh does not implement this redirection
correctly.

With zsh, trying to complete an inexistant directory gave this:

  git add no-such-dir/__git_ls_files_helper💿2: no such file or directory: no-such-dir/

Also these functions use "cd" to first go somewhere else before
running a command, but the location the caller wants them to go that
is given as an argument to them should not be affected by CDPATH
variable the users may have set for their interactive session.

To fix both of these, wrap the body of the function in a subshell,
unset CDPATH at the beginning of the subshell, and redirect the
standard error stream of the subshell to /dev/null.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-03-11 10:22:56 -07:00
Junio C Hamano c5443b2a1e Merge branch 'mp/complete-paths'
* mp/complete-paths:
  git-completion.zsh: define __gitcomp_file compatibility function
2013-03-07 13:11:55 -08:00
Matthieu Moy 926eb7ba4c git-completion.zsh: define __gitcomp_file compatibility function
Commit fea16b47b6 (Fri Jan 11 19:48:43 2013, Manlio Perillo,
git-completion.bash: add support for path completion), introduced a new
__gitcomp_file function that uses the bash builtin "compgen". The
function was redefined for ZSH in the deprecated section of
git-completion.bash, but not in the new git-completion.zsh script.

As a result, users of git-completion.zsh trying to complete "git add
fo<tab>" get an error:

git add fo__gitcomp_file:8: command not found: compgen

This patch adds the redefinition and removes the error.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-03-05 08:54:03 -08:00
Jens Lehmann cf41982806 submodule: add 'deinit' command
With "git submodule init" the user is able to tell git he cares about one
or more submodules and wants to have it populated on the next call to "git
submodule update". But currently there is no easy way he could tell git he
does not care about a submodule anymore and wants to get rid of his local
work tree (except he knows a lot about submodule internals and removes the
"submodule.$name.url" setting from .git/config together with the work tree
himself).

Help those users by providing a 'deinit' command. This removes the
whole submodule.<name> section from .git/config (either for the given
submodule(s) or for all those which have been initialized if '.' is used)
together with their work tree. Fail if the current work tree contains
modifications (unless forced), but don't complain when either the work
tree is already removed or no settings are found in .git/config.

Add tests and link the man pages of "git submodule deinit" and "git rm"
to assist the user in deciding whether removing or unregistering the
submodule is the right thing to do for him. Also add the deinit subcommand
to the completion list.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-03-04 14:48:02 -08:00
Karsten Blees 8b2d219a3d wincred: improve compatibility with windows versions
On WinXP, the windows credential helper doesn't work at all (due to missing
Cred[Un]PackAuthenticationBuffer APIs). On Win7, the credential format used
by wincred is incompatible with native Windows tools (such as the control
panel applet or 'cmdkey.exe /generic'). These Windows tools only set the
TargetName, UserName and CredentialBlob members of the CREDENTIAL
structure (where CredentialBlob is the UTF-16-encoded password).

Remove the unnecessary packing / unpacking of the password, along with the
related API definitions, for compatibility with Windows XP.

Don't use CREDENTIAL_ATTRIBUTEs to identify credentials for compatibility
with Windows credential manager tools. Parse the protocol, username, host
and path fields from the credential's target name instead.

Credentials created with an old wincred version will have mangled or empty
passwords after this change.

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
2013-02-26 17:42:46 +01:00
Karsten Blees 3b12f46ab3 wincred: accept CRLF on stdin to simplify console usage
The windows credential helper currently only accepts LF on stdin, but bash
and cmd.exe both send CRLF. This prevents interactive use in the console.

Change the stdin parser to optionally accept CRLF.

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
2013-02-26 17:42:24 +01:00
Ted Zlatanov 5482920919 Add contrib/credentials/netrc with GPG support
This credential helper supports multiple files, returning the first one
that matches.  It checks file permissions and owner.  For *.gpg files,
it will run GPG to decrypt the file.

Signed-off-by: Ted Zlatanov <tzz@lifelogs.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-25 13:46:14 -08:00
David Aguilar ebffb3d03c contrib/mw-to-git/t/install-wiki.sh: use a lowercase "usage:" string
Make the usage string consistent with Git.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-24 21:30:18 -08:00
David Aguilar f86cad7164 contrib/examples/git-remote.perl: use a lowercase "usage:" string
Make the usage string consistent with Git.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-24 21:30:15 -08:00
David Aguilar 00eae5ef13 contrib/hooks/setgitperms.perl: use a lowercase "usage:" string
Make the usage string consistent with Git.

Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-24 13:31:09 -08:00
David Aguilar beb5ab184c contrib/examples: use a lowercase "usage:" string
Make the usage string consistent with Git.

Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-24 13:31:09 -08:00
David Aguilar e257f0551f contrib/fast-import/import-zips.py: use spaces instead of tabs
Follow the conventional Python style by using 4-space indents
instead of hard tabs.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-24 13:31:08 -08:00
David Aguilar 61a7aaccf4 contrib/fast-import/import-zips.py: fix broken error message
The 'sys' module is not imported but all of the bits
we want from it are.  Adjust the script to not fail
when run on old Python versions and fix the inconsistent
use of tabs.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-24 13:31:08 -08:00
David Aguilar dd3a4ad95f contrib/fast-import: use a lowercase "usage:" string
Make the usage string consistent with Git.

Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-24 13:31:08 -08:00
David Aguilar c358ed756e contrib/credential: use a lowercase "usage:" string
Make the usage string consistent with Git.

Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-24 13:31:08 -08:00
Martin Erik Werner 31e6a4e613 shell-prompt: clean up nested if-then
Minor clean up of if-then nesting in checks for environment variables
and config options. No functional changes.

Signed-off-by: Martin Erik Werner <martinerikwerner@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-18 15:33:31 -08:00
Junio C Hamano abea4dc76a Merge branch 'mp/diff-algo-config'
Add diff.algorithm configuration so that the user does not type
"diff --histogram".

* mp/diff-algo-config:
  diff: Introduce --diff-algorithm command line option
  config: Introduce diff.algorithm variable
  git-completion.bash: Autocomplete --minimal and --histogram for git-diff
2013-02-17 15:25:52 -08:00
Junio C Hamano adbbc6f291 Merge branch 'mw/bash-prompt-show-untracked-config'
Allows skipping the untracked check GIT_PS1_SHOWUNTRACKEDFILES
asks for the git-prompt (in contrib/) per repository.

* mw/bash-prompt-show-untracked-config:
  t9903: add extra tests for bash.showDirtyState
  t9903: add tests for bash.showUntrackedFiles
  shell prompt: add bash.showUntrackedFiles option
2013-02-17 15:25:46 -08:00
Junio C Hamano b1bcb973af Merge branch 'mm/config-local-completion'
* mm/config-local-completion:
  completion: support 'git config --local'
2013-02-14 16:06:19 -08:00
Junio C Hamano 97a8f025e5 Merge branch 'mm/remote-mediawiki-build'
* mm/remote-mediawiki-build:
  git-remote-mediawiki: use toplevel's Makefile
  Makefile: make script-related rules usable from subdirectories
2013-02-14 10:29:49 -08:00
Junio C Hamano 260adc87b3 Merge branch 'dg/subtree-fixes'
contrib/subtree updates, but here are only the ones that looked
ready.  The remainder of the patches will have another day.

* dg/subtree-fixes:
  contrib/subtree: make the manual directory if needed
  contrib/subtree: honor DESTDIR
  contrib/subtree: fix synopsis
  contrib/subtree: better error handling for 'subtree add'
  contrib/subtree: use %B for split subject/body
  contrib/subtree: remove test number comments
2013-02-14 10:28:26 -08:00
Martin Erik Werner 66cb5d4420 shell prompt: add bash.showUntrackedFiles option
Add a config option 'bash.showUntrackedFiles' which allows enabling
the prompt showing untracked files on a per-repository basis. This is
useful for some repositories where the 'git ls-files ...' command may
take a long time.

Signed-off-by: Martin Erik Werner <martinerikwerner@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-13 08:06:57 -08:00
Matthieu Moy 66c0786ca5 completion: support 'git config --local'
This needs to be done in two places: __git_config_get_set_variables to
allow clever completion of "git config --local --get foo<tab>", and
_git_config to allow "git config --loc<tab>" to complete to --local.

While we're there, change the order of options in the code to match
git-config.txt.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-12 10:06:25 -08:00