summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTzu-ping Chung <uranusjr@gmail.com>2021-08-07 17:58:43 +0800
committerGitHub <noreply@github.com>2021-08-07 17:58:43 +0800
commitf0323c7888cfda582143f217be9a62e1ddf3805e (patch)
tree11cf890de49a7d8fbcc02455dcaab29493393841 /tools
parented4401ab0da5876a669f7c7e32b3ca4e00eb7682 (diff)
parent94dc07a28a5d3e32c5ade3e27bb6916fc65a7a35 (diff)
downloadpip-f0323c7888cfda582143f217be9a62e1ddf3805e.tar.gz
Merge pull request #10200 from uranusjr/release-procedure-improvements
Diffstat (limited to 'tools')
-rw-r--r--tools/release/__init__.py19
1 files changed, 7 insertions, 12 deletions
diff --git a/tools/release/__init__.py b/tools/release/__init__.py
index cc60f442f..06a9767d5 100644
--- a/tools/release/__init__.py
+++ b/tools/release/__init__.py
@@ -175,23 +175,18 @@ def isolated_temporary_checkout(
git_checkout_dir = tmp_dir / f"pip-build-{target_ref}"
nox_session.run(
# fmt: off
- "git", "worktree", "add", "--force", "--checkout",
- str(git_checkout_dir), str(target_ref),
+ "git", "clone",
+ "--depth", "1",
+ "--config", "core.autocrlf=false",
+ "--branch", str(target_ref),
+ "--",
+ ".", str(git_checkout_dir),
# fmt: on
external=True,
silent=True,
)
- try:
- yield git_checkout_dir
- finally:
- nox_session.run(
- # fmt: off
- "git", "worktree", "remove", "--force", str(git_checkout_dir),
- # fmt: on
- external=True,
- silent=True,
- )
+ yield git_checkout_dir
def get_git_untracked_files() -> Iterator[str]: