Quote the source directory in Git commands.

It may contain spaces (it does on my Windows 7 VM), so it must be
quoted.  (There are probably other places where it needs to be quoted in
this script.)

Change-Id: If363691b0f94bbe75755072fd5245266566c3360
Reviewed-on: https://code.wireshark.org/review/12043
Reviewed-by: Guy Harris <guy@alum.mit.edu>
daniel/osmux
Guy Harris 2015-11-22 11:24:01 -08:00
parent d69cec7cff
commit b044e48c70
1 changed files with 3 additions and 3 deletions

View File

@ -163,13 +163,13 @@ sub read_repo_info {
use warnings "all";
no warnings "all";
chomp($line = qx{git --git-dir=$srcdir/.git log -1 --pretty=format:%at});
chomp($line = qx{git --git-dir="$srcdir"/.git log -1 --pretty=format:%at});
if ($? == 0 && length($line) > 1) {
$last_change = $line;
}
# Commits since last annotated tag.
chomp($line = qx{git --git-dir=$srcdir/.git describe --long --always --match "v*"});
chomp($line = qx{git --git-dir="$srcdir"/.git describe --long --always --match "v*"});
if ($? == 0 && length($line) > 1) {
my @parts = split(/-/, $line);
$git_description = $line;
@ -179,7 +179,7 @@ sub read_repo_info {
# This will break in some cases. Hopefully not during
# official package builds.
chomp($line = qx{git --git-dir=$srcdir/.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 ($? == 0 && length($line) > 1) {
$repo_branch = basename($line);
}