Re: [PATCH] git-archimport: allow remapping branch names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Paolo Bonzini <bonzini@xxxxxxx> writes:

> The new command-line syntax should not be a problem, since a colon
> in a branch name would be a pretty weird choice even for
> Arch standards.
>
> The new feature is implemented so that archives rotated every
> year can be remapped into a single git archive.

>  'git-archimport' [-h] [-v] [-o] [-a] [-f] [-T] [-D depth] [-t tempdir]
> -               <archive/branch> [ <archive/branch> ]
> +               <archive/branch>[:<git-branch>] ...
> ...
> -my %arch_branches = map { $_ => 1 } @ARGV;
> +my %arch_branches = map { my $branch = $_; $branch =~ s/:.*//; $branch => 1 } @ARGV;
> +
> +# $branch_name_map:
> +# maps arch branches to git branch names
> +my %branch_name_map = map { m/^([^:]*):(.*)/; $1 => $2 } grep { m/:/ } @ARGV;

I am no arch/tla expert, but at least git does not allow colon
in branch names at all, so if you make your command line parser
to match left-greedy-anything, colon and then right-non-colon
(i.e. m/^(.*):([^:]*)$/), you should be able to handle colons in
arch archive names.


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]