• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • git-plugin
    • None
    • git plugin 4.4.0

      When performing a git clone operation,

      git-client and git-plugin both triggers a git fetch.

       

      Below are the two lines of code running in the same git clone command both doing fetches.

       

      The second link is part of the GITSCM step, it triggers the git-client-plugin's CloneCommand (first link) to perform the clone operation. And afterwards, the GITSCM step performs a fetch once the CloneCommand Completes.

      However, within the CloneCommand (first link) itself, a fetch command was already done.

       

      https://github.com/jenkinsci/git-client-plugin/blob/4241e818dbe27fb78093094f29ebcd2203166610/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java#L609

       

      https://github.com/jenkinsci/git-plugin/blob/cb58c74efafafd08bc03bba2787997c6a0272df0/src/main/java/hudson/plugins/git/GitSCM.java#L1153

       

      I am aware there are needs to support for git clone to fetch all refs first -JENKINS-31393-. The suggestion provided in that ticket was to use "honor git refspec", so shouldn't "honor git refspec" skip the first fetch here?

       

      Thanks,

      Sam

          [JENKINS-49757] Git plugin calls fetch twice per checkout

          sam leung created issue -
          sam leung made changes -
          Description Original: When performing a git clone operation,

          git-client and git-plugin both triggers a git fetch.

           

          Below are the two lines of code running in the same git clone command both doing fetches.

          [https://github.com/jenkinsci/git-client-plugin/blob/4241e818dbe27fb78093094f29ebcd2203166610/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java#L609]

           

          [https://github.com/jenkinsci/git-plugin/blob/cb58c74efafafd08bc03bba2787997c6a0272df0/src/main/java/hudson/plugins/git/GitSCM.java#L1153]

           

          I am aware there are needs to support for git clone to fetch all refs first [JENKINS-31393|https://issues.jenkins-ci.org/browse/JENKINS-31393]. The suggestion provided was to use "honor git refspec", so shouldn't "honor git refspec" skip the first fetch here?

           

          Thanks,

          Sam
          New: When performing a git clone operation,

          git-client and git-plugin both triggers a git fetch.

           

          Below are the two lines of code running in the same git clone command both doing fetches.

          [https://github.com/jenkinsci/git-client-plugin/blob/4241e818dbe27fb78093094f29ebcd2203166610/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java#L609]

           

          [https://github.com/jenkinsci/git-plugin/blob/cb58c74efafafd08bc03bba2787997c6a0272df0/src/main/java/hudson/plugins/git/GitSCM.java#L1153]

           

          I am aware there are needs to support for git clone to fetch all refs first JENKINS-31393. The suggestion provided in that ticket was to use "honor git refspec", so shouldn't "honor git refspec" skip the first fetch here?

           

          Thanks,

          Sam
          Mark Waite made changes -
          Assignee Original: Mark Waite [ markewaite ]
          sam leung made changes -
          Description Original: When performing a git clone operation,

          git-client and git-plugin both triggers a git fetch.

           

          Below are the two lines of code running in the same git clone command both doing fetches.

          [https://github.com/jenkinsci/git-client-plugin/blob/4241e818dbe27fb78093094f29ebcd2203166610/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java#L609]

           

          [https://github.com/jenkinsci/git-plugin/blob/cb58c74efafafd08bc03bba2787997c6a0272df0/src/main/java/hudson/plugins/git/GitSCM.java#L1153]

           

          I am aware there are needs to support for git clone to fetch all refs first JENKINS-31393. The suggestion provided in that ticket was to use "honor git refspec", so shouldn't "honor git refspec" skip the first fetch here?

           

          Thanks,

          Sam
          New: When performing a git clone operation,

          git-client and git-plugin both triggers a git fetch.

           

          Below are the two lines of code running in the same git clone command both doing fetches.

           

          The first link is part of the Git-client clone step, it triggers the git-plugin CloneCommand (second link) to perform the clone operations. And afterwards, the Git-client plugin performs a fetch once cloneCommand Completes.

          However, within the cloneCommand (second link) itself, a fetch command was already done.

           

          [https://github.com/jenkinsci/git-client-plugin/blob/4241e818dbe27fb78093094f29ebcd2203166610/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java#L609]

           

          [https://github.com/jenkinsci/git-plugin/blob/cb58c74efafafd08bc03bba2787997c6a0272df0/src/main/java/hudson/plugins/git/GitSCM.java#L1153]

           

          I am aware there are needs to support for git clone to fetch all refs first -JENKINS-31393-. The suggestion provided in that ticket was to use "honor git refspec", so shouldn't "honor git refspec" skip the first fetch here?

           

          Thanks,

          Sam
          sam leung made changes -
          Description Original: When performing a git clone operation,

          git-client and git-plugin both triggers a git fetch.

           

          Below are the two lines of code running in the same git clone command both doing fetches.

           

          The first link is part of the Git-client clone step, it triggers the git-plugin CloneCommand (second link) to perform the clone operations. And afterwards, the Git-client plugin performs a fetch once cloneCommand Completes.

          However, within the cloneCommand (second link) itself, a fetch command was already done.

           

          [https://github.com/jenkinsci/git-client-plugin/blob/4241e818dbe27fb78093094f29ebcd2203166610/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java#L609]

           

          [https://github.com/jenkinsci/git-plugin/blob/cb58c74efafafd08bc03bba2787997c6a0272df0/src/main/java/hudson/plugins/git/GitSCM.java#L1153]

           

          I am aware there are needs to support for git clone to fetch all refs first -JENKINS-31393-. The suggestion provided in that ticket was to use "honor git refspec", so shouldn't "honor git refspec" skip the first fetch here?

           

          Thanks,

          Sam
          New: When performing a git clone operation,

          git-client and git-plugin both triggers a git fetch.

           

          Below are the two lines of code running in the same git clone command both doing fetches.

           

          The second link is part of the GITSCM step, it triggers the git-client-plugin's CloneCommand (first link) to perform the clone operation. And afterwards, the GITSCM step performs a fetch once the CloneCommand Completes.

          However, within the CloneCommand (first link) itself, a fetch command was already done.

           

          [https://github.com/jenkinsci/git-client-plugin/blob/4241e818dbe27fb78093094f29ebcd2203166610/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java#L609]

           

          [https://github.com/jenkinsci/git-plugin/blob/cb58c74efafafd08bc03bba2787997c6a0272df0/src/main/java/hudson/plugins/git/GitSCM.java#L1153]

           

          I am aware there are needs to support for git clone to fetch all refs first --JENKINS-31393--. The suggestion provided in that ticket was to use "honor git refspec", so shouldn't "honor git refspec" skip the first fetch here?

           

          Thanks,

          Sam
          Mark Waite made changes -
          Priority Original: Major [ 3 ] New: Minor [ 4 ]
          Mark Waite made changes -
          Summary Original: Git clone triggers fetch twice New: Git clone calls fetch twice for a single job
          Mark Waite made changes -
          Summary Original: Git clone calls fetch twice for a single job New: Git plugin calls fetch twice for a single job
          Mark Waite made changes -
          Link New: This issue is related to JENKINS-56404 [ JENKINS-56404 ]
          Mark Waite made changes -
          Summary Original: Git plugin calls fetch twice for a single job New: Git plugin calls fetch twice per checkout
          Mark Waite made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Fixed but Unreleased [ 10203 ]

            Unassigned Unassigned
            slcy sam leung
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: