summaryrefslogtreecommitdiffstats
path: root/pre_commit
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-04-19 13:31:45 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-04-19 13:32:50 +0000
commit849a376de96a2a65422d67a0b41c2f782af7abf5 (patch)
tree4d3cc11b4432f24b8e33bf339c80de6ccd316530 /pre_commit
parentReleasing debian version 2.12.0-1. (diff)
downloadpre-commit-849a376de96a2a65422d67a0b41c2f782af7abf5.tar.xz
pre-commit-849a376de96a2a65422d67a0b41c2f782af7abf5.zip
Merging upstream version 2.12.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pre_commit')
-rw-r--r--pre_commit/staged_files_only.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pre_commit/staged_files_only.py b/pre_commit/staged_files_only.py
index 6179301..48cc102 100644
--- a/pre_commit/staged_files_only.py
+++ b/pre_commit/staged_files_only.py
@@ -47,7 +47,7 @@ def _unstaged_changes_cleared(patch_dir: str) -> Generator[None, None, None]:
retcode=None,
)
if retcode and diff_stdout_binary.strip():
- patch_filename = f'patch{int(time.time())}'
+ patch_filename = f'patch{int(time.time())}-{os.getpid()}'
patch_filename = os.path.join(patch_dir, patch_filename)
logger.warning('Unstaged files detected.')
logger.info(f'Stashing unstaged files to {patch_filename}.')