forked from qt-creator/qt-creator
Fix git branch retrieval in mytasks.pl script
Change-Id: I86ddcff32e697d7bf02217a05e9f5a4e13cc1015 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
@@ -64,7 +64,7 @@ my $pos = 0;
|
|||||||
sub getDiffOrigin {
|
sub getDiffOrigin {
|
||||||
my $currentBranch = `git branch | grep "^* "`;
|
my $currentBranch = `git branch | grep "^* "`;
|
||||||
chop $currentBranch;
|
chop $currentBranch;
|
||||||
$currentBranch =~ s/^* //;
|
$currentBranch =~ s/^\s*\* //;
|
||||||
|
|
||||||
my $remoteRepo = `git config --local --get branch.$currentBranch.remote`;
|
my $remoteRepo = `git config --local --get branch.$currentBranch.remote`;
|
||||||
chop $remoteRepo;
|
chop $remoteRepo;
|
||||||
@@ -73,7 +73,7 @@ sub getDiffOrigin {
|
|||||||
|
|
||||||
my $remoteBranch = `git config --local --get branch.$currentBranch.merge`;
|
my $remoteBranch = `git config --local --get branch.$currentBranch.merge`;
|
||||||
chop $remoteBranch;
|
chop $remoteBranch;
|
||||||
$remoteBranch =~ s!^refts/heads/!!;
|
$remoteBranch =~ s!^refs/heads/!!;
|
||||||
|
|
||||||
return "HEAD" if (!$remoteBranch);
|
return "HEAD" if (!$remoteBranch);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user