Skip to content

Commit

Permalink
Fixed more newer/older git issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanwills-optus committed Mar 28, 2016
1 parent 09dabcd commit 52aaf4e
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions lib/VCS/Which/Plugin/Git.pm
Original file line number Diff line number Diff line change
Expand Up @@ -271,14 +271,22 @@ sub status {
else {
$untracked =~ s/^[#].*?\n//gxms;
}
$status{untracked} = [ grep {$_} map {chomp; $_} split /\n?[#]?\s+/, $untracked ];

if ($untracked =~ /^[#]/xms) {
$status{untracked} = [ grep {$_} map {chomp; $_} split /\n?[#]\s+/, $untracked ];
}
else {
$status{untracked} = [ $untracked =~ /^\t(.*?)\n/gxms ];
}
}

$status{merge} = $status =~ /
if ($status =~ /
You \s+ have \s+ unmerged \s+ paths[.]$
|
All \s+ conflicts \s+ fixed \s+ but \s+ you \s+ are \s+ still \s+ merging[.]$
/xms;
/xms) {
$status{merge} = 1;
}

return \%status;
}
Expand Down

0 comments on commit 52aaf4e

Please sign in to comment.