• Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • git-plugin
    • None

        [JENKINS-45368] JGit doesn't support sparse checkout

        Kiran Kumar created issue -
        Mark Waite made changes -
        Summary Original: Git Client doesn't support sparsecheckout New: JGit doesn't support sparse checkout
        Mark Waite made changes -
        Assignee Original: Mark Waite [ markewaite ]

        Mark Waite added a comment -

        If you need sparse checkout, then you'll need to use command line git as the implementation, rather than JGit. The underlying JGit implementation does not support sparse checkout yet. Refer to their enhancement request for more information.

        Sparse checkout works very well with command line git inside the git plugin. Change the selected implementation for that job from "jgit" to "Default", and the sparse checkout will work (assuming you have a command line git version installed, and that version of command line git is new enough to include sparse checkout support.

        Mark Waite added a comment - If you need sparse checkout, then you'll need to use command line git as the implementation, rather than JGit. The underlying JGit implementation does not support sparse checkout yet. Refer to their enhancement request for more information. Sparse checkout works very well with command line git inside the git plugin. Change the selected implementation for that job from "jgit" to "Default", and the sparse checkout will work (assuming you have a command line git version installed, and that version of command line git is new enough to include sparse checkout support.
        Mark Waite made changes -
        Remote Link New: This issue links to "JGit 383772 (Web Link)" [ 17921 ]
        Mark Waite made changes -
        Issue Type Original: Bug [ 1 ] New: Improvement [ 4 ]

        We're using 4.8.0.201706111038-r version of jgit. Is this fixed in higher version? Basically, sparse checkout does not work in this version of jgit.

        Venkata Shreyas Kabekkodu added a comment - We're using 4.8.0.201706111038-r version of jgit. Is this fixed in higher version? Basically, sparse checkout does not work in this version of jgit.

        Mark Waite added a comment -

        vshreyask as stated in the linked enhancement request to the JGit project, JGit does not support sparse checkout in any of its versions, including 4.5 as bundled with the git client plugin 2.x and 5.3 as bundled with the pre-release version of git client plugin 3.x

        Mark Waite added a comment - vshreyask as stated in the linked enhancement request to the JGit project, JGit does not support sparse checkout in any of its versions, including 4.5 as bundled with the git client plugin 2.x and 5.3 as bundled with the pre-release version of git client plugin 3.x

        Thanks markewaite

        Venkata Shreyas Kabekkodu added a comment - Thanks markewaite

        Mark Waite added a comment - - edited

        JGit 5.9.0 as bundled with git client plugin 3.5.0 (and later) includes support for the addPath and addPaths methods. Those methods should allow the git client plugin to implement sparse checkout support.

        Tasks to implement sparse checkout for JGit:

        • Extend the git client plugin JGit implementation to use addPath or addPaths during checkout
        • Write tests to confirm that sparse checkout behaves consistently between command line git and JGit
        • Extend git plugin to depend on the new release of git client plugin and remove sparse checkout guards from JGit calls
        • Remove the sparse checkout exclusion from GitToolChooser

        Mark Waite added a comment - - edited JGit 5.9.0 as bundled with git client plugin 3.5.0 (and later) includes support for the addPath and addPaths methods. Those methods should allow the git client plugin to implement sparse checkout support. Tasks to implement sparse checkout for JGit: Extend the git client plugin JGit implementation to use addPath or addPaths during checkout Write tests to confirm that sparse checkout behaves consistently between command line git and JGit Extend git plugin to depend on the new release of git client plugin and remove sparse checkout guards from JGit calls Remove the sparse checkout exclusion from GitToolChooser

          Unassigned Unassigned
          kiran9456 Kiran Kumar
          Votes:
          0 Vote for this issue
          Watchers:
          4 Start watching this issue

            Created:
            Updated: