Skip to content

Commit 2db9d04

Browse files
authored
Do not prune tags when rebuilding patches (#341)
A semi-common git config to set globally is fetch.pruneTags which allows developers to prune tags no longer present on the remote. This config however breaks patch rebuilding as the file and base tags are pruned during the pruning fetch of paperweight prior to the format-patch command. To prevent this, this commit now explicitly disables patch pruning while preparing the rebuild.
1 parent f365008 commit 2db9d04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

paperweight-lib/src/main/kotlin/io/papermc/paperweight/tasks/RebuildGitPatches.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ abstract class RebuildGitPatches : ControllableOutputTask() {
9494
}
9595

9696
val git = Git(inputDir.path)
97-
git("fetch", "--all", "--prune").runSilently(silenceErr = true)
97+
git("fetch", "--all", "--prune", "--no-prune-tags").runSilently(silenceErr = true)
9898
git(
9999
"format-patch",
100100
"--diff-algorithm=myers", "--zero-commit", "--full-index", "--no-signature", "--no-stat", "-N",

0 commit comments

Comments
 (0)