# [PATCH] git-svn: Minimalistic patch which allows svn usernames with space(s).

4 messages from 2007-07-17 to 2007-07-18. Participants: Richard MUSIL, Eric Wong.
Thread: https://gitlist.dev/t/9075

## Richard MUSIL, 2007-07-17 17:02

Subject: [PATCH] git-svn: Minimalistic patch which allows svn usernames with space(s).
Message-ID: <469CF641.4020707@st.com>
URL: https://gitlist.dev/e/469CF641.4020707%40st.com

```
Changed filter for username in svn-authors file, so even 'user name' is accepted.
---
 git-svn.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index 01c3904..975075e 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -740,7 +740,7 @@ sub load_authors {
        my $log = $cmd eq 'log';
        while (<$authors>) {
                chomp;
-               next unless /^(\S+?|\(no author\))\s*=\s*(.+?)\s*<(.+)>\s*$/;
+               next unless /^(\.+?|\(no author\))\s*=\s*(.+?)\s*<(.+)>\s*$/;
                my ($user, $name, $email) = ($1, $2, $3);
                if ($log) {
                        $Git::SVN::Log::rusers{"$name <$email>"} = $user;
--
1.5.1.6

```

## Eric Wong, 2007-07-17 19:55

Subject: Re: [PATCH] git-svn: Minimalistic patch which allows svn usernames with space(s).
Message-ID: <20070717195559.GA20103@muzzle>
URL: https://gitlist.dev/e/20070717195559.GA20103%40muzzle
In-Reply-To: <469CF641.4020707@st.com>

```
Richard MUSIL <richard.musil@st.com> wrote:
> Changed filter for username in svn-authors file, so even 'user name' is accepted.
> ---
>  git-svn.perl |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/git-svn.perl b/git-svn.perl
> index 01c3904..975075e 100755
> --- a/git-svn.perl
> +++ b/git-svn.perl
> @@ -740,7 +740,7 @@ sub load_authors {
>         my $log = $cmd eq 'log';
>         while (<$authors>) {
>                 chomp;
> -               next unless /^(\S+?|\(no author\))\s*=\s*(.+?)\s*<(.+)>\s*$/;
> +               next unless /^(\.+?|\(no author\))\s*=\s*(.+?)\s*<(.+)>\s*$/;

Surely you mean the following:

+               next unless /^(.+?|\(no author\))\s*=\s*(.+?)\s*<(.+)>\s*$/;

(No "\" before the ".")   "\." matches a dot/period (.), while "."
matches anything.

-- 
Eric Wong

```

## Eric Wong, 2007-07-18 07:36

Subject: Re: [PATCH] git-svn: Minimalistic patch which allows svn usernames with space(s).
Message-ID: <20070718073629.GB30559@muzzle>
URL: https://gitlist.dev/e/20070718073629.GB30559%40muzzle
In-Reply-To: <20070717195559.GA20103@muzzle>

```
Eric Wong <eric@petta-tech.com> wrote:
> Richard MUSIL <richard.musil@st.com> wrote:
> > Changed filter for username in svn-authors file, so even 'user name' is accepted.
> > ---
> >  git-svn.perl |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/git-svn.perl b/git-svn.perl
> > index 01c3904..975075e 100755
> > --- a/git-svn.perl
> > +++ b/git-svn.perl
> > @@ -740,7 +740,7 @@ sub load_authors {
> >         my $log = $cmd eq 'log';
> >         while (<$authors>) {
> >                 chomp;
> > -               next unless /^(\S+?|\(no author\))\s*=\s*(.+?)\s*<(.+)>\s*$/;
> > +               next unless /^(\.+?|\(no author\))\s*=\s*(.+?)\s*<(.+)>\s*$/;
> 
> Surely you mean the following:
> 
> +               next unless /^(.+?|\(no author\))\s*=\s*(.+?)\s*<(.+)>\s*$/;
> 
> (No "\" before the ".")   "\." matches a dot/period (.), while "."
> matches anything.

Fwiw, with the regexp corrected:
  Acked-by: Eric Wong <normalperson@yhbt.net>

-- 
Eric Wong

```

## Richard MUSIL, 2007-07-18 08:47

Subject: Re: [PATCH] git-svn: Minimalistic patch which allows svn usernames with space(s).
Message-ID: <469DD3BF.70709@st.com>
URL: https://gitlist.dev/e/469DD3BF.70709%40st.com
In-Reply-To: <20070717195559.GA20103@muzzle>

```
Eric Wong wrote:
> Richard MUSIL <richard.musil@st.com> wrote:
>> Changed filter for username in svn-authors file, so even 'user name' is accepted.
>> ---
>>  git-svn.perl |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/git-svn.perl b/git-svn.perl
>> index 01c3904..975075e 100755
>> --- a/git-svn.perl
>> +++ b/git-svn.perl
>> @@ -740,7 +740,7 @@ sub load_authors {
>>         my $log = $cmd eq 'log';
>>         while (<$authors>) {
>>                 chomp;
>> -               next unless /^(\S+?|\(no author\))\s*=\s*(.+?)\s*<(.+)>\s*$/;
>> +               next unless /^(\.+?|\(no author\))\s*=\s*(.+?)\s*<(.+)>\s*$/;
> 
> Surely you mean the following:
> 
> +               next unless /^(.+?|\(no author\))\s*=\s*(.+?)\s*<(.+)>\s*$/;
> 
> (No "\" before the ".")   "\." matches a dot/period (.), while "."
> matches anything.
> 
Yes! I am sorry for a confusion, I have tested it on '.' version, but committed the wrong one :(.

Richard

```
