diff options
author | didier <dgautheron@magic.fr> | 2014-02-05 17:21:55 +0100 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2014-02-05 22:27:16 +0000 |
commit | 60ea64531f7deed90deda37ec6cf6fcf8eebcf57 (patch) | |
tree | 0ebcb5ec632688f0f8998720456eb73d373055f3 /make-version.pl | |
parent | 32e4d901fcd3125c4646d8f3d3003e1f53a98b11 (diff) | |
download | wireshark-60ea64531f7deed90deda37ec6cf6fcf8eebcf57.tar.gz wireshark-60ea64531f7deed90deda37ec6cf6fcf8eebcf57.tar.bz2 wireshark-60ea64531f7deed90deda37ec6cf6fcf8eebcf57.zip |
use the right src dir in git command for svnversion.h
make-version.pl wasn't using the right source dir for git commands when not compiling from inside source tree.
add --git-dir=$srcdir/.git parameter.
Change-Id: I45ca4874d96abaed1c559c022d0ace66239652c8
Reviewed-on: https://code.wireshark.org/review/122
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'make-version.pl')
-rwxr-xr-x | make-version.pl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/make-version.pl b/make-version.pl index 6b68be4821..73d038a612 100755 --- a/make-version.pl +++ b/make-version.pl @@ -160,30 +160,30 @@ sub read_repo_info { use warnings "all"; no warnings "all"; - chomp($line = qx{git log -1 --pretty=format:%at}); + chomp($line = qx{git --git-dir=$srcdir/.git log -1 --pretty=format:%at}); if (defined($line)) { $last_change = $line; } # Commits in current (master-1.8) branch. We may want to use # a different number. - chomp($line = qx{git rev-list --count ea19c7f952ce9fc53fe4c223f1d9d6797346258b..HEAD}); + chomp($line = qx{git --git-dir=$srcdir/.git rev-list --count ea19c7f952ce9fc53fe4c223f1d9d6797346258b..HEAD}); if (defined($line)) { $revision = $line; } - chomp($line = qx{git ls-remote --get-url origin}); + chomp($line = qx{git --git-dir=$srcdir/.git ls-remote --get-url origin}); if (defined($line)) { $repo_url = $line; } # Probably not quite what we're looking for - chomp($line = qx{git rev-parse --abbrev-ref --symbolic-full-name \@\{upstream\}}); + chomp($line = qx{git --git-dir=$srcdir/.git rev-parse --abbrev-ref --symbolic-full-name \@\{upstream\}}); if (defined($line)) { $repo_path = basename($line); } - chomp($line = qx{git describe --dirty --match "v*"}); + chomp($line = qx{git --git-dir=$srcdir/.git describe --dirty --match "v*"}); if (defined($line)) { $git_description = "wireshark-" . substr($line, 1); } |