From: Paolo Bonzini <paolo.bonzini@lu•unisi.ch>
To: Junio C Hamano <junkio@cox•net>
Cc: bonzini@gnu•org, git@vger•kernel.org
Subject: Re: [PATCH, 2nd version] git-archimport: allow remapping branch names
Date: Wed, 07 Mar 2007 10:06:56 +0100 [thread overview]
Message-ID: <45EE80B0.8010403@lu.unisi.ch> (raw)
In-Reply-To: <7vlki9h1mg.fsf@assigned-by-dhcp.cox.net>
> Just to make sure. Was it tested with AND WITHOUT the new colon
> feature? I am asking how likely is there a regression.
Yes. But my Arch repositories do not have colons in the name (I mean I tested on real-world repositories and not weird ones created exactly to make the patch fail).
>> -my %arch_branches = map { $_ => 1 } @ARGV;
>> +my %arch_branches = map { my $branch = $_; $branch =~ s/:.*//; $branch => 1 } @ARGV;
In fact, I was too headlong on your suggestion. I should have noticed that this substitution must be changed to
$branch =~ s/:[^:]*$//
I just realized, however, that branches with colons in the names would have failed before my patch too, because git would have failed creating a branch with a colon in it. So this is not a regression, strictly speaking.
> Strictly speaking (-e "$git_dir/refs/heads/$branch") test would
> not work if the repository was pack-ref'ed with --all option.
> Run "git show-ref -q --verify refs/heads/$branch" and check its
> exit status, or run it without -q and read its output.
Unfortunately this is pervasive in git-archimport. I can fix it, but I think it belongs in a separate patch.
> With the original code, a tag "t--a/g" was mapped to "t--a,g" in
> the else clause, but the new code yields git_branchname("t--a/g")
> followed by '--' followed by "g", which would evaluate to I do
> not know what exactly, but I am sure it would not evaluate to
> "t--a,g". Would it be a non-issue? As archimport seems to support
> incremental import, I suspect it might upset existing users.
In this case, this input will always be of the form t--a/g--REVISION.
So the old one would change to t--a,g--REVISION; the new one would
strip to t--a/g and convert it to t--a,g (using git_default_branchname)
and file tack --REVISION at the end again.
I will shortly send an updated patch
Paolo
next prev parent reply other threads:[~2007-03-07 9:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-07 7:59 [PATCH] git-archimport: allow remapping branch names Paolo Bonzini
2007-03-07 8:09 ` Junio C Hamano
2007-03-07 8:13 ` [PATCH, 2nd version] " Paolo Bonzini
[not found] ` <7vfy8hihwp.fsf@assigned-by-dhcp.cox.net>
2007-03-07 8:25 ` Paolo Bonzini
2007-03-07 8:57 ` Junio C Hamano
2007-03-07 9:06 ` Paolo Bonzini [this message]
2007-03-07 9:33 ` Junio C Hamano
2007-03-07 9:43 ` [PATCH, final " Paolo Bonzini
2007-03-07 9:48 ` Paolo Bonzini
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=45EE80B0.8010403@lu.unisi.ch \
--to=paolo.bonzini@lu$(echo .)unisi.ch \
--cc=bonzini@gnu$(echo .)org \
--cc=git@vger$(echo .)kernel.org \
--cc=junkio@cox$(echo .)net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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