From: Sebastian Harl Date: Sat, 14 Feb 2009 13:00:11 +0000 (+0100) Subject: patches: Added quoted-config-opts-fix.dpatch. X-Git-Tag: tig-0.14-1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=cea44ad05030e73709600f30403945c106a1ce9c;p=pkg-tig.git patches: Added quoted-config-opts-fix.dpatch. This backported upstream patch fixes the handling of quoted strings in the config file. --- diff --git a/debian/changelog b/debian/changelog index 6de48cc..7d71f31 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,10 +5,12 @@ tig (0.14-1) experimental; urgency=low - Removed non-utf8-fix.dpatch - included upstream. - Removed tigrc-parsing-fix.dpatch - included upstream. - Removed mem-corruption-fix.dpatch - included upstream. - - Added tigrc-example-fix.dpatch - fix error in examples for the set - command (Closes: #514990). + - Added tigrc-example-fix.dpatch - upstream patch fixing an error in + examples for the set command (Closes: #514990). + - Added quoted-config-opts-fix.dpatch - backported upstream patch fixing + the handling of quoted strings in the config file. - -- Sebastian Harl Fri, 13 Feb 2009 10:55:30 +0100 + -- Sebastian Harl Sat, 14 Feb 2009 13:59:03 +0100 tig (0.13-1) experimental; urgency=low diff --git a/debian/patches/00list b/debian/patches/00list index 835f66d..20c4e5a 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -1,2 +1,3 @@ tigrc-example-fix.dpatch +quoted-config-opts-fix.dpatch diff --git a/debian/patches/quoted-config-opts-fix.dpatch b/debian/patches/quoted-config-opts-fix.dpatch new file mode 100755 index 0000000..460b988 --- /dev/null +++ b/debian/patches/quoted-config-opts-fix.dpatch @@ -0,0 +1,27 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## quoted-config-opts-fix.dpatch by Sebastian Harl +## +## DP: Fix handling of quoted strings in the config file +## DP: +## DP: parse_string() adapts the string length to automatically remove quotation +## DP: marks when copying the string. However, when calling string_ncopy_do() +## DP: strlen(arg) used to be called again instead of using the adapted value. +## DP: +## DP: This e.g. led to wrong locale settings when using +## DP: set commit-encoding = "UTF-8" +## DP: and thus a slightly messed up display. +## DP: +## DP: Thanks to Gerfried Fuchs for reporting this. + +diff a/tig.c b/tig.c +--- a/tig.c ++++ b/tig.c +@@ -1519,7 +1519,7 @@ option_set_command(int argc, const char *argv[]) + } + arg += 1; arglen -= 2; + default: +- string_ncopy(opt_encoding, arg, strlen(arg)); ++ string_ncopy(opt_encoding, arg, arglen); + return OK; + } + }