summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* stash: prevent warning about null bytes in inputkd/stash-with-bash-4.4Kevin Daudt2017-08-141-2/+9
| | | | | | | | | | | | | | | | | | | | | | The `no_changes` function calls the `untracked_files` function through command substitution. `untracked_files` will return null bytes because it runs ls-files with the '-z' option. Bash since version 4.4 warns about these null bytes. As they are not required for the test that is being done, make sure `untracked_files` does not output null bytes when not required. This is achieved by adding a parameter to the `untracked_files` function to specify wither `-z` should be passed to ls-files or not. This warning is triggered when running git stash save -u resulting in two warnings: git-stash: line 43: warning: command substitution: ignored null byte in input Signed-off-by: Kevin Daudt <me@ikke.info> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Git 2.14.1v2.14.1Junio C Hamano2017-08-043-2/+6
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge tag 'v2.13.5' into maintJunio C Hamano2017-08-0414-2/+130
|\
| * Git 2.13.5v2.13.5Junio C Hamano2017-08-013-2/+6
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Merge tag 'v2.12.4' into maintJunio C Hamano2017-08-0113-2/+126
| |\
| | * Git 2.12.4v2.12.4Junio C Hamano2017-07-303-2/+6
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | * Merge tag 'v2.11.3' into maint-2.12Junio C Hamano2017-07-3011-0/+116
| | |\ | | | | | | | | | | | | Git 2.11.3
| | | * Git 2.11.3v2.11.3Junio C Hamano2017-07-303-2/+6
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | | * Merge tag 'v2.10.4' into maint-2.11Junio C Hamano2017-07-3010-0/+112
| | | |\ | | | | | | | | | | | | | | | Git 2.10.4
| | | | * Git 2.10.4v2.10.4Junio C Hamano2017-07-303-2/+6
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | | | * Merge tag 'v2.9.5' into maint-2.10Junio C Hamano2017-07-309-0/+108
| | | | |\ | | | | | | | | | | | | | | | | | | Git 2.9.5
| | | | | * Git 2.9.5v2.9.5maint-2.9Junio C Hamano2017-07-303-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | | | | * Merge tag 'v2.8.6' into maint-2.9Junio C Hamano2017-07-308-0/+104
| | | | | |\ | | | | | | | | | | | | | | | | | | | | | Git 2.8.6
| | | | | | * Git 2.8.6v2.8.6maint-2.8Junio C Hamano2017-07-303-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | | | | | * Merge tag 'v2.7.6' into maint-2.8Junio C Hamano2017-07-307-0/+100
| | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | Git 2.7.6
| | | | | | | * Git 2.7.6v2.7.6maint-2.7Junio C Hamano2017-07-303-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | | | | | | * Merge branch 'jk/ssh-funny-url' into maint-2.7Junio C Hamano2017-07-286-0/+75
| | | | | | | |\
| | | | | | | | * connect: reject paths that look like command line optionsJeff King2017-07-283-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we get a repo path like "-repo.git", we may try to invoke "git-upload-pack -repo.git". This is going to fail, since upload-pack will interpret it as a set of bogus options. But let's reject this before we even run the sub-program, since we would not want to allow any mischief with repo names that actually are real command-line options. You can still ask for such a path via git-daemon, but there's no security problem there, because git-daemon enters the repo itself and then passes "." on the command line. Signed-off-by: Jeff King <peff@peff.net> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | | | | | | | * connect: reject dashed arguments for proxy commandsJeff King2017-07-282-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you have a GIT_PROXY_COMMAND configured, we will run it with the host/port on the command-line. If a URL contains a mischievous host like "--foo", we don't know how the proxy command may handle it. It's likely to break, but it may also do something dangerous and unwanted (technically it could even do something useful, but that seems unlikely). We should err on the side of caution and reject this before we even run the command. The hostname check matches the one we do in a similar circumstance for ssh. The port check is not present for ssh, but there it's not necessary because the syntax is "-p <port>", and there's no ambiguity on the parsing side. It's not clear whether you can actually get a negative port to the proxy here or not. Doing: git fetch git://remote:-1234/repo.git keeps the "-1234" as part of the hostname, with the default port of 9418. But it's a good idea to keep this check close to the point of running the command to make it clear that there's no way to circumvent it (and at worst it serves as a belt-and-suspenders check). Signed-off-by: Jeff King <peff@peff.net> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | | | | | | | * connect: factor out "looks like command line option" checkJeff King2017-07-283-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We reject hostnames that start with a dash because they may be confused for command-line options. Let's factor out that notion into a helper function, as we'll use it in more places. And while it's simple now, it's not clear if some systems might need more complex logic to handle all cases. Signed-off-by: Jeff King <peff@peff.net> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | | | | | | | * t5813: add test for hostname starting with dashJeff King2017-07-281-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per the explanation in the previous patch, this should be (and is) rejected. Signed-off-by: Jeff King <peff@peff.net> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | | | | | | | * connect: reject ssh hostname that begins with a dashJunio C Hamano2017-07-281-0/+3
| | | | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When commands like "git fetch" talk with ssh://$rest_of_URL/, the code splits $rest_of_URL into components like host, port, etc., and then spawns the underlying "ssh" program by formulating argv[] array that has: - the path to ssh command taken from GIT_SSH_COMMAND, etc. - dashed options like '-batch' (for Tortoise), '-p <port>' as needed. - ssh_host, which is supposed to be the hostname parsed out of $rest_of_URL. - then the command to be run on the other side, e.g. git upload-pack. If the ssh_host ends up getting '-<anything>', the argv[] that is used to spawn the command becomes something like: { "ssh", "-p", "22", "-<anything>", "command", "to", "run", NULL } which obviously is bogus, but depending on the actual value of "<anything>", will make "ssh" parse and use it as an option. Prevent this by forbidding ssh_host that begins with a "-". Noticed-by: Joern Schneeweisz of Recurity Labs Reported-by: Brian at GitLab Signed-off-by: Junio C Hamano <gitster@pobox.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | * | | | | | Merge branch 'jk/lib-proto-disable-cleanup' into maint-2.12Junio C Hamano2017-07-301-2/+6
| | |\ \ \ \ \ \
| | | * | | | | | t/lib-proto-disable: restore protocol.allow after config testsJeff King2017-07-281-2/+6
| | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests for protocol.allow actually set that variable in the on-disk config, run a series of tests, and then never clean up after themselves. This means that whatever tests we run after have protocol.allow=never, which may influence their results. In most cases we either exit after running these tests, or do another round of test_proto(). In the latter case, this happens to work because: 1. Tests of the GIT_ALLOW_PROTOCOL environment variable override the config. 2. Tests of the specific config "protocol.foo.allow" override the protocol.allow config. 3. The next round of protocol.allow tests start off by setting the config to a known value. However, it's a land-mine waiting to trap somebody adding new tests to one of the t581x test scripts. Let's make sure we clean up after ourselves. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Git 2.14v2.14.0Junio C Hamano2017-08-042-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'ah/patch-id-doc'Junio C Hamano2017-08-041-3/+0
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Docfix. * ah/patch-id-doc: doc: remove unsupported parameter from patch-id
| * | | | | | | | doc: remove unsupported parameter from patch-idah/patch-id-docAndreas Heiduk2017-07-281-3/+0
| | |_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch is read from standard input and not from a parameter. Signed-off-by: Andreas Heiduk <asheiduk@gmail.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'as/diff-options-grammofix'Junio C Hamano2017-08-041-1/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A grammofix. * as/diff-options-grammofix: diff-options doc: grammar fix
| * | | | | | | | diff-options doc: grammar fixas/diff-options-grammofixAnthony Sottile2017-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Anthony Sottile <asottile@umich.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge tag 'l10n-2.14.0-rnd2' of git://github.com/git-l10n/git-poJunio C Hamano2017-08-029-15801/+17022
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | l10n for Git 2.14.0 round 2 * tag 'l10n-2.14.0-rnd2' of git://github.com/git-l10n/git-po: l10n: zh_CN: review for git v2.14.0 l10n l10n: ko.po: Update Korean translation l10n: zh_CN: for git v2.14.0 l10n round 2 l10n: de.po: various fixes in German translation l10n: ru.po: update Russian translation l10n: fr.po v2.14.0 rnd 2 l10n: fr.po Fix some french typos l10n: fr.po Fix typo l10n: fr.po Fix some translations l10n: de.po: update German translation l10n: vi.po (3213t): Updated 9 new strings l10n: Update Catalan translation l10n: bg.po: Updated Bulgarian translation (3213t)
| * | | | | | | | | l10n: zh_CN: review for git v2.14.0 l10nJiang Xin2017-08-022-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: 依云 <lilydjwg@gmail.com> Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
| * | | | | | | | | l10n: ko.po: Update Korean translationChangwoo Ryu2017-08-011-13/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Changwoo Ryu <cwryu@debian.org>
| * | | | | | | | | l10n: zh_CN: for git v2.14.0 l10n round 2Jiang Xin2017-08-011-3165/+3147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Translate new l10n messages for git 2.14.0, and update translations on "stash". Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
| * | | | | | | | | l10n: de.po: various fixes in German translationHartmut Henkel2017-07-301-27/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Hartmut Henkel <henkel@vh-s.de> Helped-by: Stefan Beller <sbeller@google.com> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Acked-by: Matthias Rüster <matthias.ruester@gmail.com>
| * | | | | | | | | Merge branch 'russian-l10n' of https://github.com/DJm00n/git-po-ruJiang Xin2017-07-301-3027/+3137
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'russian-l10n' of https://github.com/DJm00n/git-po-ru: l10n: ru.po: update Russian translation
| | * | | | | | | | | l10n: ru.po: update Russian translationDimitriy Ryazantcev2017-07-301-3027/+3137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Dimitriy Ryazantcev <dimitriy.ryazantcev@gmail.com>
| * | | | | | | | | | Merge branch 'master' of https://github.com/ralfth/git-po-deJiang Xin2017-07-271-3010/+3181
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'master' of https://github.com/ralfth/git-po-de: l10n: de.po: update German translation
| | * | | | | | | | | | l10n: de.po: update German translationRalf Thielow2017-07-261-3010/+3181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
| * | | | | | | | | | | Merge branch 'fr_l10n_v2.14.0rnd2' of git://github.com/jnavila/gitJiang Xin2017-07-271-3038/+3222
| |\ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'fr_l10n_v2.14.0rnd2' of git://github.com/jnavila/git: l10n: fr.po v2.14.0 rnd 2 l10n: fr.po Fix some french typos l10n: fr.po Fix typo l10n: fr.po Fix some translations
| | * | | | | | | | | | l10n: fr.po v2.14.0 rnd 2Jean-Noel Avila2017-07-271-3009/+3193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jean-Noel Avila <jean-noel.avila@scantech.fr>
| | * | | | | | | | | | l10n: fr.po Fix some french typosSylvestre Ledru2017-07-271-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sylvestre Ledru <sylvestre@debian.org>
| | * | | | | | | | | | l10n: fr.po Fix typoLouis2017-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Louis <spalax@gresille.org>
| | * | | | | | | | | | l10n: fr.po Fix some translationsHugues Peccatte2017-07-271-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Hugues Peccatte <hugues.peccatte@aareon.fr> Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
| * | | | | | | | | | | Merge branch 'master' of https://github.com/Softcatala/git-poJiang Xin2017-07-261-3453/+4119
| |\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'master' of https://github.com/Softcatala/git-po: l10n: Update Catalan translation
| | * | | | | | | | | | | l10n: Update Catalan translationJordi Mas2017-07-241-3453/+4119
| | |/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jordi Mas <jmas@softcatala.org>
| * | | | | | | | | | | Merge branch 'master' of git://github.com/alshopov/git-poJiang Xin2017-07-261-17/+67
| |\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'master' of git://github.com/alshopov/git-po: l10n: bg.po: Updated Bulgarian translation (3213t)
| | * | | | | | | | | | | l10n: bg.po: Updated Bulgarian translation (3213t)Alexander Shopov2017-07-241-17/+67
| | |/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Alexander Shopov <ash@kambanaria.org>
| * | | | | | | | | | | l10n: vi.po (3213t): Updated 9 new stringsTran Ngoc Quan2017-07-251-50/+65
| |/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
* | | | | | | | | | | Sync with v2.13.4Junio C Hamano2017-08-010-0/+0
|\ \ \ \ \ \ \ \ \ \ \ | | |_|_|_|/ / / / / / | |/| | | | | | | | |
| * | | | | | | | | | Git 2.13.4v2.13.4Junio C Hamano2017-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>