summaryrefslogtreecommitdiff
path: root/contrib
AgeCommit message (Collapse)Author
2014-03-31comments: fix misuses of "nor"Justin Lebar
Signed-off-by: Justin Lebar <jlebar@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-31contrib: fix misuses of "nor"Justin Lebar
Signed-off-by: Justin Lebar <jlebar@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-27Merge branch 'jk/complete-merge-base'Junio C Hamano
* jk/complete-merge-base: completion: handle --[no-]fork-point options to git-rebase completion: complete merge-base options
2014-01-27Merge branch 'ab/subtree-doc'Junio C Hamano
* ab/subtree-doc: subtree: fix argument validation in add/pull/push
2014-01-13subtree: fix argument validation in add/pull/pushAnthony Baire
When working with a remote repository add/pull/push do not accept a <refspec> as parameter but just a <ref>. They should accept any well-formatted ref name. This patch: - relaxes the check the <ref> argument in "git subtree add <repo>" (previous code would not accept a ref name that does not exist locally too, new code only ensures that the ref is well formatted) - add the same check in "git subtree pull/push" + check the number of parameters - update the doc to use <ref> instead of <refspec> Signed-off-by: Anthony Baire <Anthony.Baire@irisa.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-13completion: handle --[no-]fork-point options to git-rebaseJohn Keeping
Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-13completion: complete merge-base optionsJohn Keeping
Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-13Merge branch 'rr/completion-format-coverletter'Junio C Hamano
The bash/zsh completion code did not know about format.coverLetter among many format.* configuration variables. * rr/completion-format-coverletter: completion: complete format.coverLetter
2014-01-07completion: complete format.coverLetterRamkumar Ramachandra
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-06completion: fix remote.pushdefaultRamkumar Ramachandra
When attempting to complete $ git config remote.push<TAB> 'pushdefault' doesn't come up. This is because "$cur" is matched with "remote.*" and a list of remotes are completed. Add 'pushdefault' as a candidate for completion too, using __gitcomp_nl_append (). Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-06completion: fix branch.autosetup(merge|rebase)Ramkumar Ramachandra
When attempting to complete $ git config branch.auto<TAB> 'autosetupmerge' and 'autosetuprebase' don't come up. This is because "$cur" is matched with "branch.*" and a list of branches are completed. Add 'autosetupmerge', 'autosetuprebase' as candidates for completion too, using __gitcomp_nl_append (). Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-06completion: introduce __gitcomp_nl_append ()Ramkumar Ramachandra
There are situations where multiple classes of completions possible. For example branch.<TAB> should try to complete branch.master. branch.autosetupmerge branch.autosetuprebase The first candidate has the suffix ".", and the second/ third candidates have the suffix " ". To facilitate completions of this kind, create a variation of __gitcomp_nl () that appends to the existing list of completion candidates, COMPREPLY. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-06zsh completion: find matching custom bash completionRamkumar Ramachandra
If zsh completion is being read from a location that is different from system-wide default, it is likely that the user is trying to use a custom version, perhaps closer to the bleeding edge, installed in her own directory. We will more likely to find the matching bash completion script in the same directory than in those system default places. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-27Merge branch 'fc/remote-helper-fixes'Junio C Hamano
* fc/remote-helper-fixes: remote-hg: test 'shared_path' in a moved clone remote-hg: add tests for special filenames remote-hg: fix 'shared path' path remote-helpers: add extra safety checks remote-hg: avoid buggy strftime()
2013-12-27Merge branch 'js/gnome-keyring'Junio C Hamano
Style fix. * js/gnome-keyring: contrib/git-credential-gnome-keyring.c: small stylistic cleanups
2013-12-26remote-hg: test 'shared_path' in a moved cloneAntoine Pelisse
Since e71d1378 (remote-hg: fix 'shared path' path, 2013-12-07), Mercurial 'shared_path' file is correctly updated whenever a clone is moved. Make sure it keeps working, especially as this is depending on a private Mercurial file. Signed-off-by: Antoine Pelisse <apelisse@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-16contrib/git-credential-gnome-keyring.c: small stylistic cleanupsJohn Szakmeister
Signed-off-by: John Szakmeister <john@szakmeister.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-12-12Merge branch 'jn/scripts-updates'Junio C Hamano
* jn/scripts-updates: remove #!interpreter line from shell libraries test: replace shebangs with descriptions in shell libraries test: make FILEMODE a lazy prereq contrib: remove git-p4import mark contributed hooks executable mark perl test scripts executable mark Windows build scripts executable
2013-12-12Merge branch 'jk/remove-deprecated'Junio C Hamano
* jk/remove-deprecated: stop installing git-tar-tree link peek-remote: remove deprecated alias of ls-remote lost-found: remove deprecated command tar-tree: remove deprecated command repo-config: remove deprecated alias for "git config"
2013-12-09remote-hg: add tests for special filenamesFelipe Contreras
So that we check that UTF-8 and spaces work fine. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-09remote-hg: fix 'shared path' pathFelipe Contreras
If the repository is moved, the absolute path of the shared repository would fail. Make sure it's always up-to-date. Reported-by: Michael Davis <mjmdavis@gmail.com> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-09remote-helpers: add extra safety checksFelipe Contreras
Suggested-by: Roman Ovchinnikov <coolthecold@gmail.com> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-09remote-hg: avoid buggy strftime()jcb91
error on pull: fatal: Invalid raw date "" in ident: remote-hg <> Neither %s nor %z are officially supported by python, they may work on some (most?) platforms, but not all. removed strftime use of %s and %z, which are not officially supported by python, with standard formats Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-06Merge branch 'rh/remote-hg-bzr-updates'Junio C Hamano
Updates to remote-bzr and remote-hg in contrib. * rh/remote-hg-bzr-updates: remote-bzr, remote-hg: fix email address regular expression test-hg.sh: help user correlate verbose output with email test test-hg.sh: fix duplicate content strings in author tests test-hg.sh: avoid obsolete 'test' syntax test-hg.sh: eliminate 'local' bashism test-bzr.sh, test-hg.sh: prepare for change to push.default=simple test-bzr.sh, test-hg.sh: allow running from any dir test-lib.sh: convert $TEST_DIRECTORY to an absolute path
2013-12-05Sync with 1.8.5Junio C Hamano
2013-12-05Merge branch 'jn/mediawiki-makefile-updates'Junio C Hamano
Build and installation procedure clean-up. * jn/mediawiki-makefile-updates: git-remote-mediawiki build: handle DESTDIR/INSTLIBDIR with whitespace git-remote-mediawiki build: make 'install' command configurable git-remote-mediawiki: honor DESTDIR in "make install" git-remote-mediawiki: do not remove installed files in "clean" target
2013-12-03Merge branch 'mi/typofixes'Junio C Hamano
* mi/typofixes: contrib: typofixes Documentation/technical/http-protocol.txt: typofixes typofixes: fix misspelt comments
2013-11-26remove #!interpreter line from shell librariesJonathan Nieder
In a shell snippet meant to be sourced by other shell scripts, an opening #! line does more harm than good. The harm: - When the shell library is sourced, the interpreter and options from the #! line are not used. Specifying a particular shell can confuse the reader into thinking it is safe for the shell library to rely on idiosyncrasies of that shell. - Using #! instead of a plain comment drops a helpful visual clue that this is a shell library and not a self-contained script. - Tools such as lintian can use a #! line to tell when an installation script has failed by forgetting to set a script executable. This check does not work if shell libraries also start with a #! line. The good: - Text editors notice the #! line and use it for syntax highlighting if you try to edit the installed scripts (without ".sh" suffix) in place. The use of the #! for file type detection is not needed because Git's shell libraries are meant to be edited in source form (with ".sh" suffix). Replace the opening #! lines with comments. This involves tweaking the test harness's valgrind support to find shell libraries by looking for "# " in the first line instead of "#!" (see v1.7.6-rc3~7, 2011-06-17). Suggested by Russ Allbery through lintian. Thanks to Jeff King and Clemens Buchacher for further analysis. Tested by searching for non-executable scripts with #! line: find . -name .git -prune -o -type f -not -executable | while read file do read line <"$file" case $line in '#!'*) echo "$file" ;; esac done The only remaining scripts found are templates for shell scripts (unimplemented.sh, wrap-for-bin.sh) and sample input used in tests (t/t4034/perl/{pre,post}). Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-26contrib: remove git-p4importJonathan Nieder
The git p4import documentation has suggested git p4 as a better alternative for more than 6 years. (According to the mailing list discussion when it was moved to contrib/, git-p4import has serious bugs --- e.g., its incremental mode just doesn't work.) Since then, git p4 has been actively developed and was promoted to a standard git command alongside git svn. Searches on google.com/trends and stackoverflow suggest that no one is looking for git-p4import any more. Remove it. Noticed while considering marking the contrib/p4import/git-p4import.py script executable as part of a wider sweep. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-25mark contributed hooks executableJonathan Nieder
The docs in contrib/hooks/pre-auto-gc-battery suggest: For example, if the hook is stored in /usr/share/git-core/contrib/hooks/pre-auto-gc-battery: chmod a+x pre-auto-gc-battery cd /path/to/your/repository.git ln -sf /usr/share/git-core/contrib/hooks/pre-auto-gc-battery \ hooks/pre-auto-gc Unfortunately on multi-user systems most users do not have write access to /usr. Better to mark the sample hooks executable in the first place so users do not have to tweak their permissions to use them by symlinking into .git/hooks/. Reported-by: Olivier Berger <olivier.berger@it-sudparis.eu> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-25mark Windows build scripts executableJonathan Nieder
On Windows the convention is to rely on filename extensions to decide whether a file is executable so Windows users are probably not relying on the executable bit of these scripts, but on other platforms it can be useful documentation. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-18remote-bzr, remote-hg: fix email address regular expressionRichard Hansen
Before, strings like "foo.bar@example.com" would be converted to "foo. <bar@example.com>" when they should be "unknown <foo.bar@example.com>". Signed-off-by: Richard Hansen <rhansen@bbn.com> Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-18test-hg.sh: help user correlate verbose output with email testRichard Hansen
It's hard to tell which author conversion test failed when the email addresses look similar. Signed-off-by: Richard Hansen <rhansen@bbn.com> Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-18test-hg.sh: fix duplicate content strings in author testsRichard Hansen
"beta" was used twice. Change the second copy to "gamma" and increment the remaining content strings. Signed-off-by: Richard Hansen <rhansen@bbn.com> Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-18test-hg.sh: avoid obsolete 'test' syntaxRichard Hansen
The POSIX spec says that the '-a', '-o', and parentheses operands to the 'test' utility are obsolete extensions due to the potential for ambiguity. Replace '-o' with '|| test' to avoid unspecified behavior. Signed-off-by: Richard Hansen <rhansen@bbn.com> Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-18test-hg.sh: eliminate 'local' bashismRichard Hansen
Unlike bash, POSIX shell does not specify a 'local' command for declaring function-local variable scope. Except for IFS, the variable names are not used anywhere else in the script so simply remove the 'local'. For IFS, move the assignment to the 'read' command to prevent it from affecting code outside the function. Signed-off-by: Richard Hansen <rhansen@bbn.com> Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-18test-bzr.sh, test-hg.sh: prepare for change to push.default=simpleRichard Hansen
Change 'git push <remote>' to 'git push <remote> <branch>' in one of the test-bzr.sh tests to ensure that the test continues to pass when the default value of push.default changes to simple. Signed-off-by: Richard Hansen <rhansen@bbn.com> Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-18test-bzr.sh, test-hg.sh: allow running from any dirFelipe Contreras
Set TEST_DIRECTORY to the t/ directory (if TEST_DIRECTORY is not already set) so that the user doesn't already have to be in the test directory to run these test scripts. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Based-on-patch-by: Richard Hansen <rhansen@bbn.com> Reviewed-by: Richard Hansen <rhansen@bbn.com> Signed-off-by: Richard Hansen <rhansen@bbn.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-18remote-hg: don't decode UTF-8 paths into Unicode objectsRichard Hansen
The internal mercurial API expects ordinary 8-bit string objects, not Unicode string objects. With this change, the test-hg.sh unit tests pass again. Signed-off-by: Richard Hansen <rhansen@bbn.com> Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-12peek-remote: remove deprecated alias of ls-remoteJohn Keeping
This has been deprecated since commit 87194d2 (Deprecate peek-remote, 2007-11-24), included in version 1.5.4. Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-12lost-found: remove deprecated commandJohn Keeping
"git lost-found" has been deprecated since commit fc8b5f0 (Deprecate git-lost-found, 2007-11-08), included in version 1.5.4. Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-12tar-tree: remove deprecated commandJohn Keeping
"git tar-tree" has been a thin wrapper around "git archive" since commit fd88d9c (Remove upload-tar and make git-tar-tree a thin wrapper to git-archive, 2006-09-24), which also made it print a message indicating that git-tar-tree is deprecated. Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-12repo-config: remove deprecated alias for "git config"John Keeping
The release notes for Git 1.5.4 say that "git repo-config" will be removed in the next feature release. Since Git 2.0 is nearly here, remove it. Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-12contrib: typofixesMasanari Iida
Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-11git-remote-mediawiki build: handle DESTDIR/INSTLIBDIR with whitespaceJonathan Nieder
Quote DESTDIR and INSTLIBDIR for the shell in the same way as is done in the toplevel Makefile to avoid confusion in case they contain shell metacharacters. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-11git-remote-mediawiki build: make 'install' command configurableJonathan Nieder
On some machines, the most usable 'install' tool is named 'ginstall'. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-11git-remote-mediawiki: honor DESTDIR in "make install"Jonathan Nieder
So now you can run DESTDIR=$(pwd)/tmp make -Ccontrib/mw-to-git install to install the mediawiki remote helper, git-mw tool, and Git::Mediawiki perl module under tmp/ as preparation for zipping it up and extracting on another machine. While at it, make sure the directory that should contain Git::Mediawiki exists before putting a file there. Without this patch, the makefile uses DESTDIR when installing git-mw and git-remote-mediawiki but not the perl module, resulting in errors from "make install" if the $(INSTLIBDIR)/Git directory does not exist: install: cannot create regular file \ '/usr/share/perl/5.18.1/Git/Mediawiki.pm': No such file or directory Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-11git-remote-mediawiki: do not remove installed files in "clean" targetJonathan Nieder
Running "make clean" after a successful "make install" should not result in a broken mediawiki remote helper. Reported-by: Thorsten Glaser <t.glaser@tarent.de> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-04Merge branch 'jk/subtree-install-fix'Junio C Hamano
* jk/subtree-install-fix: subtree: add makefile target for html docs
2013-11-01Merge branch 'ap/remote-hg-unquote-cquote'Junio C Hamano
A fast-import stream expresses a pathname with funny characters by quoting them in C style; remote-hg remote helper forgot to unquote such a path. * ap/remote-hg-unquote-cquote: remote-hg: unquote C-style paths when exporting