Adding upstream version 3.6.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
0e9e0db1eb
commit
eff035fa99
6 changed files with 36 additions and 3 deletions
|
@ -37,6 +37,9 @@ logger = logging.getLogger('pre_commit')
|
|||
# pyvenv
|
||||
os.environ.pop('__PYVENV_LAUNCHER__', None)
|
||||
|
||||
# https://github.com/getsentry/snuba/pull/5388
|
||||
os.environ.pop('PYTHONEXECUTABLE', None)
|
||||
|
||||
COMMANDS_NO_GIT = {
|
||||
'clean', 'gc', 'init-templatedir', 'sample-config',
|
||||
'validate-config', 'validate-manifest',
|
||||
|
|
|
@ -59,6 +59,11 @@ def _unstaged_changes_cleared(patch_dir: str) -> Generator[None, None, None]:
|
|||
# There weren't any staged files so we don't need to do anything
|
||||
# special
|
||||
yield
|
||||
elif retcode == 1 and not diff_stdout.strip():
|
||||
# due to behaviour (probably a bug?) in git with crlf endings and
|
||||
# autocrlf set to either `true` or `input` sometimes git will refuse
|
||||
# to show a crlf-only diff to us :(
|
||||
yield
|
||||
elif retcode == 1 and diff_stdout.strip():
|
||||
patch_filename = f'patch{int(time.time())}-{os.getpid()}'
|
||||
patch_filename = os.path.join(patch_dir, patch_filename)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue