Git plugin: The following untracked working tree files would be overwritten by checkout

300 views
Skip to first unread message

Tomhe

unread,
Apr 24, 2015, 5:46:50 AM4/24/15
to jenkins...@googlegroups.com
In some circumstances the git plugin fails during submodule update for us:

stderr: error: The following untracked working tree files would be overwritten by checkout:
	tool/scons/scons-LICENSE
	tool/scons/scons-README
	tool/scons/scons-time.py
	tool/scons/scons.py
	tool/scons/sconsign.py
	tool/scons/site_scons/site_init.py
	tool/scons/site_scons/site_tools/codecheck.py
	tool/scons/site_scons/site_tools/doxygen.py
	tool/scons/site_scons/site_tools/metrics.py
	tool/scons/site_scons/site_tools/qac.py
	tool/scons/site_scons/utilities.py
Please move or remove them before you can switch branches.
Aborting

Is it possible to configure the plugin to force the update of the submodules?

Mark Waite

unread,
Apr 24, 2015, 9:12:01 AM4/24/15
to jenkins...@googlegroups.com
There is an "Advanced submodule behaviours" section under the "Additional Behaviours" button in the git section of the job configuration page.  If "Recursively update submodules" is checked, then it should update those submodules.  

If the additional behavior is added to clean before checkout, that may help your case as well.

There are many, many ways that submodule configurations and parameters can interact with the plugin, and there are very few automated tests of those many different cases.  Automated test submissions to better test submodule support in the git plugin and the git client plugin would certainly be viewed positively.

There are some command line git versions (the 1.7.2.5 version included with Debian 6, for instance), which aren't new enough to be as well behaved with submodules as later versions of git.  Since that old version is not officially supported with the git plugin (due to other gaps in functionality), it is no surprise that it is not as well behaved as newer versions of git.

There are two different pending pull requests which propose to always include submodules in clean (git clean -xffd).  However, neither of the pull requests have tests, and I'm not a user of submodules generally, so I don't have enough interactive test experience to allow those changes into the plugin without much more testing.

If you're interested in more reading about submodules, checkout, and clean, consider:


The most upvoted request for the git plugin asks for credential support in submodules:


Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/358d5332-21d1-4124-8169-418c704aa211%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages