Switch back to diff instead of diff-index

`diff-index` appears to act strangely with `git add --intent-to-add`
This commit is contained in:
Anthony Sottile 2018-12-13 10:08:57 -08:00
parent 51659ee606
commit aae31993cd
2 changed files with 13 additions and 3 deletions

View file

@ -29,10 +29,9 @@ def staged_files_only(patch_dir):
context.
"""
# Determine if there are unstaged files
tree = cmd_output('git', 'write-tree')[1].strip()
retcode, diff_stdout_binary, _ = cmd_output(
'git', 'diff-index', '--ignore-submodules', '--binary',
'--exit-code', '--no-color', '--no-ext-diff', tree, '--',
'git', 'diff', '--ignore-submodules', '--binary',
'--exit-code', '--no-color', '--no-ext-diff', '--',
retcode=None,
encoding=None,
)