chiark / gitweb /
gitattributes defuse: work even if .git/info/attributes missing
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 29 Jan 2021 17:05:06 +0000 (17:05 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 29 Jan 2021 17:05:06 +0000 (17:05 +0000)
Treat this as "needs setup" rather than "needs adjustment".

Closes: #981344
Reported-by: Andrej Shadura <andrewsh@debian.org>
Tested-by: Andrej Shadura <andrewsh@debian.org>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit

diff --git a/dgit b/dgit
index b035e108ebc9825ceebe58b0acab06228efebf28..145fa9bb044be29d383f8849f7766ff0a72f2eab 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -3608,7 +3608,7 @@ sub is_gitattrs_setup () {
     #     0: there is a dgit-defuse-attrs but it needs fixing
     #     undef: there is none
     my $gai = open_main_gitattrs();
-    return 0 unless $gai;
+    return undef unless $gai;
     while (<$gai>) {
        next unless m{$gitattrs_ourmacro_re};
        return 1 if m{\s-working-tree-encoding\s};