All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: Avery Pennarun <apenwarr@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH/RFC] git-svn: sanitize_remote_name should accept underscores.
Date: Tue, 24 Jun 2008 23:44:35 -0700	[thread overview]
Message-ID: <20080625064435.GL21299@hand.yhbt.net> (raw)
In-Reply-To: <1214322898-9272-1-git-send-email-apenwarr@gmail.com>

Avery Pennarun <apenwarr@gmail.com> wrote:
> Without this patch, git-svn failed with the error:
>  config --get svn-remote.D2007.Win32.url: command returned error: 1
> 
> ...upon trying to automatically follow a link from a child branch back to
> its parent branch D2007_Win32 (note the underscore, not dot, separating the
> two words).
> 
> Note that I have each of my branches defined (by hand) as separate
> svn-remote entries in .git/config since my svn repository layout is
> nonstandard.
> 
> Signed-off-by: Avery Pennarun <apenwarr@gmail.com>

Thanks,

Acked-by: Eric Wong <normalperson@yhbt.net>

> ---
> I'm not sure why sanitize_remote_name is so picky about allowed characters,
> but underscore should certainly be allowed.  I'm worried that this has
> revealed a more serious problem, since presumably sanitizing the name
> shouldn't break anything in any case.

Weird.  It looks like a stupid bug on my part.  I'm surprised
it took this long to find, since underscore is pretty common...

> ---
>  git-svn.perl |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/git-svn.perl b/git-svn.perl
> index 4c9c59b..263d66c 100755
> --- a/git-svn.perl
> +++ b/git-svn.perl
> @@ -1465,7 +1465,7 @@ sub verify_remotes_sanity {
>  # we allow more chars than remotes2config.sh...
>  sub sanitize_remote_name {
>  	my ($name) = @_;
> -	$name =~ tr{A-Za-z0-9:,/+-}{.}c;
> +	$name =~ tr{A-Za-z0-9:,_/+-}{.}c;
>  	$name;
>  }
>  
> -- 
> 1.5.6.56.g29b0d

  reply	other threads:[~2008-06-25  6:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-24 15:54 [PATCH/RFC] git-svn: sanitize_remote_name should accept underscores Avery Pennarun
2008-06-25  6:44 ` Eric Wong [this message]
2008-06-25  6:55   ` Eric Wong
2008-06-25  7:11     ` Junio C Hamano
2008-06-25  7:45       ` Eric Wong
2008-06-25 15:01         ` Avery Pennarun
2008-06-29  3:40           ` [PATCH] git-svn: don't sanitize remote names in config Eric Wong

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=20080625064435.GL21299@hand.yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=apenwarr@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.