[JIRA] (JENKINS-27082) Sparse checkouts and submodules: Error on checkout, submodule missing

4 views
Skip to first unread message

weihong.guan@gmail.com (JIRA)

unread,
Jun 15, 2018, 4:02:03 AM6/15/18
to jenkinsc...@googlegroups.com
Weihong Guan commented on Bug JENKINS-27082
 
Re: Sparse checkouts and submodules: Error on checkout, submodule missing

Any workaround for it?

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

mark.earl.waite@gmail.com (JIRA)

unread,
Jun 15, 2018, 9:17:03 AM6/15/18
to jenkinsc...@googlegroups.com

weihong.guan@gmail.com (JIRA)

unread,
Jun 16, 2018, 5:38:03 AM6/16/18
to jenkinsc...@googlegroups.com

Mark Waite My workaround is not use submodule. All I need is a shell script, but I think it is more polite to import it as a submodule not the raw source file. But checkout the whole repo is too much waste in my case.

weihong.guan@gmail.com (JIRA)

unread,
Jun 16, 2018, 5:39:02 AM6/16/18
to jenkinsc...@googlegroups.com
Weihong Guan edited a comment on Bug JENKINS-27082
[~markewaite] My workaround is not use submodule. All I need is a shell script, but I think it is more polite to import it as a submodule not the raw source file. But checkout Checking out the whole repo is of too much waste in my case.

nicolas.deloof@gmail.com (JIRA)

unread,
Apr 24, 2019, 10:28:13 AM4/24/19
to jenkinsc...@googlegroups.com
Nicolas De Loof assigned an issue to Unassigned
 
Jenkins / Bug JENKINS-27082
Change By: Nicolas De Loof
Assignee: Nicolas De Loof
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

ashok.mohanty@oracle.com (JIRA)

unread,
Mar 16, 2020, 8:06:05 AM3/16/20
to jenkinsc...@googlegroups.com
ASHOK MOHANTY commented on Bug JENKINS-27082
 
Re: Sparse checkouts and submodules: Error on checkout, submodule missing

I am getting the same error - when trying to use 'sparsecheckout' to checkout only a directory not full git-project.

 > git config core.sparsecheckout # timeout=10
 > git config core.sparsecheckout true # timeout=10
 > git read-tree -mu HEAD # timeout=10
Command "git read-tree -mu HEAD" returned status code 128:
stdout: 
stderr: fatal: Not a valid object name HEAD

git plugin 4.0.0 , git-client  3.0.0 , gitlab-plugin 1.4.3  .

This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

ashok.mohanty@oracle.com (JIRA)

unread,
Mar 16, 2020, 8:08:03 AM3/16/20
to jenkinsc...@googlegroups.com
ASHOK MOHANTY edited a comment on Bug JENKINS-27082
I am getting the same error - when trying to use 'sparsecheckout' to checkout only a directory not full git-project.
{code:java}

> git config core.sparsecheckout # timeout=10
> git config core.sparsecheckout true # timeout=10
> git read-tree -mu HEAD # timeout=10
Command "git read-tree -mu HEAD" returned status code 128:
stdout:
stderr: fatal: Not a valid object name HEAD
{code}

git plugin 4.0.0 , git-client  3.0.0 , gitlab-plugin 1.4.3  .


 

OR do we have any alternate solution to checkout directory (not complete project) in Jenkins job.

mark.earl.waite@gmail.com (JIRA)

unread,
Mar 18, 2020, 12:50:03 AM3/18/20
to jenkinsc...@googlegroups.com

ASHOK MOHANTY I can't tell from your message if you're using a submodule with the sparse checkout or not.

If you're not using a submodule with a sparse checkout, then this issue does not apply to you. You may want to check the version of command line git on the system that has the issue. If you're using Red Hat Linux 6, CentOS 6, Oracle Linux 6, Scientific Linux 6, Red Hat Linux 7, CentOS 7, Oracle Linux 7, or Scientific Linux 7, you may have a version of command line git that is too old to support sparse checkout. I believe reliable sparse checkout support requires at least command line git 1.9.

If your command line git version is not too old and you are not using a submodule, then you should open a new issue. This issue is specifically related to sparse checkout interaction with submodules.

ashok.mohanty@oracle.com (JIRA)

unread,
Mar 26, 2020, 9:46:03 AM3/26/20
to jenkinsc...@googlegroups.com

Thanks Mark. Yes I am trying to use submodule (sparse checkout). But ya found the git version is 1.8.x, will upgrade to 1.9.x and re-try.

FYI - OS is "Oracle Linux Server 7.7".

mark.earl.waite@gmail.com (JIRA)

unread,
Mar 26, 2020, 9:53:03 AM3/26/20
to jenkinsc...@googlegroups.com

ASHOK MOHANTY if you are upgrading to a newer version of git, please consider upgrading to a much more recent version than 1.9.x. Git 2.26.0 recently released. Git 2.26.0 and the preceding 25+ releases are significant improvements over command line git 1.9.

Reply all
Reply to author
Forward
0 new messages