summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-11-04 19:20:13 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-11-04 19:20:13 (GMT)
commit99c7db563fb12b053aaa2b4d7556f979c4883ea1 (patch)
treeb4ddec961575e1ef4d6feb8cac37ff65f92785c9
parentaf6d1d602a8f64164b266364339c4e936d5bbc33 (diff)
parent9e8fe7b1c789fee4b7d0b219180cd26de80d730e (diff)
downloadgit-99c7db563fb12b053aaa2b4d7556f979c4883ea1.zip
git-99c7db563fb12b053aaa2b4d7556f979c4883ea1.tar.gz
git-99c7db563fb12b053aaa2b4d7556f979c4883ea1.tar.bz2
Merge branch 'jk/log-warn-on-bogus-encoding' into maint
Squelch over-eager warning message added during this cycle. * jk/log-warn-on-bogus-encoding: log: document --encoding behavior on iconv() failure Revert "logmsg_reencode(): warn when iconv() fails"
-rw-r--r--Documentation/pretty-options.txt4
-rw-r--r--pretty.c6
-rwxr-xr-xt/t4210-log-i18n.sh7
3 files changed, 3 insertions, 14 deletions
diff --git a/Documentation/pretty-options.txt b/Documentation/pretty-options.txt
index b3af850..dc685be 100644
--- a/Documentation/pretty-options.txt
+++ b/Documentation/pretty-options.txt
@@ -41,8 +41,8 @@ people using 80-column terminals.
in `X` and we are outputting in `X`, we will output the object
verbatim; this means that invalid sequences in the original
commit may be copied to the output. Likewise, if iconv(3) fails
- to convert the commit, we will output the original object
- verbatim, along with a warning.
+ to convert the commit, we will quietly output the original
+ object verbatim.
--expand-tabs=<n>::
--expand-tabs::
diff --git a/pretty.c b/pretty.c
index 73b5ead..9631529 100644
--- a/pretty.c
+++ b/pretty.c
@@ -671,11 +671,7 @@ const char *repo_logmsg_reencode(struct repository *r,
* If the re-encoding failed, out might be NULL here; in that
* case we just return the commit message verbatim.
*/
- if (!out) {
- warning("unable to reencode commit to '%s'", output_encoding);
- return msg;
- }
- return out;
+ return out ? out : msg;
}
static int mailmap_name(const char **email, size_t *email_len,
diff --git a/t/t4210-log-i18n.sh b/t/t4210-log-i18n.sh
index 0141f36..d2dfcf1 100755
--- a/t/t4210-log-i18n.sh
+++ b/t/t4210-log-i18n.sh
@@ -131,11 +131,4 @@ do
fi
done
-test_expect_success 'log shows warning when conversion fails' '
- enc=this-encoding-does-not-exist &&
- git log -1 --encoding=$enc 2>err &&
- echo "warning: unable to reencode commit to ${SQ}${enc}${SQ}" >expect &&
- test_cmp expect err
-'
-
test_done