summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-05-27http: default text charset to iso-8859-1Libravatar Jeff King1-0/+3
This is specified by RFC 2616 as the default if no "charset" parameter is given. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-27remote-curl: reencode http error messagesLibravatar Jeff King3-7/+19
We currently recognize an error message with a content-type "text/plain; charset=utf-16" as text, but we ignore the charset parameter entirely. Let's encode it to log_output_encoding, which is presumably something the user's terminal can handle. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-27strbuf: add strbuf_reencode helperLibravatar Jeff King3-0/+23
This is a convenience wrapper around `reencode_string_len` and `strbuf_attach`. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-27http: optionally extract charset parameter from content-typeLibravatar Jeff King2-4/+57
Since the previous commit, we now give a sanitized, shortened version of the content-type header to any callers who ask for it. This patch adds back a way for them to cleanly access specific parameters to the type. We could easily extract all parameters and make them available via a string_list, but: 1. That complicates the interface and memory management. 2. In practice, no planned callers care about anything except the charset. This patch therefore goes with the simplest thing, and we can expand or change the interface later if it becomes necessary. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-27http: extract type/subtype portion of content-typeLibravatar Jeff King4-5/+48
When we get a content-type from curl, we get the whole header line, including any parameters, and without any normalization (like downcasing or whitespace) applied. If we later try to match it with strcmp() or even strcasecmp(), we may get false negatives. This could cause two visible behaviors: 1. We might fail to recognize a smart-http server by its content-type. 2. We might fail to relay text/plain error messages to users (especially if they contain a charset parameter). This patch teaches the http code to extract and normalize just the type/subtype portion of the string. This is technically passing out less information to the callers, who can no longer see the parameters. But none of the current callers cares, and a future patch will add back an easier-to-use method for accessing those parameters. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-23t5550: test display of remote http error messagesLibravatar Jeff King4-0/+32
Since commit 426e70d (remote-curl: show server content on http errors, 2013-04-05), we relay any text/plain error messages from the remote server to the user. However, we never tested it. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-23t/lib-httpd: use write_script to copy CGI scriptsLibravatar Jeff King2-2/+5
Using write_script will set our shebang line appropriately with $SHELL_PATH. The script that is there now is quite simple and likely to succeed even with a non-POSIX /bin/sh, but it does not hurt to be defensive. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-23test-lib: preserve GIT_CURL_VERBOSE from the environmentLibravatar Jeff King1-0/+1
Turning on this variable can be useful when debugging http tests. It does break a few tests in t5541, but it is not a variable that the user is likely to have enabled accidentally. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-21Update draft release notes to 2.0Libravatar Junio C Hamano1-9/+5
Hopefully for the last time ;-) Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-20Git 2.0-rc4Libravatar Junio C Hamano1-1/+1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-20RelNotes/2.0.0.txt: Fix several grammar issues, notably a lack of hyphens, ↵Libravatar Jason St. John1-36/+37
double quotes, or articles Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-20Revert "Merge branch 'jc/graduate-remote-hg-bzr' (early part)"Libravatar Junio C Hamano11-4360/+87
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-19Merge branch 'jc/graduate-remote-hg-bzr' (early part)Libravatar Junio C Hamano6-71/+62
* '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-19remote-helpers: point at their upstream repositoriesLibravatar Junio C Hamano1-0/+19
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-19contrib: remote-helpers: add move warnings (v2.0)Libravatar Felipe Contreras2-0/+6
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-19Revert "Merge branch 'fc/transport-helper-sync-error-fix'"Libravatar Junio C Hamano3-71/+37
This reverts commit d508e4a8e2391ae2596403b6478d01cf3d5f928f, reversing changes made to e42552135a2a396f37053a89f44952ea907870b2. The author of the original topic says he broke the upcoming 2.0 release with something that relates to "synchronization crash regression" while refusing to give further specifics, so this would unfortunately be the safest option for the upcoming release. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-19Merge branch 'rh/prompt-pcmode-avoid-eval-on-refname'Libravatar Junio C Hamano2-20/+42
* 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 PS1Libravatar Richard Hansen2-20/+42
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-19Merge branch 'lt/request-pull'Libravatar Junio C Hamano2-1/+13
* lt/request-pull: request-pull: resurrect for-linus -> tags/for-linus DWIM
2014-05-19Merge branch 'jl/use-vsatisfy-correctly-for-2.0'Libravatar Junio C Hamano1-2/+2
* jl/use-vsatisfy-correctly-for-2.0: git-gui: tolerate major version changes when comparing the git version
2014-05-19Merge git://github.com/git-l10n/git-poLibravatar Junio C Hamano1-21/+21
* git://github.com/git-l10n/git-po: fr: a lot of good fixups
2014-05-19Merge branch 'kb/fast-hashmap'Libravatar Junio C Hamano1-1/+0
* kb/fast-hashmap: Documentation/technical/api-hashmap: remove source highlighting
2014-05-19Documentation/technical/api-hashmap: remove source highlightingLibravatar Anders Kaseorg1-1/+0
The highlighting was pretty, but unfortunately, the failure mode when source-highlight is not installed was that the entire code block disappears. See https://bugs.debian.org/745591, https://bugs.launchpad.net/bugs/1316810. Signed-off-by: Anders Kaseorg <andersk@mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-19git-gui: tolerate major version changes when comparing the git versionLibravatar Jens Lehmann1-2/+2
Since git 2.0.0 starting git gui in a submodule using a gitfile fails with the following error: No working directory ../../../<path> couldn't change working directory to "../../../<path>": no such file or directory This is because "git rev-parse --show-toplevel" is only run when git gui sees a git version of at least 1.7.0 (which is the version in which the --show-toplevel option was introduced). But "package vsatisfies" returns false when the major version changes, which is not what we want here. Fix that for both places where the git version is checked using vsatisfies by appending a '-' to the version number. This tells vsatisfies that a change of the major version is not considered to be a problem, as long as the new major version is larger. This is done for both the place that caused the reported bug and another spot where the git version is tested for another feature. Reported-by: Chris Packham <judge.packham@gmail.com> Reported-by: Yann Dirson <ydirson@free.fr> Helped-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Tested-by: Chris Packham <judge.packham@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-17fr: a lot of good fixupsLibravatar Grégoire Paris1-21/+21
Signed-off-by: Grégoire Paris <postmaster@greg0ire.fr> Acked-by: Jean-Noel Avila <jn.avila@free.fr>
2014-05-16request-pull: resurrect for-linus -> tags/for-linus DWIMLibravatar Junio C Hamano2-1/+13
Older versions of Git before v1.7.10 did not DWIM $ git pull $URL for-linus to the tag "tags/for-linus" and the users were required to say $ git pull $URL tags/for-linus instead. Because newer versions of Git works either way, request-pull used to show tags/for-linus when asked $ git request-pull origin/master $URL for-linus The recent updates broke this and in the output we see "for-linus" without the "tags/" prefix. As v1.7.10 is more than 2 years old, this should matter very little in practice, but resurrecting it is very simple. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-13Merge branch 'fc/prompt-zsh-read-from-file'Libravatar Junio C Hamano1-8/+8
* fc/prompt-zsh-read-from-file: contrib: completion: fix 'eread()' namespace
2014-05-13contrib: completion: fix 'eread()' namespaceLibravatar Felipe Contreras1-8/+8
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-12Merge git://github.com/git-l10n/git-poLibravatar Junio C Hamano1-2278/+2755
* git://github.com/git-l10n/git-po: l10n: Updated Bulgarian translation of git (1307t0f921u)
2014-05-11l10n: Updated Bulgarian translation of git (1307t0f921u)Libravatar Alexander Shopov1-2278/+2755
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
2014-05-09Git 2.0-rc3Libravatar Junio C Hamano1-1/+1
2014-05-09Sync with 1.9.3Libravatar Junio C Hamano1-1/+2
2014-05-09Git 1.9.3Libravatar Junio C Hamano2-2/+3
The third maintenance release for Git 1.9; contains all the fixes that are scheduled to appear in Git 2.0 since 1.9.2. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-08Sync with maintLibravatar Junio C Hamano2-1/+22
* maint: shell doc: remove stray "+" in example Start preparing for 1.9.3
2014-05-08shell doc: remove stray "+" in exampleLibravatar Jonathan Nieder1-1/+1
The git-shell(1) manpage says EXAMPLE To disable interactive logins, displaying a greeting instead: + $ chsh -s /usr/bin/git-shell $ mkdir $HOME/git-shell-commands [...] The stray "+" has been there ever since the example was added in v1.8.3-rc0~210^2 (shell: new no-interactive-login command to print a custom message, 2013-03-09). The "+" sign between paragraphs is needed in asciidoc to attach extra paragraphs to a list item but here it is not needed and ends up rendered as a literal "+". Remove it. A quick search with "grep -e '<p>+' /usr/share/doc/git/html/*.html" doesn't find any other instances of this problem. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-08Merge git://github.com/git-l10n/git-poLibravatar Junio C Hamano1-7/+7
* 'master' of git://github.com/git-l10n/git-po: l10n: Fix a couple of typos in the Swedish translation
2014-05-08Start preparing for 1.9.3Libravatar Junio C Hamano2-1/+22
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-08Merge branch 'cl/p4-use-diff-tree' into maintLibravatar Junio C Hamano1-1/+1
"git p4" dealing with changes in binary files were broken by a change in 1.9 release. * cl/p4-use-diff-tree: git-p4: format-patch to diff-tree change breaks binary patches
2014-05-08Merge branch 'rh/prompt-pcmode-avoid-eval-on-refname' into maintLibravatar Junio C Hamano2-24/+54
The shell prompt script (in contrib/), when using the PROMPT_COMMAND interface, used an unsafe construct when showing the branch name in $PS1. * rh/prompt-pcmode-avoid-eval-on-refname: git-prompt.sh: don't put unsanitized branch names in $PS1
2014-05-08Merge branch 'km/avoid-non-function-return-in-rebase' into maintLibravatar Junio C Hamano4-10/+46
"git rebase" used a POSIX shell construct FreeBSD /bin/sh does not work well with. * km/avoid-non-function-return-in-rebase: Revert "rebase: fix run_specific_rebase's use of "return" on FreeBSD" rebase: avoid non-function use of "return" on FreeBSD
2014-05-08Merge branch 'tb/unicode-6.3-zero-width' into maintLibravatar Junio C Hamano1-5/+4
Some more Unicode codepoints defined in Unicode 6.3 as having zero width have been taught to our display column counting logic. * tb/unicode-6.3-zero-width: utf8.c: partially update to version 6.3
2014-05-08Merge branch 'km/avoid-bs-in-shell-glob' into maintLibravatar Junio C Hamano1-2/+2
Some tests used shell constructs that did not work well on FreeBSD * km/avoid-bs-in-shell-glob: test: fix t5560 on FreeBSD
2014-05-08Merge branch 'km/avoid-cp-a' into maintLibravatar Junio C Hamano1-2/+2
Some tests used shell constructs that did not work well on FreeBSD * km/avoid-cp-a: test: fix t7001 cp to use POSIX options
2014-05-07Update draft release notes for 2.0Libravatar Junio C Hamano1-2/+6
Describe one last minute one-liner fix for regression introduced in 1.9, and fix a grave mischaracterization on a recent remote-hg/bzr change, pointed out by Felipe. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-07Merge branch 'cl/p4-use-diff-tree'Libravatar Junio C Hamano1-1/+1
Fixes a regression in 1.9.0 with an obviously correct single-liner. * cl/p4-use-diff-tree: git-p4: format-patch to diff-tree change breaks binary patches
2014-05-07git-p4: format-patch to diff-tree change breaks binary patchesLibravatar Tolga Ceylan1-1/+1
When applying binary patches a full index is required. format-patch already handles this, but diff-tree needs '--full-index' argument to always output full index. When git-p4 runs git-apply to test the patch, git-apply rejects the patch due to abbreviated blob object names. This is the error message git-apply emits in this case: error: cannot apply binary patch to '<filename>' without full index line error: <filename>: patch does not apply Signed-off-by: Tolga Ceylan <tolga.ceylan@gmail.com> Acked-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-07l10n: Fix a couple of typos in the Swedish translationLibravatar Peter Krefting1-7/+7
Thanks-to: Anders Jonsson <anders.jonsson@norsjovallen.se> Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2014-05-06RelNotes/2.0.0: Grammar and typo fixesLibravatar Øyvind A. Holm1-5/+5
Signed-off-by: Øyvind A. Holm <sunny@sunbase.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-02Git 2.0-rc2Libravatar Junio C Hamano2-2/+7
2014-05-02Merge branch 'mw/symlinks'Libravatar Junio C Hamano1-2/+2
A finishing touch fix to a new change already in 'master'. * mw/symlinks: setup: fix windows path buffer over-stepping