diff --git a/scripts/mytasks.pl b/scripts/mytasks.pl index a1ca52a2fcf..1e28a22162d 100644 --- a/scripts/mytasks.pl +++ b/scripts/mytasks.pl @@ -64,7 +64,7 @@ my $pos = 0; sub getDiffOrigin { my $currentBranch = `git branch | grep "^* "`; chop $currentBranch; - $currentBranch =~ s/^* //; + $currentBranch =~ s/^\s*\* //; my $remoteRepo = `git config --local --get branch.$currentBranch.remote`; chop $remoteRepo; @@ -73,7 +73,7 @@ sub getDiffOrigin { my $remoteBranch = `git config --local --get branch.$currentBranch.merge`; chop $remoteBranch; - $remoteBranch =~ s!^refts/heads/!!; + $remoteBranch =~ s!^refs/heads/!!; return "HEAD" if (!$remoteBranch);