gitinfo.pl: special case code to allow running it from $TOP or DEVEL without
installing the hooks first NHgithook.pm: add some warnings if nhversioning can't open files make sure nhversioning fails before opening gitinfo.txt if it can't get valid data
This commit is contained in:
@@ -20,6 +20,13 @@ BEGIN {
|
||||
$gitdir = `git rev-parse --git-dir`;
|
||||
chomp $gitdir;
|
||||
push(@INC, $gitdir.$PDS."hooks");
|
||||
|
||||
# special case for this script only: allow
|
||||
# it to run from DEVEL or $TOP
|
||||
if (-f "hooksdir/NHgithook.pm" || -f "DEVEL/hooksdir/NHgithook.pm"){
|
||||
push(@INC, "DEVEL/hooksdir");
|
||||
}
|
||||
chdir("..") if (-f "hooksdir/NHgithook.pm");
|
||||
}
|
||||
use NHgithook;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user