summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-04-19 13:31:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-04-19 13:31:41 +0000
commitf5d18cd7cc427fc306ea8f3d56f268b3fccecd9b (patch)
tree359ed5d22186bcf0452904ca5134c7eecabea25c
parentAdding upstream version 2.12.0. (diff)
downloadpre-commit-f5d18cd7cc427fc306ea8f3d56f268b3fccecd9b.tar.xz
pre-commit-f5d18cd7cc427fc306ea8f3d56f268b3fccecd9b.zip
Adding upstream version 2.12.1.upstream/2.12.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--.pre-commit-config.yaml4
-rw-r--r--CHANGELOG.md8
-rw-r--r--azure-pipelines.yml2
-rw-r--r--pre_commit/staged_files_only.py2
-rw-r--r--setup.cfg2
5 files changed, 13 insertions, 5 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 0c6d636..214c285 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -21,11 +21,11 @@ repos:
hooks:
- id: autopep8
- repo: https://github.com/pre-commit/pre-commit
- rev: v2.12.0
+ rev: v2.12.1
hooks:
- id: validate_manifest
- repo: https://github.com/asottile/pyupgrade
- rev: v2.11.0
+ rev: v2.12.0
hooks:
- id: pyupgrade
args: [--py36-plus]
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2d6a35d..2f154c4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,11 @@
+2.12.1 - 2021-04-16
+===================
+
+### Fixes
+- Fix race condition when stashing files in multiple parallel invocations
+ - #1881 PR by @adamchainz.
+ - #1880 issue by @adamchainz.
+
2.12.0 - 2021-04-06
===================
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 34ace23..58dee74 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -10,7 +10,7 @@ resources:
type: github
endpoint: github
name: asottile/azure-pipeline-templates
- ref: refs/tags/v2.0.0
+ ref: refs/tags/v2.1.0
jobs:
- template: job--python-tox.yml@asottile
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}.')
diff --git a/setup.cfg b/setup.cfg
index b336e58..4002998 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,6 +1,6 @@
[metadata]
name = pre_commit
-version = 2.12.0
+version = 2.12.1
description = A framework for managing and maintaining multi-language pre-commit hooks.
long_description = file: README.md
long_description_content_type = text/markdown