summaryrefslogtreecommitdiff
path: root/contrib
AgeCommit message (Collapse)AuthorFilesLines
2014-04-08Merge branch 'jl/nor-or-nand-and'Libravatar Junio C Hamano5-8/+8
Eradicate mistaken use of "nor" (that is, essentially "nor" used not in "neither A nor B" ;-)) from in-code comments, command output strings, and documentations. * jl/nor-or-nand-and: code and test: fix misuses of "nor" comments: fix misuses of "nor" contrib: fix misuses of "nor" Documentation: fix misuses of "nor"
2014-04-02Merge branch 'ap/remote-hg-skip-null-bookmarks'Libravatar Junio C Hamano2-1/+77
* ap/remote-hg-skip-null-bookmarks: remote-hg: do not fail on invalid bookmarks
2014-03-31comments: fix misuses of "nor"Libravatar Justin Lebar3-5/+5
Signed-off-by: Justin Lebar <jlebar@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-31contrib: fix misuses of "nor"Libravatar Justin Lebar2-3/+3
Signed-off-by: Justin Lebar <jlebar@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-28Merge branch 'jk/subtree-prefix'Libravatar Junio C Hamano1-0/+1
A stray environment variable $prefix could have leaked into and affected the behaviour of the "subtree" script. * jk/subtree-prefix: subtree: initialize "prefix" variable
2014-03-25remote-hg: do not fail on invalid bookmarksLibravatar Max Horn2-1/+77
Mercurial can have bookmarks pointing to "nullid" (the empty root revision), while Git can not have references to it. When cloning or fetching from a Mercurial repository that has such a bookmark, the import failed because git-remote-hg was not be able to create the corresponding reference. Warn the user about the invalid reference, and do not advertise these bookmarks as head refs, but otherwise continue the import. In particular, we still keep track of the fact that the remote repository has a bookmark of the given name, in case the user wants to modify that bookmark. Also add some test cases for this issue. Reported-by: Antoine Pelisse <apelisse@gmail.com> Signed-off-by: Max Horn <max@quendi.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-18Merge branch 'fc/transport-helper-fixes'Libravatar Junio C Hamano3-4/+53
Updates transport-helper, fast-import and fast-export to allow the ref mapping and ref deletion in a way similar to the natively supported transports. * fc/transport-helper-fixes: remote-bzr: support the new 'force' option test-hg.sh: tests are now expected to pass transport-helper.c: do not overwrite forced bit transport-helper: check for 'forced update' message transport-helper: add 'force' to 'export' helpers transport-helper: don't update refs in dry-run transport-helper: mismerge fix
2014-03-17subtree: initialize "prefix" variableLibravatar Jeff King1-0/+1
We parse the "--prefix" command-line option into the "$prefix" shell variable. However, if we do not see such an option, the variable is left with whatever value it had in the environment. We should initialize it to a known value, like we do for other variables. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-14Merge branch 'lb/contrib-contacts-looser-diff-parsing'Libravatar Junio C Hamano1-2/+0
* lb/contrib-contacts-looser-diff-parsing: git-contacts: do not fail parsing of good diffs
2014-03-14Merge branch 'ss/completion-rec-sub-fetch-push'Libravatar Junio C Hamano1-1/+18
* ss/completion-rec-sub-fetch-push: completion: teach --recurse-submodules to fetch, pull and push
2014-02-24remote-bzr: support the new 'force' optionLibravatar Richard Hansen2-2/+51
Signed-off-by: Richard Hansen <rhansen@bbn.com> Acked-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-24test-hg.sh: tests are now expected to passLibravatar Richard Hansen1-2/+2
Signed-off-by: Richard Hansen <rhansen@bbn.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-18git-contacts: do not fail parsing of good diffsLibravatar Lars Gullik Bjønnes1-2/+0
If a line in a patch starts with "--- " it will be deemed malformed unless it also contains the proper diff header format. This situation can happen with a valid patch if it has a line starting with "-- " and that line is removed. This patch just removes the check in git-contacts. Signed-off-by: Lars Gullik Bjønnes <larsbj@gullik.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-11completion: teach --recurse-submodules to fetch, pull and pushLibravatar Sup Yut Sum1-1/+18
Signed-off-by: Sup Yut Sum <ch3cooli@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-03git-sh-setup.sh: add variable to use the stuck-long modeLibravatar Nicolas Vigier1-0/+1
If the variable $OPTIONS_STUCKLONG is not empty, then rev-parse option parsing is done in --stuck-long mode. Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-27Merge branch 'jk/complete-merge-base'Libravatar Junio C Hamano1-1/+7
* 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'Libravatar Junio C Hamano2-13/+23
* ab/subtree-doc: subtree: fix argument validation in add/pull/push
2014-01-13subtree: fix argument validation in add/pull/pushLibravatar Anthony Baire2-13/+23
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-rebaseLibravatar John Keeping1-1/+1
Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-13completion: complete merge-base optionsLibravatar John Keeping1-0/+6
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'Libravatar Junio C Hamano1-0/+1
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.coverLetterLibravatar Ramkumar Ramachandra1-0/+1
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-06completion: fix remote.pushdefaultLibravatar Ramkumar Ramachandra1-0/+1
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)Libravatar Ramkumar Ramachandra1-0/+1
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 ()Libravatar Ramkumar Ramachandra2-4/+26
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 completionLibravatar Ramkumar Ramachandra1-1/+1
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'Libravatar Junio C Hamano3-9/+103
* 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'Libravatar Junio C Hamano1-46/+39
Style fix. * js/gnome-keyring: contrib/git-credential-gnome-keyring.c: small stylistic cleanups
2013-12-26remote-hg: test 'shared_path' in a moved cloneLibravatar Antoine Pelisse1-0/+11
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 cleanupsLibravatar John Szakmeister1-46/+39
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'Libravatar Junio C Hamano12-539/+0
* 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'Libravatar Junio C Hamano2-6/+2
* 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 filenamesLibravatar Felipe Contreras1-0/+68
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' pathLibravatar Felipe Contreras1-0/+3
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 checksLibravatar Felipe Contreras2-8/+20
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()Libravatar jcb911-1/+1
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'Libravatar Junio C Hamano4-24/+25
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.5Libravatar Junio C Hamano1-1/+1
2013-12-05Merge branch 'jn/mediawiki-makefile-updates'Libravatar Junio C Hamano1-2/+7
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'Libravatar Junio C Hamano4-4/+4
* mi/typofixes: contrib: typofixes Documentation/technical/http-protocol.txt: typofixes typofixes: fix misspelt comments
2013-11-26remove #!interpreter line from shell librariesLibravatar Jonathan Nieder2-4/+0
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-p4importLibravatar Jonathan Nieder3-533/+0
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 executableLibravatar Jonathan Nieder4-2/+0
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 executableLibravatar Jonathan Nieder3-0/+0
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 expressionLibravatar Richard Hansen3-9/+8
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 testLibravatar Richard Hansen1-10/+10
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 testsLibravatar Richard Hansen1-9/+9
"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' syntaxLibravatar Richard Hansen1-1/+1
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' bashismLibravatar Richard Hansen1-2/+2
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=simpleLibravatar Richard Hansen1-1/+1
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>