Skip to content

Commit

Permalink
add comment about os.fsdecode()
Browse files Browse the repository at this point in the history
  • Loading branch information
mawillcockson committed Dec 4, 2021
1 parent f845c61 commit aadee0d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions flit/vcs/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
def list_tracked_files(directory):
outb = check_output(['git', 'ls-files', '--recurse-submodules', '-z'],
cwd=str(directory))
# NOTE: os.fsdecode() may cause issues if git returns path names that
# aren't in the filesystem encoding
return [osp.normpath(os.fsdecode(l)) for l in outb.strip(b'\0').split(b'\0') if l]

def list_untracked_deleted_files(directory):
Expand Down

0 comments on commit aadee0d

Please sign in to comment.