=item *
-C<@n> with the current repository name.
+C<%n> with the current repository name.
=item *
-C<@g> with the relative path (based from the root directory) to the current repository.
+C<%g> with the relative path (based from the root directory) to the current repository.
=item *
-C<@G> with the absolute path to the current repository.
+C<%G> with the absolute path to the current repository.
=item *
-C<@w> with the relative path (based from the root directory) to the current repository's working directory.
+C<%w> with the relative path (based from the root directory) to the current repository's working directory.
=item *
-C<@W> with the absolute path to the current repository's working directory.
+C<%W> with the absolute path to the current repository's working directory.
=item *
-C<@b> with a "bareified" relative path, i.e. C<@g> if this is a bare repository, and C<@w.git> otherwise.
+C<%b> with a "bareified" relative path, i.e. C<%g> if this is a bare repository, and C<%w.git> otherwise.
=item *
-C<@B> with an absolute version of the "bareified" path.
+C<%B> with an absolute version of the "bareified" path.
=item *
-C<@R> with the absolute path to the root directory.
+C<%R> with the absolute path to the root directory.
=item *
-C<@@> with a bare C<@>.
+C<%%> with a bare C<%>.
=back
Tag all the repositories with their name :
- rgit tag @n
+ rgit tag %n
Add a remote to all repositories in "/foo/bar" to their bare counterpart in C<qux> on F<host> :
- GIT_DIR="/foo/bar" rgit remote add host git://host/qux/@b
+ GIT_DIR="/foo/bar" rgit remote add host git://host/qux/%b
=head1 DEPENDENCIES
}
my %escapes = (
- '@' => sub { '@' },
+ '%' => sub { '%' },
'n' => sub { shift->name },
'g' => sub { _abs2rel(shift->repo, shift->root) },
'G' => sub { shift->repo },
return unless $conf->isa('App::Rgit::Config');
my @args = @_;
unless ($self->fake) {
- s/@($e)/$escapes{$1}->($self, $conf)/eg for @args;
+ s/%($e)/$escapes{$1}->($self, $conf)/eg for @args;
}
unshift @args, $conf->git;
$conf->info('Executing "', join(' ', @args), '" into ', $self->work, "\n");
@$_,
map({ catdir($tmpdir, $_) } @{$_}[1 .. 3]),
$tmpdir,
- '@n', '@x'
+ '%n', '%x'
], @expected;
sub try {
git => abs_path('t/bin/git'),
root => $tmpdir,
cmd => $cmd,
- args => [ abs_path($filename), $cmd, qw/@n @g @w @b @G @W @B @R @@n @x/ ],
+ args => [ abs_path($filename), $cmd, qw/%n %g %w %b %G %W %B %R %%n %x/ ],
policy => $policy,
);
isnt($ar, undef, "each $cmd has a defined object");
use App::Rgit;
my @expected = (
- ([ [ qw/@n @g @w @b @@/ ] ]) x 5
+ ([ [ qw/%n %g %w %b %%/ ] ]) x 5
);
local $ENV{GIT_DIR} = 't';
git => $ENV{GIT_EXEC_PATH},
root => $ENV{GIT_DIR},
cmd => $cmd,
- args => [ abs_path($filename), $cmd, qw/@n @g @w @b @@/ ]
+ args => [ abs_path($filename), $cmd, qw/%n %g %w %b %%/ ]
);
isnt($ar, undef, "once $cmd has a defined object");
my $exit = $ar->run;
my @lines = sort split /\n/, do { local $/; <$fh> };
is(@lines, 1, "once $cmd visited only one repo");
my $r = [ split /\|/, defined $lines[0] ? $lines[0] : '' ];
- my $e = [ $cmd, qw/@n @g @w @b @@/ ];
+ my $e = [ $cmd, qw/%n %g %w %b %%/ ];
s/[\r\n]*$// for @$r;
is($r->[$_], $e->[$_], "once $cmd argument $_ is ok")
for 0 .. 5;