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

      It would be helpful if the plugin would support bare clones in order use them as reference repositories and to use the existing infrastructure to easily fetch remote changes.

          [JENKINS-27191] Support bare clone

          Mark Waite added a comment -

          Good suggestion. Jesse Glick implemented something similar in the Mercurial plugin. The Mercurial plugin copies to a central location on the Jenkins server, then uses the Jenkins slave communication system to transfer the repository to slaves as needed.

          Mark Waite added a comment - Good suggestion. Jesse Glick implemented something similar in the Mercurial plugin. The Mercurial plugin copies to a central location on the Jenkins server, then uses the Jenkins slave communication system to transfer the repository to slaves as needed.

          Ronny Schuetz added a comment -

          @Mark: If I understand you correctly, the Mercurial plugin support something like GIT reference repositories out of the box and under the hood? That would be even better.

          Ronny Schuetz added a comment - @Mark: If I understand you correctly, the Mercurial plugin support something like GIT reference repositories out of the box and under the hood? That would be even better.

          D Pasto added a comment -

          I can't believe so useful a feature has languished so long.  Is there a technical obstacle, or is it just that no one in a position to make the change happened on it?  We make huge use of reference repos and something like this would be very convenient - 5 minute git fetch vs seconds goes a long way.

          If this feature is too big, maybe an alternative is to just expose more git features, even if they aren't pretty.  For managing a reference repo, I need Jenkins integration for credentials and URL, but then execute (out of the workspace) similar to:

           

          ### Create the reference repo if it does not exist yet, then update
          cd \$REFPATH
          if [ ! -d "myRepo.git" ]; then git clone --mirror https://gitlab.myCorp.com/myGroup/myRepo; fi
          ls
          cd "myRepo.git/"
          git fetch --all --prune
          

          Git has many, many features: if we don't have time for "nice" integration, a lot of us would take the quick and dirty approach to get more of those features

          D Pasto added a comment - I can't believe so useful a feature has languished so long.  Is there a technical obstacle, or is it just that no one in a position to make the change happened on it?  We make huge use of reference repos and something like this would be very convenient - 5 minute git fetch vs seconds goes a long way. If this feature is too big, maybe an alternative is to just expose more git features, even if they aren't pretty.  For managing a reference repo, I need Jenkins integration for credentials and URL, but then execute (out of the workspace) similar to:   ### Create the reference repo if it does not exist yet, then update cd \$REFPATH if [ ! -d "myRepo.git" ]; then git clone --mirror https: //gitlab.myCorp.com/myGroup/myRepo; fi ls cd "myRepo.git/" git fetch --all --prune Git has many, many features: if we don't have time for "nice" integration, a lot of us would take the quick and dirty approach to get more of those features

            Unassigned Unassigned
            rschuetz Ronny Schuetz
            Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: