Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] Check for file changed

Hello, Robin !

On Wed, Apr 18, 2012 at 9:57 PM, Robin Rosenberg
<robin.rosenberg@xxxxxxxxxx> wrote:

> Seems you have core.autocrlf. It's almost there in 1.3, but broken. Try
> the nightly build if you want to use autocrlf.

>> 2) How can I check file change by content, like command-line git ? I'm
>> using core.autocrlf=true on WIndows computer, if it important.
> jgit diff. Status is only an API this far.

jgit 1.2 diff also reports about file modified, like git 1.2 status

>>    new Git(repository).status().call().getModified().contains(myFile).

> If only creation time is changed, the file is not "modified", but if you

Files are equals (I checked via binary diff).

> checked it out with C Git with autocrlf=true and check status with JGit 1.2,
> it will see it as changed because JGit doesn't normalize the input. JGit 2.0
> should behave differently (better) here.

org.eclipse.jgit_2.0.0.201204181811.jar has the same invalid
behavior(it reports "modified" from jgit diff and jgit status).

BTW, jgit 2.0 diff produce exception when output stream not defined:

	at org.eclipse.jgit.diff.DiffFormatter.flush(

WBR, Alex.

Back to the top