mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-18 00:24:47 +04:00
Fix file stashing with external diff tool
When git is configured to use an external diff tool to show diffs (eg. 'git config diff.external mytool'), the stashing unstaged files will create an empty file that can't be recovered. Some modifications are permanently lost... Just disable the ext-diff of git diff to avoid any issue. Change-Id: I10a57ac2acbcb1f7219455f1958efd50d8452d6a
This commit is contained in:
parent
9c6484b94f
commit
5206ce2448
1 changed files with 1 additions and 1 deletions
|
|
@ -23,7 +23,7 @@ def staged_files_only(cmd_runner):
|
|||
retcode, diff_stdout_binary, _ = cmd_runner.run(
|
||||
[
|
||||
'git', 'diff', '--ignore-submodules', '--binary', '--exit-code',
|
||||
'--no-color',
|
||||
'--no-color', '--no-ext-diff',
|
||||
],
|
||||
retcode=None,
|
||||
encoding=None,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue