jenkinsci / jenkinsci/git-plugin

[JENKINS-18834] Initial git fetch ignore prune settings

Open
#2,300 11 comments 0 reactions 0 assignees View on GitHub
component:git-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
694
Forks
1.1k
Avg merge
1h 29m
Merged PRs (30d)
3

Description

In current release version prune works after fetch. (yeah, I saw this bugfix https://issues.jenkins-ci.org/browse/JENKINS-10348)

But here the bad situation:

1) Create "abc" branch in git repo.

2) Build this branch by Jenkins.

3) Abandon commit and delete branch.

4) Create "abc/asd" branch, trying to build it... and we got a problem.

UPD: my bad, now I see what happens with Prune in refactoring branch. But the problem is still there - Prune executes after fetch, not before it.

---
Originally reported by sapone, imported from: Initial git fetch ignore prune settings


  • status: Open
  • priority: Major
  • component(s): git-plugin
  • label(s): git2
  • resolution: Unresolved
  • votes: 4
  • watchers: 9
  • imported: 2025-12-02

Raw content of original issue

In current release version prune works after fetch. (yeah, I saw this bugfix https://issues.jenkins-ci.org/browse/JENKINS-10348)

But here the bad situation:
1) Create "abc" branch in git repo.
2) Build this branch by Jenkins.
3) Abandon commit and delete branch.
4) Create "abc/asd" branch, trying to build it... and we got a problem.

UPD: my bad, now I see what happens with Prune in refactoring branch. But the problem is still there - Prune executes after fetch, not before it.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.