• Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • git-plugin

      Currently users are not able to use the prune option with JGit. Apparently JGit does have the prune feature, but it prunes more than git CLI: https://issues.jenkins-ci.org/browse/JENKINS-20258?focusedCommentId=218092&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-218092

      I don't see any issues on the JGit bug tracker about this, but perhaps it's my search:
      https://bugs.eclipse.org/bugs/buglist.cgi?bug_status=__all__&content=prune&no_redirect=1&order=relevance%20desc&product=JGit&query_format=specific

          [JENKINS-26197] Allow prune option when using JGit

          pmv added a comment -

          Currently if you choose the prune option with jgit (Git 2.3.1/Git-client 1.12.0) this is the output:

          Fetching changes from the remote Git repository
          Pruning obsolete local branches
          ERROR: Error fetching remote repo 'origin'
          ERROR: Error fetching remote repo 'origin'
          

          Not very descriptive, but maybe someone will find this ticket if searching on this error. Perhaps JENKINS-9052 did not apply to JGit?

          pmv added a comment - Currently if you choose the prune option with jgit (Git 2.3.1/Git-client 1.12.0) this is the output: Fetching changes from the remote Git repository Pruning obsolete local branches ERROR: Error fetching remote repo 'origin' ERROR: Error fetching remote repo 'origin' Not very descriptive, but maybe someone will find this ticket if searching on this error. Perhaps JENKINS-9052 did not apply to JGit?

          Code changed in jenkins
          User: Stephan Pauxberger
          Path:
          src/main/java/org/jenkinsci/plugins/gitclient/JGitAPIImpl.java
          src/test/java/org/jenkinsci/plugins/gitclient/GitAPITestCase.java
          http://jenkins-ci.org/commit/git-client-plugin/26ac9e58880c9442912efe89228b78f0953d9fc7
          Log:
          JENKINS-26197 Implement correct prune strategy for JGit.

          Delete any remote branches matching the destination of the given refspecs. Then
          do the fetch and let it recreate the references.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephan Pauxberger Path: src/main/java/org/jenkinsci/plugins/gitclient/JGitAPIImpl.java src/test/java/org/jenkinsci/plugins/gitclient/GitAPITestCase.java http://jenkins-ci.org/commit/git-client-plugin/26ac9e58880c9442912efe89228b78f0953d9fc7 Log: JENKINS-26197 Implement correct prune strategy for JGit. Delete any remote branches matching the destination of the given refspecs. Then do the fetch and let it recreate the references.

          Mark Waite added a comment -

          Included in git client plugin 1.17.0 released 25 Apr 2015

          Mark Waite added a comment - Included in git client plugin 1.17.0 released 25 Apr 2015

          Code changed in jenkins
          User: Mark Waite
          Path:
          pom.xml
          http://jenkins-ci.org/commit/git-client-plugin/3bd20ddf480daf6794ba2a8de54007a8894c65a1
          Log:
          Base 1.17.1 off 1.16.1: allow more study of git 2.3.6-SNAPSHOT issues

          The release of git client plugin 1.17.0 delivered a fix for
          [ISO date parsing](https://issues.jenkins-ci.org/browse/JENKINS-27097).
          Unfortunately, that fix exposes a long-standing bug in git plugin versions
          2.3.5 and earlier. The bug is fixed in git plugin 2.3.6-SNAPSHOT.
          However, tests of git plugin 2.3.6-SNAPSHOT show that it is not yet
          ready for production use.

          Rather than rush to deliver git plugin 2.3.6, this change will restore the
          git client plugin to the code base which was delivered with git client
          plugin 1.16.1. That will hide the ISO date parsing bug that is in git
          plugin 2.3.5 and earlier and allow more time to prepare 2.3.6 for release.

          The 1.17.0 changes are not included in this build, including:

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Mark Waite Path: pom.xml http://jenkins-ci.org/commit/git-client-plugin/3bd20ddf480daf6794ba2a8de54007a8894c65a1 Log: Base 1.17.1 off 1.16.1: allow more study of git 2.3.6-SNAPSHOT issues The release of git client plugin 1.17.0 delivered a fix for [ISO date parsing] ( https://issues.jenkins-ci.org/browse/JENKINS-27097 ). Unfortunately, that fix exposes a long-standing bug in git plugin versions 2.3.5 and earlier. The bug is fixed in git plugin 2.3.6-SNAPSHOT. However, tests of git plugin 2.3.6-SNAPSHOT show that it is not yet ready for production use. Rather than rush to deliver git plugin 2.3.6, this change will restore the git client plugin to the code base which was delivered with git client plugin 1.16.1. That will hide the ISO date parsing bug that is in git plugin 2.3.5 and earlier and allow more time to prepare 2.3.6 for release. The 1.17.0 changes are not included in this build, including: Update minimum Jenkins version from 1.509 to 1.532.2 Update JGit to 3.7.0 [Allow prune with JGit JENKINS-26197] ( https://issues.jenkins-ci.org/browse/JENKINS-26197 ) [Use ISO-8601 date format in changelog JENKINS-27097] ( https://issues.jenkins-ci.org/browse/JENKINS-27097 ) [Improve checkout failure message JENKINS-26748] ( https://issues.jenkins-ci.org/browse/JENKINS-26748 ) Guard against null pointer exception in several API calls Update other dependencies

            ndeloof Nicolas De Loof
            pmv pmv
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: