Permalink
Browse files

add git-fetchs

  • Loading branch information...
1 parent 617fe96 commit f5528f50361e3e45fb0101979c2e1a1b6453be7f @mjdominus committed Aug 10, 2011
Showing with 19 additions and 0 deletions.
  1. +19 −0 git-fetchs
View
@@ -0,0 +1,19 @@
+#!/usr/bin/perl
+
+use Getopt::Std;
+getopts('v', \my %opt) or die;
+
+my @remotes = do {
+ my %r;
+ for my $b (qx{git branch -a}) {
+ next unless $b =~ m{remotes/([^/]+)/};
+ $r{$1} = 1;
+ }
+ keys %r;
+};
+
+for my $r (@remotes) {
+ print "$r\n" if $opt{v};
+ system('git', 'fetch', $r);
+}
+

0 comments on commit f5528f5

Please sign in to comment.