Bug 383772 - Please support sparse-checkout in EGit/JGit
Summary: Please support sparse-checkout in EGit/JGit
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 enhancement with 22 votes (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-28 07:21 EDT by Klaus Reimer CLA
Modified: 2023-12-12 07:54 EST (History)
12 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Klaus Reimer CLA 2012-06-28 07:21:57 EDT
Build Identifier: I20120608-1400 

I'm working with EGit (2.0.201205130900, Eclipse 4.2.0, 64 bit Linux) on a pretty large project (30 sub projects, Repo size 2.6GB, Checkout size (without repo) 2.8 GB, 120000 files, 14000 directories).

Performing a commit on the parent project or any of the sub projects takes 30 seconds or more before the commit message window appears. Don't know why this is so slow ("git commit" on the command line just needs a single second or less).

Because this is so damn slow I configured a sparse-checkout in the Git configuration to drastically reduce the checkout size. This works pretty well, the commit window now appears after 2 seconds. But when I pull in some changes via EGit then the sparse-checkout configuration of Git is somehow disabled and all the ignored files are now counted as deleted. I have to fix this manually be re-running "git read-tree -m -u HEAD" or by pulling changes on the command line.

Would be pretty nice if some support for sparse-checkout could be implemented in Egit. There is no need to implement a nice GUI to configure sparse-checkouts, it is enough to simply honor the existing settings instead of breaking it.

Reproducible: Always
Comment 1 Peter Durisin CLA 2016-04-27 05:01:14 EDT
Hello


When it is going to be implemente sparse checkout in JGit?

I am asking as jenkins's user where Git plugin use JGit.
Thank you in advance
Regards
Peter
Comment 2 thomas menzel CLA 2017-07-13 11:53:42 EDT
yep, having the same issue here! 
using git from the CLI as a consequence for anything but commits due to the templating of the commit msg. provided by mylyn...
Comment 3 Stephen Lawson CLA 2017-11-20 08:06:58 EST
I have worked on a change (see Gerrit link) to implement sparse-checkout in JGit. This can make the checkout of a large repository a lot quicker (especially on a Windows OS).

I am hoping this will go through to the build fairly soon.
Comment 4 Stephen Lawson CLA 2017-11-20 08:10:46 EST
(In reply to Peter Durisin from comment #1)
> Hello
> 
> 
> When it is going to be implemente sparse checkout in JGit?
> 
> I am asking as jenkins's user where Git plugin use JGit.
> Thank you in advance
> Regards
> Peter

(In reply to Klaus Reimer from comment #0)
> Build Identifier: I20120608-1400 
> 
> I'm working with EGit (2.0.201205130900, Eclipse 4.2.0, 64 bit Linux) on a
> pretty large project (30 sub projects, Repo size 2.6GB, Checkout size
> (without repo) 2.8 GB, 120000 files, 14000 directories).
> 
> Performing a commit on the parent project or any of the sub projects takes
> 30 seconds or more before the commit message window appears. Don't know why
> this is so slow ("git commit" on the command line just needs a single second
> or less).
> 
> Because this is so damn slow I configured a sparse-checkout in the Git
> configuration to drastically reduce the checkout size. This works pretty
> well, the commit window now appears after 2 seconds. But when I pull in some
> changes via EGit then the sparse-checkout configuration of Git is somehow
> disabled and all the ignored files are now counted as deleted. I have to fix
> this manually be re-running "git read-tree -m -u HEAD" or by pulling changes
> on the command line.
> 
> Would be pretty nice if some support for sparse-checkout could be
> implemented in Egit. There is no need to implement a nice GUI to configure
> sparse-checkouts, it is enough to simply honor the existing settings instead
> of breaking it.
> 
> Reproducible: Always

Hi Peter,

See my comment and change that is linked to the bug. I hope that the change will merge quite soon.

Thanks,

-Stephen
Comment 5 Eclipse Genie CLA 2018-01-12 05:44:10 EST
New Gerrit change created: https://git.eclipse.org/r/115289
Comment 6 Holger Voormann CLA 2020-04-21 09:43:57 EDT
Mentioned in the following Stack Overflow answer:
https://stackoverflow.com/a/61336561
Comment 7 Sandra Parsick CLA 2023-12-12 07:54:31 EST
Hi,

We migrated from SVN to Git and use the sparse-checkout command very heavy.

Can we help with the PR to go further with this feature implementation?


Thanks!

Sandra