Browse Source

improve detection and error for non-git-repo detection

Joey Hess 19 years ago
parent
commit
572b8d4817
1 changed files with 2 additions and 2 deletions
  1. 2 2
      scripts/Dpkg/Source/VCS/git.pm

+ 2 - 2
scripts/Dpkg/Source/VCS/git.pm

@@ -39,8 +39,8 @@ delete $ENV{GIT_WORK_TREE};
 sub sanity_check {
 	my $srcdir=shift;
 
-	if (! -e "$srcdir/.git") {
-		main::error(sprintf(_g("%s is not a git repository, but Format git was specified"), $srcdir));
+	if (! -s "$srcdir/.git") {
+		main::error(sprintf(_g("%s is not the top directory of a git repository (%s/.git not present), but Format git was specified"), $srcdir, $srcdir));
 	}
 	if (-s "$srcdir/.gitmodules") {
 		main::error(sprintf(_g("git repository %s uses submodules. This is not yet supported."), $srcdir));