1. Stefan Saasen
  2. git

Commits

Junio C Hamano  committed e5bde19 Merge

Merge branch 'pb/maint-git-pm-false-dir' into maint

* pb/maint-git-pm-false-dir:
Git.pm: correctly handle directory name that evaluates to "false"

  • Participants
  • Parent commits e2355a3, 11b8a41
  • Branches master

Comments (0)

Files changed (1)

File perl/Git.pm

View file
  • Ignore whitespace
 		}
 	}
 
-	if (not defined $opts{Repository} and not defined $opts{WorkingCopy}) {
-		$opts{Directory} ||= '.';
+	if (not defined $opts{Repository} and not defined $opts{WorkingCopy}
+		and not defined $opts{Directory}) {
+		$opts{Directory} = '.';
 	}
 
-	if ($opts{Directory}) {
+	if (defined $opts{Directory}) {
 		-d $opts{Directory} or throw Error::Simple("Directory not found: $!");
 
 		my $search = Git->repository(WorkingCopy => $opts{Directory});