git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jay Soffian <jaysoffian@gmail.com>
To: Daniel F <nanotube@gmail.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>, git@vger.kernel.org
Subject: Re: git am mangles commit author name.
Date: Tue, 13 Jul 2010 11:11:20 -0400	[thread overview]
Message-ID: <AANLkTikAcZa5J8XhKKJuDCHY3VMhSRzETv0ZQ34EcjMx@mail.gmail.com> (raw)
In-Reply-To: <AANLkTinPCZ79vwZ9eVeHChgTuFGBrz3ACi_grM28Q5Y-@mail.gmail.com>

On Tue, Jul 13, 2010 at 10:54 AM, Daniel F <nanotube@gmail.com> wrote:
> Apparently, git-am fails when the username is just one word.

And is less than 3 characters.

> if i put a space between the b and the c, it works just fine.
>
> However... do you not think that it is still a bug? Is it not quite reasonable
> for a person to want to identify with just a nick, rather than a full
> first and last name?
>
> And more to the immediate point... is there any way i can get git am
> to do what i want? :)

This is happening due to the get_sane_name check in mailinfo.c. The
rules for a "sane" name are actually from Linus' original code. From
2744b23 (Start of early patch applicator tools for git., 2005-04-11):

+static char *sanity_check(char *name, char *email)
+{
+       int len = strlen(name);
+       if (len < 3 || len > 60)
+               return email;
+       if (strchr(name, '@') || strchr(name, '<') || strchr(name, '>'))
+               return email;
+       return name;
+}

You could add an option to mailinfo to disable the sanity check and
then plumb that option into its various callers.

j.

  reply	other threads:[~2010-07-13 15:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-13  3:53 git am mangles commit author name Daniel F
2010-07-13  5:49 ` Jonathan Nieder
2010-07-13 14:54   ` Daniel F
2010-07-13 15:11     ` Jay Soffian [this message]
2010-07-13 15:48       ` Daniel F
2010-07-13 22:16         ` Ævar Arnfjörð Bjarmason
2010-07-14 14:16       ` Tor Arntsen
2010-07-14 14:31         ` Ævar Arnfjörð Bjarmason
2010-07-16 14:18           ` Daniel F
2010-07-16 19:19             ` Jonathan Nieder

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=AANLkTikAcZa5J8XhKKJuDCHY3VMhSRzETv0ZQ34EcjMx@mail.gmail.com \
    --to=jaysoffian@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=nanotube@gmail.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.
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).