Re: [PATCH 05/15] sequencer: use logmsg_reencode in get_message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> writes:

> Note that we may be fixing a bug here. The existing code
> does:
>
>   if (same_encoding(to, from))
> 	  reencode_string(buf, to, from);
>
> That probably should have been "!same_encoding".
>
> Signed-off-by: Jeff King <peff@xxxxxxxx>
> ---
> I didn't actually test for the bug, so it's possible that I'm missing
> something clever...

Thanks for spotting.  There is nothing clever going on.

0e18bcd5 (reencode_string(): introduce and use same_encoding(),
2012-10-18) has this misconversion.

diff --git a/sequencer.c b/sequencer.c
index bd62680..f2f5b13 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -58,7 +58,7 @@ static int get_message(struct commit *commit, struct commit_message *out)
 
 	out->reencoded_message = NULL;
 	out->message = commit->buffer;
-	if (strcmp(encoding, git_commit_encoding))
+	if (same_encoding(encoding, git_commit_encoding))
 		out->reencoded_message = reencode_string(commit->buffer,
 					git_commit_encoding, encoding);
 	if (out->reencoded_message)

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]