From: Ian Jackson Date: Fri, 29 Jan 2021 17:05:06 +0000 (+0000) Subject: gitattributes defuse: work even if .git/info/attributes missing X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=35f1cc3f7c6bec8a59b897ab624a5d850df85561;p=dgit.git gitattributes defuse: work even if .git/info/attributes missing Treat this as "needs setup" rather than "needs adjustment". Closes: #981344 Reported-by: Andrej Shadura Tested-by: Andrej Shadura Signed-off-by: Ian Jackson --- diff --git a/dgit b/dgit index b035e108..145fa9bb 100755 --- 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};