diff --git a/git-remote.perl b/git-remote.perl
index 01cf480221be1e5860bd701d5d17ced25766d38d..f6f283ea4f8b45671b7d9b34687d5d7b8475e8b3 100755 (executable)
--- a/git-remote.perl
+++ b/git-remote.perl
for (@$track) {
$git->command('config', '--add', "remote.$name.fetch",
- "+refs/heads/$_:refs/remotes/$name/$_");
+ $opts->{'mirror'} ?
+ "+refs/$_:refs/$_" :
+ "+refs/heads/$_:refs/remotes/$name/$_");
}
if ($opts->{'fetch'}) {
$git->command('fetch', $name);
shift @ARGV;
next;
}
+ if ($opt eq '--mirror') {
+ $opts{'mirror'} = 1;
+ next;
+ }
add_usage();
}
if (@ARGV != 3) {