use Getopt::Std;
use File::Temp qw(tempdir);
use Data::Dumper;
+use File::Basename qw(basename);
unless ($ENV{GIT_DIR} && -r $ENV{GIT_DIR}){
die "GIT_DIR is not defined or is unreadable";
our ($opt_h, $opt_p, $opt_v, $opt_c );
-getopt('hpvc');
+getopts('hpvc');
$opt_h && usage();
# grab the commit message
`git-cat-file commit $commit | sed -e '1,/^\$/d' > .msg`;
-$? && die "Error extraction the commit message";
+$? && die "Error extracting the commit message";
my (@afiles, @dfiles, @mfiles);
my @files = `git-diff-tree -r $parent $commit`;
if ($dirtypatch) {
print "NOTE: One or more hunks failed to apply cleanly.\n";
- print "Resolve the conflicts and then commit using:n";
+ print "Resolve the conflicts and then commit using:\n";
print "\n $cmd\n\n";
- exit;
+ exit(1);
}
}
sub usage {
print STDERR <<END;
-Usage: GIT_DIR=/path/to/.gi ${\basename $0} # fetch/update GIT from CVS
- [-h] [-p] [ parent ] commit
+Usage: GIT_DIR=/path/to/.git ${\basename $0} [-h] [-p] [-v] [-c] [ parent ] commit
END
exit(1);
}