Skip to content

Commit a31efa7

Browse files
committed
Merge branch 'jk/log-warn-on-bogus-encoding'
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"
2 parents 4d1ae1a + 9e8fe7b commit a31efa7

File tree

3 files changed

+3
-14
lines changed

3 files changed

+3
-14
lines changed

Documentation/pretty-options.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ people using 80-column terminals.
4141
in `X` and we are outputting in `X`, we will output the object
4242
verbatim; this means that invalid sequences in the original
4343
commit may be copied to the output. Likewise, if iconv(3) fails
44-
to convert the commit, we will output the original object
45-
verbatim, along with a warning.
44+
to convert the commit, we will quietly output the original
45+
object verbatim.
4646

4747
--expand-tabs=<n>::
4848
--expand-tabs::

pretty.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -671,11 +671,7 @@ const char *repo_logmsg_reencode(struct repository *r,
671671
* If the re-encoding failed, out might be NULL here; in that
672672
* case we just return the commit message verbatim.
673673
*/
674-
if (!out) {
675-
warning("unable to reencode commit to '%s'", output_encoding);
676-
return msg;
677-
}
678-
return out;
674+
return out ? out : msg;
679675
}
680676

681677
static int mailmap_name(const char **email, size_t *email_len,

t/t4210-log-i18n.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,4 @@ do
131131
fi
132132
done
133133

134-
test_expect_success 'log shows warning when conversion fails' '
135-
enc=this-encoding-does-not-exist &&
136-
git log -1 --encoding=$enc 2>err &&
137-
echo "warning: unable to reencode commit to ${SQ}${enc}${SQ}" >expect &&
138-
test_cmp expect err
139-
'
140-
141134
test_done

0 commit comments

Comments
 (0)