• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • git-plugin

      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.

          [JENKINS-18834] Initial git fetch ignore prune settings

          Sergey Mylnikov created issue -
          Sergey Mylnikov made changes -
          Description Original: 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.


          BTW, can someone explain, why in current refactoring branch "prune" completly removed?
          New: 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.


          BTW, can someone explain, why in current refactoring branch "prune" completly removed? (commit sha id: 2f01ec91359468e11653e5d222b4a652cf032f55)

          Mark Waite added a comment - - edited

          The "prune" has not been completely removed as far as I can tell. It is now under the "Additional Behaviors" drop down list.

          Refer to http://www.flickr.com/photos/markewaite/9452027920/ for a screen shot of the drop down.

          Mark Waite added a comment - - edited The "prune" has not been completely removed as far as I can tell. It is now under the "Additional Behaviors" drop down list. Refer to http://www.flickr.com/photos/markewaite/9452027920/ for a screen shot of the drop down.
          Mark Waite made changes -
          Labels New: git2
          Sergey Mylnikov made changes -
          Description Original: 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.


          BTW, can someone explain, why in current refactoring branch "prune" completly removed? (commit sha id: 2f01ec91359468e11653e5d222b4a652cf032f55)
          New: 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.

          Sergey Mylnikov added a comment - bugfix for refactoring branch: https://github.com/jenkinsci/git-plugin/pull/161 ( https://github.com/sapone/git-plugin/commit/e78f74a18423840ded26d720cf348496da7b4600 )

          Code changed in jenkins
          User: Sergey Mylnikov
          Path:
          src/main/java/hudson/plugins/git/extensions/impl/PruneStaleBranch.java
          http://jenkins-ci.org/commit/git-plugin/4f48d8e661a20ee7a676fec1d1a09077d63694f6
          Log:
          [FIXED JENKINS-18834] moving Prune before Fetch

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Sergey Mylnikov Path: src/main/java/hudson/plugins/git/extensions/impl/PruneStaleBranch.java http://jenkins-ci.org/commit/git-plugin/4f48d8e661a20ee7a676fec1d1a09077d63694f6 Log: [FIXED JENKINS-18834] moving Prune before Fetch
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          packadal added a comment - - edited

          This problematic behavior is still present in Jenkins 1.596 with git plugin version 2.3.4.
          I see a git fetch <repo> --prune which is not sufficient.
          There should be something along the lines of "git remote prune origin" BEFORE the fetch.

          packadal added a comment - - edited This problematic behavior is still present in Jenkins 1.596 with git plugin version 2.3.4. I see a git fetch <repo> --prune which is not sufficient. There should be something along the lines of "git remote prune origin" BEFORE the fetch.
          packadal made changes -
          Resolution Original: Fixed [ 1 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]

            Unassigned Unassigned
            sapone Sergey Mylnikov
            Votes:
            4 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: