Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] Quick question about WorkingTreeIterator::contentCheck

On Tue, 10 Mar 2020 at 22:01, Thomas Wolf <thomas.wolf@xxxxxxxxxx> wrote:
> On 10 Mar 2020, at 18:39 , Matthias Sohn <matthias.sohn@xxxxxxxxx> wrote:
> > this should not happen, JGit first compares file meta data to detect modification (since that's faster),
> > if this fails it compares the actual file content by comparing objectIDs (hash over the object's content).
> > I guess you meant WorkingTreeIterator#isModified
I did, sorry for the confusion.
> Which JGit version?
In a checkout of NB's git I have two copies of
org.eclipse.jgit- (with different sizes) and
one of org.eclipse.jgit-! However in the
combined binary there is just
org-eclipse-jgit.jar and it is identical to the 5.5.0 version.
I assume that replacing 5.5.0 -> 5.5.1 would not require any changes
to the calling code?

However, this should be a performance change shouldn't it, files
should still be marked correctly even if jgit has to go through the
slower route of checking file contents?

> Otherwise, perhaps it's line endings. Check that the files do not use mixed line endings,
> and double-check your autoCrlf and other git config settings and .gitattributes related
> to line endings.
I'll check this, because I did the original clones from 'git for
Windows' (git bash) and then saw the spurious changes in Netbeans
using jgit.
Also I tried the same on MacOS and it worked perfectly.

I will report back if I figure it out; in the meantime thanks again
for your patience, there's quite a lot of new information to digest
for me.

Back to the top