]> git.donarmstrong.com Git - debbugs.git/blobdiff - bin/debbugs-loadsql
for installsql and loadsql, use the git INC if run out of git
[debbugs.git] / bin / debbugs-loadsql
index 56c4f912562f38a759d17f60e73785ef3f5bbf23..6401fa8caa94f13e67e7cec8f865e7ba0dca4d12 100755 (executable)
@@ -131,6 +131,13 @@ Display this manual.
 
 use vars qw($DEBUG);
 
+# if we're running out of git, we want to use the git base directory as the
+# first INC directory. If you're not running out of git, or someone has given a
+# non-absolute INC, don't do that.
+use FindBin;
+use if (-d $FindBin::Bin.'/../.git/' && $INC[0] =~ m#^/#),
+    lib => $FindBin::Bin.'/../';
+
 use Debbugs::Common (qw(checkpid lockpid get_hashname getparsedaddrs),
                     qw(getbugcomponent make_list getsourcemaintainers),
                     qw(walk_bugs),