git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Kacper Kornet <draenog@pld-linux.org>
Cc: "Robin H. Johnson" <robbat2@gentoo.org>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: Apostrophe at the end of author name
Date: Fri, 29 Jun 2012 14:29:44 -0400	[thread overview]
Message-ID: <20120629182944.GA20346@sigill.intra.peff.net> (raw)
In-Reply-To: <20120629181701.GB6533@camk.edu.pl>

On Fri, Jun 29, 2012 at 08:17:01PM +0200, Kacper Kornet wrote:

> >  as strbuf_addstr_without_crud was
> > only added recently (but it is a refactoring of older code which should
> > have the same behavior).
> 
> It depends what you call recently. It was refactored in July 2005
> (commit: 6aa33f4035d5). But it looks like the previous code (before
> refactoring) removed only comma, dot and semicolon from the end of the
> author name.

I meant the name strbuf_addstr_without_crud did not exist until I added
it in c96f0c8, about a month ago. But yes, the functionality of the code
has been there since the very early days.

I'm tempting by the patch below, which would remove only the
syntactically significant meta-characters ("\n", "<", and ">"), as well
as trimming any stray whitespace at the edges. The problem is that we
don't really have a clue how many people were relying on this trimming
to clean up their names or emails, so there may be regressions for other
people.

diff --git a/ident.c b/ident.c
index 443c075..4552f8d 100644
--- a/ident.c
+++ b/ident.c
@@ -127,15 +127,8 @@ const char *ident_default_date(void)
 static int crud(unsigned char c)
 {
 	return  c <= 32  ||
-		c == '.' ||
-		c == ',' ||
-		c == ':' ||
-		c == ';' ||
 		c == '<' ||
-		c == '>' ||
-		c == '"' ||
-		c == '\\' ||
-		c == '\'';
+		c == '>';
 }
 
 /*

  reply	other threads:[~2012-06-29 18:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-29 12:41 Apostrophe at the end of author name Kacper Kornet
2012-06-29 17:05 ` Robin H. Johnson
2012-06-29 17:43   ` Jeff King
2012-06-29 18:17     ` Kacper Kornet
2012-06-29 18:29       ` Jeff King [this message]
2012-06-29 19:04         ` Junio C Hamano
2012-06-29 19:35           ` Jeff King
2012-06-29 19:59         ` Kacper Kornet

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

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

  git send-email \
    --in-reply-to=20120629182944.GA20346@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=draenog@pld-linux.org \
    --cc=git@vger.kernel.org \
    --cc=robbat2@gentoo.org \
    /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.
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 NNTP newsgroup(s).