rin_ne commented on Bug JENKINS-23054

I can reproduce this issue with git-client 1.9.1-SNAPSHOT.

With shallow clone

Cloning repository ssh://gerrit-local/FOO
 > git init /home/user/work/jobs/TEST/workspace
Fetching upstream changes from ssh://gerrit-local/FOO
 > git --version
 > git fetch --tags --progress ssh://gerrit-local/FOO +refs/heads/*:refs/remotes/origin/* --depth=1
 > git config remote.origin.url ssh://gerrit-local/FOO
 > git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
Fetching upstream changes from origin
 > git config --get remote.origin.url
 > git fetch -t ssh://gerrit-local/FOO refs/changes/07/7/21
 > git rev-parse 83f863038f497feac94bfc6a8195b062c9b640bb^{commit}
Commencing build of Revision 83f863038f497feac94bfc6a8195b062c9b640bb (master)
Checking out Revision 83f863038f497feac94bfc6a8195b062c9b640bb (master)
 > git config core.sparsecheckout
 > git checkout -f 83f863038f497feac94bfc6a8195b062c9b640bb
 > git tag -a -f -m Jenkins Build #10 jenkins-TEST-10
 > git rev-parse FETCH_HEAD^{commit}
 > git rev-list 2a7b99a9fcd8f4cf40bd243a9c74f4c3374b2d77

Without shallow clone

Cloning repository ssh://gerrit-local/FOO
 > git init /home/user/work/jobs/TEST/workspace
Fetching upstream changes from ssh://gerrit-local/FOO
 > git --version
 > git fetch --tags --progress ssh://gerrit-local/FOO +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url ssh://gerrit-local/FOO
 > git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
Fetching upstream changes from origin
 > git config --get remote.origin.url
 > git fetch -t ssh://gerrit-local/FOO refs/changes/07/7/22
 > git rev-parse 235a5d2c74169c6da7ce2b2a0f97de4064df1b17^{commit}
Commencing build of Revision 235a5d2c74169c6da7ce2b2a0f97de4064df1b17 (master)
Checking out Revision 235a5d2c74169c6da7ce2b2a0f97de4064df1b17 (master)
 > git config core.sparsecheckout
 > git checkout -f 235a5d2c74169c6da7ce2b2a0f97de4064df1b17
 > git tag -a -f -m Jenkins Build #11 jenkins-TEST-11
 > git rev-parse FETCH_HEAD^{commit}
 > git rev-list 2a7b99a9fcd8f4cf40bd243a9c74f4c3374b2d77
  • Fetch twice in spite of shallow clone option.
    • Only "--depth=1" is added or not.
  • The interface to get revision from gerrit-trigger is called once.

Thus, first fetch is not what was caused by gerrit-trigger.

You should create new issue to git plugin.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to