Mark Waite edited a comment on Bug JENKINS-22510

I've been trying to understand the sequence of git operations which arrive at that state described in the bug report, and haven't yet understood how to do that. My attempts have persuaded me that I don't understand submodules. I used my fork of the git-client-plugin for my experiments.

The failing sequence I see currently is:

  • checkout master - ok
  • checkout tests/notSubmodules - ok
  • checkout tests/getSubmodules - ok
  • checkout tests/notSubmodules - fails

I defined a bash shell function "checkout" for my testing convenience. It is

checkout ()
{
    branch=$1;
    git checkout -f $branch;
    git clean -xffd;
    git submodule update --init --recursive;
    git status
}

Clone the repository - works

git clone git://github.com/MarkEWaite/git-client-plugin
cd git-client-plugin
ls modules/ntp # reports an error, no content in modules/ntp

Checkout tests/notSubmodules - works

checkout tests/notSubmodules

Checkout tests/getSubmodules - works

checkout tests/getSubmodules

Checkout tests/notSubmodules - works

checkout tests/notSubmodules

Checkout tests/getSubmodules - fails

checkout tests/getSubmodules

The "mostly" working sequence in my case seems to be "force checkout, git clean -xffd, submodule update". That seems to work for all the cases I've tested except the master to notSubmodules to getSubmodules to notSubmodules to getSubmodules case. However, since my case does not duplicate your message, I'm not sure if you'll see the same behavior as I see.

In that repository, the branch to branch transitions seem to behave like this:

Current Branch Branch to Checkout Result
master tests/getSubmodules ok
master tests/notSubmodules ok
tests/getSubmodules master ok
tests/notSubmodules master ok
tests/getSubmodules tests/notSubmodules fails in some cases
tests/notSubmodules tests/getSubmodules fails in some cases

However, the failure message I'm seeing is not the same as the failure message you're seeing. I'm confident that means I don't understand enough about submodules. Can you provide a similar series of steps (preferably using a fork of the git-client-plugin repository) to show your case?

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