Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] Modification status

Hi All.

There is strange issue in the my program that uses jgit.

I'm trying to check if one file modified or not. I'm calling 'status' for that:

Status status = new Git(repository).status().call();
boolean result = status.getModified().contains(relativeFile);

So, sometimes getModified() is empty, but command-line git and git gui display file as modified. I tried versions 2.1.0, 2.3.1, 3.5.1 - the same behavior.

I tried to understand code of IndexDiff, but it's not so simple.

So, he question is: how jgit detects file modification ? Is there any directory cache that can affect on it ?

WBR, Alex.

Back to the top