Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] Checking out a single file

On Fri, Nov 26, 2010 at 8:23 AM, Lluis Sanchez Gual <slluis.devel@xxxxxxxxx> wrote:
> I want to check out a single file from a commit. DirCacheCheckout does
> what I want, but it operates on the whole tree. How can I do the same
> but for a single file?

I was able to take stuff from the index by copy/pasting most of the code from DirCacheCheckout's static checkoutEntry(*) method and then asking the DirCacheBuilder to keep all of its existing entries.

Not sure if that's necessarily of use to you or not though as it seems like what you want is slightly more complicated than what I was trying to achieve (just take from index instead of taking from a specific commit).

Regards,
Remy

----------
Remy Suen
Eclipse Platform/UI Committer
IBM Ottawa
1-613-356-5162


Back to the top