summaryrefslogtreecommitdiff
path: root/make_patchnum.pl
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2009-09-27 15:30:41 +0200
committerRafael Garcia-Suarez <rgs@consttype.org>2009-09-27 15:30:41 +0200
commit326df896fec9493c512db76eb6738c3ce3ba9097 (patch)
tree88e39a3af1849a745fa2f8956a20a241d9e84e84 /make_patchnum.pl
parent85269948cc8951473fc68344aef336c43580ee70 (diff)
downloadperl-326df896fec9493c512db76eb6738c3ce3ba9097.tar.gz
git config lossage
The git that I have installed (Debian etch) doesn't support "git config". This causes nasty failure in make_patchnum.pl, where it gets a help message from git, and then blindly interpolates that message into a command that it passes to the shell for execution. The attached patch fixes this.
Diffstat (limited to 'make_patchnum.pl')
-rw-r--r--make_patchnum.pl2
1 files changed, 2 insertions, 0 deletions
diff --git a/make_patchnum.pl b/make_patchnum.pl
index 1644d419d6..55acb92850 100644
--- a/make_patchnum.pl
+++ b/make_patchnum.pl
@@ -137,8 +137,10 @@ elsif (-d "$srcdir/.git") {
my ($remote,$merge);
if (length $branch) {
$merge= backtick("git config branch.$branch.merge");
+ $merge = "" unless $? == 0;
$merge =~ s!^refs/heads/!!;
$remote= backtick("git config branch.$branch.remote");
+ $remote = "" unless $? == 0;
}
$commit_id = backtick("git rev-parse HEAD");
$describe = backtick("git describe");