Skip to content

Commit 8d95062

Browse files
committed
Eliminate use of git worktree prune
Signed-off-by: Bence Szépkúti <[email protected]>
1 parent dc88f6e commit 8d95062

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/abi_check.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,13 +398,14 @@ def _cleanup_worktree(self, git_worktree_path):
398398
"""Remove the specified git worktree."""
399399
shutil.rmtree(git_worktree_path)
400400
submodule_output = subprocess.check_output(
401-
[self.git_command, "submodule", "foreach", "--recursive", "git worktree prune"],
401+
[self.git_command, "submodule", "foreach", "--recursive",
402+
f'git worktree remove "{git_worktree_path}/$displaypath"'],
402403
cwd=self.repo_path,
403404
stderr=subprocess.STDOUT
404405
)
405406
self.log.debug(submodule_output.decode("utf-8"))
406407
worktree_output = subprocess.check_output(
407-
[self.git_command, "worktree", "prune"],
408+
[self.git_command, "worktree", "remove", git_worktree_path],
408409
cwd=self.repo_path,
409410
stderr=subprocess.STDOUT
410411
)

0 commit comments

Comments
 (0)