{"thread":{"id":"16957","subject":"[PATCH] Git.pm: let a false Directory parameter (such as 0) be used correctly by the constructor","startedAt":"2009-01-02T08:47:37Z","lastAt":"2009-01-02T09:09:40Z","messageCount":2,"participants":["Philippe Bruhat (BooK)"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"99152","messageId":"1230886057-23994-1-git-send-email-book@cpan.org","threadId":"16957","inReplyTo":null,"subject":"[PATCH] Git.pm: let a false Directory parameter (such as 0) be used correctly by the constructor","fromName":"Philippe Bruhat (BooK)","fromEmail":"book@cpan.org","sentAt":"2009-01-02T08:47:37Z","receivedAt":"2009-01-02T08:47:37Z","isPatch":true,"sender":{"key":"book@cpan.org","avatar":"https://avatars.githubusercontent.com/u/44421?v=4"},"body":"Signed-off-by: Philippe Bruhat (BooK) <book@cpan.org>\n---\n perl/Git.pm |    7 ++++---\n 1 files changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/perl/Git.pm b/perl/Git.pm\nindex 8392a68..ad0f530 100644\n--- a/perl/Git.pm\n+++ b/perl/Git.pm\n@@ -166,11 +166,12 @@ sub repository {\n \t\t}\n \t}\n \n-\tif (not defined $opts{Repository} and not defined $opts{WorkingCopy}) {\n-\t\t$opts{Directory} ||= '.';\n+\tif (not defined $opts{Repository} and not defined $opts{WorkingCopy}\n+\t\tand not defined $opts{Directory}) {\n+\t\t$opts{Directory} = '.';\n \t}\n \n-\tif ($opts{Directory}) {\n+\tif (defined $opts{Directory}) {\n \t\t-d $opts{Directory} or throw Error::Simple(\"Directory not found: $!\");\n \n \t\tmy $search = Git->repository(WorkingCopy => $opts{Directory});\n-- \n1.6.0.3.517.g759a\n"},{"id":"99154","messageId":"20090102090940.GA23222@plop","threadId":"16957","inReplyTo":"1230886057-23994-1-git-send-email-book@cpan.org","subject":"Re: [PATCH] Git.pm: let a false Directory parameter (such as 0) be used correctly by the constructor","fromName":"Philippe Bruhat (BooK)","fromEmail":"philippe.bruhat@free.fr","sentAt":"2009-01-02T09:09:40Z","receivedAt":"2009-01-02T09:09:40Z","isPatch":true,"sender":{"key":"philippe.bruhat@free.fr","avatar":"https://gravatar.com/avatar/5e8b60cb2f5f2cd2671543f2f53dcb8f529490f98492a333f96636622eb3adef?d=mp&s=160"},"body":"On Fri, Jan 02, 2009 at 09:47:37AM +0100, Philippe Bruhat (BooK) wrote:\n> Signed-off-by: Philippe Bruhat (BooK) <book@cpan.org>\n> ---\n>  perl/Git.pm |    7 ++++---\n>  1 files changed, 4 insertions(+), 3 deletions(-)\n\nPlease ignore, I forgot half of the the requested changes. Sorry for the\nnoise.\n\n-- \n Philippe Bruhat (BooK)\n\n Mankind is the story of the same mistakes in different places.\n                                                 (Moral from Groo #1 (Image))\n"}]}