summaryrefslogtreecommitdiff
path: root/contrib
AgeCommit message (Collapse)Author
2014-06-03Merge branch 'mm/mediawiki-encoding-fix'Junio C Hamano
* mm/mediawiki-encoding-fix: git-remote-mediawiki: fix encoding issue for UTF-8 media files git-remote-mediawiki: allow stop/start-ing the test server
2014-06-03Merge branch 'mh/ref-transaction'Junio C Hamano
Update "update-ref --stdin [-z]" and then introduce a transactional support for (multi-)reference updates. * mh/ref-transaction: (27 commits) ref_transaction_commit(): work with transaction->updates in place struct ref_update: add a type field struct ref_update: add a lock field ref_transaction_commit(): simplify code using temporary variables struct ref_update: store refname as a FLEX_ARRAY struct ref_update: rename field "ref_name" to "refname" refs: remove API function update_refs() update-ref --stdin: reimplement using reference transactions refs: add a concept of a reference transaction update-ref --stdin: harmonize error messages update-ref --stdin: improve the error message for unexpected EOF t1400: test one mistake at a time update-ref --stdin -z: deprecate interpreting the empty string as zeros update-ref.c: extract a new function, parse_next_sha1() t1400: test that stdin -z update treats empty <newvalue> as zeros update-ref --stdin: simplify error messages for missing oldvalues update-ref --stdin: make error messages more consistent update-ref --stdin: improve error messages for invalid values update-ref.c: extract a new function, parse_refname() parse_cmd_verify(): copy old_sha1 instead of evaluating <oldvalue> twice ...
2014-05-20Revert "Merge branch 'jc/graduate-remote-hg-bzr' (early part)"Junio C Hamano
Instead of showing a warning and working as before, fail and show the message and force immediate upgrade from their upstream repositories when these tools are run, per request from their primary author. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-20Merge branch 'jc/graduate-remote-hg-bzr' (early part)Junio C Hamano
* 'jc/graduate-remote-hg-bzr' (early part): remote-helpers: point at their upstream repositories contrib: remote-helpers: add move warnings (v2.0) Revert "Merge branch 'fc/transport-helper-sync-error-fix'"
2014-05-20remote-helpers: point at their upstream repositoriesJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-20contrib: remote-helpers: add move warnings (v2.0)Felipe Contreras
The tools are now maintained out-of-tree, and they have a regression in v2.0. It's better to start warning the users as soon as possible. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-19Merge branch 'rh/prompt-pcmode-avoid-eval-on-refname'Junio C Hamano
* rh/prompt-pcmode-avoid-eval-on-refname: git-prompt.sh: don't assume the shell expands the value of PS1
2014-05-19git-prompt.sh: don't assume the shell expands the value of PS1Richard Hansen
Not all shells subject the prompt string to parameter expansion. Test whether the shell will expand the value of PS1, and use the result to control whether raw ref names are included directly in PS1. This fixes a regression introduced in commit 8976500 ("git-prompt.sh: don't put unsanitized branch names in $PS1"): zsh does not expand PS1 by default, but that commit assumed it did. The bug resulted in prompts containing the literal string '${__git_ps1_branch_name}' instead of the actual branch name. Reported-by: Caleb Thompson <caleb@calebthompson.io> Signed-off-by: Richard Hansen <rhansen@bbn.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-13Merge branch 'fc/prompt-zsh-read-from-file'Junio C Hamano
* fc/prompt-zsh-read-from-file: contrib: completion: fix 'eread()' namespace
2014-05-13contrib: completion: fix 'eread()' namespaceFelipe Contreras
Otherwise it might collide with a function of the same name in the user's environment. Suggested-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-02Merge branch 'rh/prompt-pcmode-avoid-eval-on-refname'Junio C Hamano
* rh/prompt-pcmode-avoid-eval-on-refname: git-prompt.sh: don't put unsanitized branch names in $PS1
2014-04-23git-remote-mediawiki: fix encoding issue for UTF-8 media filesMatthieu Moy
When a media file contains valid UTF-8, git-remote-mediawiki tried to be too clever about the encoding, and the call to utf8::downgrade() on the downloaded content was failing with Wide character in subroutine entry at git-remote-mediawiki line 583. Instead, use $response->decode() to apply decoding linked to the Content-Encoding: header, and return the content without attempting any charset decoding. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-23git-remote-mediawiki: allow stop/start-ing the test serverMatthieu Moy
Previously, the user had to launch a complete re-install after a lighttpd stop (e.g. a reboot). Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-22git-prompt.sh: don't put unsanitized branch names in $PS1Richard Hansen
Both bash and zsh subject the value of PS1 to parameter expansion, command substitution, and arithmetic expansion. Rather than include the raw, unescaped branch name in PS1 when running in two- or three-argument mode, construct PS1 to reference a variable that holds the branch name. Because the shells do not recursively expand, this avoids arbitrary code execution by specially-crafted branch names such as '$(IFS=_;cmd=sudo_rm_-rf_/;$cmd)'. Signed-off-by: Richard Hansen <rhansen@bbn.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-21Merge branch 'ep/shell-command-substitution'Junio C Hamano
* ep/shell-command-substitution: t9362-mw-to-git-utf8.sh: use the $( ... ) construct for command substitution t9360-mw-to-git-clone.sh: use the $( ... ) construct for command substitution git-tag.sh: use the $( ... ) construct for command substitution git-revert.sh: use the $( ... ) construct for command substitution git-resolve.sh: use the $( ... ) construct for command substitution git-repack.sh: use the $( ... ) construct for command substitution git-merge.sh: use the $( ... ) construct for command substitution git-ls-remote.sh: use the $( ... ) construct for command substitution git-fetch.sh: use the $( ... ) construct for command substitution git-commit.sh: use the $( ... ) construct for command substitution git-clone.sh: use the $( ... ) construct for command substitution git-checkout.sh: use the $( ... ) construct for command substitution install-webdoc.sh: use the $( ... ) construct for command substitution howto-index.sh: use the $( ... ) construct for command substitution
2014-04-18Merge branch 'fc/remote-helper-fixes'Junio C Hamano
* fc/remote-helper-fixes: remote-bzr: trivial test fix remote-bzr: include authors field in pushed commits remote-bzr: add support for older versions remote-hg: always normalize paths remote-helpers: allow all tests running from any dir
2014-04-18Merge branch 'fc/complete-aliased-push'Junio C Hamano
* fc/complete-aliased-push: completion: fix completing args of aliased "push", "fetch", etc.
2014-04-18Merge branch 'fc/prompt-zsh-read-from-file'Junio C Hamano
* fc/prompt-zsh-read-from-file: prompt: fix missing file errors in zsh
2014-04-17t9362-mw-to-git-utf8.sh: use the $( ... ) construct for command substitutionElia Pinto
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-17t9360-mw-to-git-clone.sh: use the $( ... ) construct for command substitutionElia Pinto
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-17git-tag.sh: use the $( ... ) construct for command substitutionElia Pinto
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-17git-revert.sh: use the $( ... ) construct for command substitutionElia Pinto
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-17git-resolve.sh: use the $( ... ) construct for command substitutionElia Pinto
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-17git-repack.sh: use the $( ... ) construct for command substitutionElia Pinto
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-17git-merge.sh: use the $( ... ) construct for command substitutionElia Pinto
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-17git-ls-remote.sh: use the $( ... ) construct for command substitutionElia Pinto
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-17git-fetch.sh: use the $( ... ) construct for command substitutionElia Pinto
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-17git-commit.sh: use the $( ... ) construct for command substitutionElia Pinto
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-17git-clone.sh: use the $( ... ) construct for command substitutionElia Pinto
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-17git-checkout.sh: use the $( ... ) construct for command substitutionElia Pinto
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-16Merge branch 'mh/multimail'Junio C Hamano
* mh/multimail: git-multimail: update to version 1.0.0
2014-04-14prompt: fix missing file errors in zshFelipe Contreras
zsh seems to have a bug while redirecting the stderr of the 'read' command: % read foo 2>/dev/null <foo zsh: no such file or directory: foo Which causes errors to be displayed when certain files are missing. Let's add a convenience function to manually check if the file is readable before calling "read". Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-14remote-bzr: trivial test fixFelipe Contreras
So that the committer is reset properly. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-09completion: fix completing args of aliased "push", "fetch", etc.Felipe Contreras
Some commands need the first word to determine the actual action that is being executed, however, the command is wrong when we use an alias, for example 'alias.p=push', if we try to complete 'git p origin ', the result would be wrong because __git_complete_remote_or_refspec() doesn't know where it came from. So let's override words[1], so the alias 'p' is override by the actual command, 'push'. Reported-by: Aymeric Beaumet <aymeric.beaumet@gmail.com> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-09remote-bzr: include authors field in pushed commitsdequis
Tests-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-09remote-bzr: add support for older versionsFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-09remote-hg: always normalize pathsFelipe Contreras
Apparently Mercurial can have paths such as 'foo//bar', so normalize all paths. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-09remote-helpers: allow all tests running from any dirFelipe Contreras
Commit d3243d7 (test-bzr.sh, test-hg.sh: allow running from any dir) allowed the tests to run from any directory, however, it didn't update all the tests. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-08Merge branch 'jl/nor-or-nand-and'Junio C Hamano
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-07refs.h: rename the action_on_err constantsMichael Haggerty
Given that these constants are only being used when updating references, it is inappropriate to give them such generic names as "DIE_ON_ERR". So prefix their names with "UPDATE_REFS_". Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-07git-multimail: update to version 1.0.0Michael Haggerty
This commit contains the squashed changes from the upstream git-multimail repository since the last code drop. Highlights: * Fix encoding of non-ASCII email addresses in email headers. * Fix backwards-compatibility bugs for older Python 2.x versions. * Fix a backwards-compatibility bug for Git 1.7.1. * Add an option commitDiffOpts to customize logs for revisions. * Pass "-oi" to sendmail by default to prevent premature termination on a line containing only ".". * Stagger email "Date:" values in an attempt to help mail clients thread the emails in the right order. * If a mailing list setting is missing, just skip sending the corresponding email (with a warning) instead of failing. * Add a X-Git-Host header that can be used for email filtering. * Allow the sender's fully-qualified domain name to be configured. * Minor documentation improvements. * Add a CHANGES file. Contributions-by: Raphaël Hertzog <hertzog@debian.org> Contributions-by: Eric Berberich <eric.berberich@gmail.com> Contributions-by: Michiel Holtkamp <git@elfstone.nl> Contributions-by: Malte Swart <mswart@devtation.de> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-02Merge branch 'ap/remote-hg-skip-null-bookmarks'Junio C Hamano
* ap/remote-hg-skip-null-bookmarks: remote-hg: do not fail on invalid bookmarks
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-03-28Merge branch 'jk/subtree-prefix'Junio C Hamano
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 bookmarksMax Horn
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'Junio C Hamano
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" variableJeff King
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'Junio C Hamano
* 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'Junio C Hamano
* ss/completion-rec-sub-fetch-push: completion: teach --recurse-submodules to fetch, pull and push