git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Max Kirillov <max@max630.net>
Cc: Eric Sunshine <sunshine@sunshineco.com>,
	Jeff King <peff@peff.net>,
	git@vger.kernel.org
Subject: Re: [PATCH v2] utf8.c: print warning about iconv errors
Date: Fri, 14 Aug 2015 15:35:58 -0700	[thread overview]
Message-ID: <xmqqvbchfqgh.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1439589334-32318-1-git-send-email-max@max630.net> (Max Kirillov's message of "Sat, 15 Aug 2015 00:55:34 +0300")

Max Kirillov <max@max630.net> writes:

> * do not limit number of warnings - does not worth complicating the code

Unless the warning leads to a quick "die()", wouldn't this make Git
unusable by spewing a "falling back to verbatim copy" for each and
every line of the message of a commit that has 'encoding' element in
its header in the "git log" output, no?

I suspect that this may be a huge mistake.

> +char *reencode_string_len(const char *in, int insz,
> +			  const char *out_encoding, const char *in_encoding,
> +			  int *outsz)
> +{
> +	if (!same_encoding(in_encoding, out_encoding))
> +		warning("Iconv support is disabled at compile time. It is likely that\nincorrect data will be printed or stored in repository.\nConsider using other build for this task.");
> +	return NULL;
> +}

Hmmm, I suspect this may be seen as regression by those who build
Git without ICONV for performance, knowing that there is nothing in
their data that requires character set conversion.

We'd call same_encoding() every time, which would involve a few
strcasecmp() calls.  Originally, we didn't even have a function call
overhead.

  reply	other threads:[~2015-08-14 22:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-06 21:02 [PATCH] utf8.c: print warning about disabled iconv Max Kirillov
2015-06-08 16:16 ` Junio C Hamano
2015-06-08 21:07   ` Max Kirillov
2015-06-08 21:14     ` Junio C Hamano
2015-08-14 21:55 ` [PATCH v2] utf8.c: print warning about iconv errors Max Kirillov
2015-08-14 22:35   ` Junio C Hamano [this message]
2015-08-17 19:02     ` Jeff King
2015-08-17 19:49       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqvbchfqgh.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=max@max630.net \
    --cc=peff@peff.net \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).