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, Mar 10, 2020 at 5:51 PM Peter Hull <peterhull90@xxxxxxxxx> wrote:
On Tue, 10 Mar 2020 at 15:34, Christian Halstrick
<christian.halstrick@xxxxxxxxx> wrote:
> On Tue, Mar 10, 2020 at 4:26 PM Matthias Sohn <matthias.sohn@xxxxxxxxx> wrote:
Thanks both. The background is: Netbeans (11.3 on Windows) is showing
some files as modified in the IDE but neither 'Show diff' nor git from
the command line says they are modified. I traced through the NB code
as far as the point where it calls into jgit and it seems to be that
FileTreeIterator::isModified(entry, true, reader) was returning true
when the files were not modified.

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 will investigate elsewhere!
Peter

Back to the top