summaryrefslogtreecommitdiff
path: root/git-cvsexportcommit.perl
diff options
context:
space:
mode:
authorRobin Rosenberg <robin.rosenberg@dewire.com>2007-05-24 17:06:55 +0200
committerJunio C Hamano <junkio@cox.net>2007-05-24 21:37:00 -0700
commite5d80641d7b17b6943d54c729fbbd0bc5a8fe84d (patch)
treeb79a70c3028be32159fcf4dfe7b19a2097bb9815 /git-cvsexportcommit.perl
parent18bece43675ea0dc9022a7868865e02808b7af7f (diff)
downloadgit-e5d80641d7b17b6943d54c729fbbd0bc5a8fe84d.tar.gz
Add option to cvs update before export
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-cvsexportcommit.perl')
-rwxr-xr-xgit-cvsexportcommit.perl8
1 files changed, 6 insertions, 2 deletions
diff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl
index d6ae99b8c0..42060ef6e1 100755
--- a/git-cvsexportcommit.perl
+++ b/git-cvsexportcommit.perl
@@ -15,9 +15,9 @@ unless ($ENV{GIT_DIR} && -r $ENV{GIT_DIR}){
die "GIT_DIR is not defined or is unreadable";
}
-our ($opt_h, $opt_P, $opt_p, $opt_v, $opt_c, $opt_f, $opt_a, $opt_m, $opt_d);
+our ($opt_h, $opt_P, $opt_p, $opt_v, $opt_c, $opt_f, $opt_a, $opt_m, $opt_d, $opt_u);
-getopts('hPpvcfam:d:');
+getopts('uhPpvcfam:d:');
$opt_h && usage();
@@ -178,6 +178,10 @@ foreach my $f (@files) {
my %cvsstat;
if (@canstatusfiles) {
+ if ($opt_u) {
+ my @updated = safe_pipe_capture(@cvs, 'update', @canstatusfiles);
+ print @updated;
+ }
my @cvsoutput;
@cvsoutput= safe_pipe_capture(@cvs, 'status', @canstatusfiles);
my $matchcount = 0;