mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-08 20:12:01 +03:00
git-testament: Cope with detached HEAD better
This commit is contained in:
parent
1ecc94b187
commit
98e2b3f4df
@ -68,7 +68,7 @@ if ( $git_present ) {
|
||||
chomp $gitinfo{url};
|
||||
$gitinfo{revision} = `git rev-parse HEAD`;
|
||||
chomp $gitinfo{revision};
|
||||
$gitinfo{branch} = `git for-each-ref --format="\%(refname:short)" \$(git symbolic-ref HEAD)`;
|
||||
$gitinfo{branch} = `git for-each-ref --format="\%(refname:short)" \$(git symbolic-ref HEAD 2>/dev/null || git show-ref -s HEAD)`;
|
||||
chomp $gitinfo{branch};
|
||||
@bits = split /\s+/, `git describe --tags --exact-match HEAD 2>/dev/null`;
|
||||
$bits[0] = "" unless exists $bits[0];
|
||||
|
Loading…
Reference in New Issue
Block a user