Skip to content

Commit

Permalink
Use the -z option for check-attr to make test unambiguous.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kentzo committed Aug 14, 2018
1 parent 3a4ed63 commit 6fe4ace
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions git_archive_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,14 @@ def is_file_excluded(self, repo_abspath, repo_file_path):
@rtype: bool
"""
out = self.run_git_shell(
'git check-attr export-ignore -- %s' % repo_file_path,
'git check-attr -z export-ignore -- %s' % repo_file_path,
cwd=repo_abspath
)
return 'export-ignore: set' in out
).split('\0')

try:
return out[2] == 'set'
except IndexError:
return False

def archive_all_files(self, archiver):
"""
Expand Down

0 comments on commit 6fe4ace

Please sign in to comment.