Skip to main content

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

Hi Chris.

I made some experiments, but jgit returns always that my file is non-modified.

I tried to set autocrlf+filemode to false - the same thing.
Command line "git status --short" displays my file as modified with "<space>M" flag: " M omegat/project_save.tmx"
File already exist in the repository, not renamed. File not in the index yet. But it wasn't returned in the getModified() and getChanged().

diff() also returns empty list.

Is there any cache ?

Is there any way to check specific file modification ?

Can I understand is file modified or not after add() command ?

WBR, Alex.

On 28 October 2014 12:34, Christian Halstrick <christian.halstrick@xxxxxxxxx> wrote:

IndexDiff cannot directly show the diffs between a file and HEAD in
the same way as "git status" doesn't report that. Both tools are
comparing the file content against whats in the index (and unrelated
to that they compare index against HEAD). But: if you are in a clean
state before and then you checkout a different branch then afterwards
HEAD and index are equal. In that case comparing file against index
does what you want (compare the file against HEAD).

Regarding crlf: Right, this method should definitely process autocrlf
correctly. Bugs are not acceptable in that area. But I just know from
experience that autocrlf adds a lot of complexity regarding computing
the status. JGit had bugs in that area. So by letting you temporarily
turn off autocrlf I want to minimize the area where we search for
potential jgit bugs.


Back to the top