mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-10-22 22:04:15 -04:00
Match latest git's repo status messages.
This commit is contained in:
1 parent
6ceb9ea012
commit
6fe798392b
2 files changed
+3
-3
No files matched your search
@@ -35,8 +35,8 @@ sub check_git_status
|
||||
my($fatal_unless_clean, $subdir) = @_;
|
||||
$subdir = '.' unless defined $subdir;
|
||||
my $status = `cd '$subdir' && git status`;
|
||||
my $is_clean = $status =~ /\nnothing to commit \(working directory clean\)/;
|
||||
my($cur_branch) = $status =~ /^# On branch (.+)\n/;
|
||||
my $is_clean = $status =~ /\nnothing to commit.+working directory clean/;
|
||||
my($cur_branch) = $status =~ /^(?:# )?On branch (.+)\n/;
|
||||
if ($fatal_unless_clean && !$is_clean) {
|
||||
if ($subdir eq '.') {
|
||||
$subdir = '';
|
||||
|
||||
@@ -39,7 +39,7 @@ if ($make_tar) {
|
||||
open(IN, '-|', 'git status') or die $!;
|
||||
my $status = join('', <IN>);
|
||||
close IN;
|
||||
die "The checkout is not clean:\n", $status unless $status =~ /\nnothing to commit \(working directory clean\)/;
|
||||
die "The checkout is not clean:\n", $status unless $status =~ /\nnothing to commit.+working directory clean/;
|
||||
die "The checkout is not on the master branch.\n" unless $status =~ /^# On branch master\n/;
|
||||
system "make $gen_target" and die "make $gen_target failed!\n";
|
||||
|
||||
|
||||
Reference in new issue
Block a user