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

Please file a bug for the NPE and CC me.

Tomasz

On Thu, Apr 19, 2012 at 09:08, Alex Buloichik <alex73mail@xxxxxxxxx> wrote:
> 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:
>
> java.lang.NullPointerException
>        at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:141)
>        at org.eclipse.jgit.diff.DiffFormatter.flush(DiffFormatter.java:373)
>        at org.eclipse.jgit.api.DiffCommand.call(DiffCommand.java:151)
>
> WBR, Alex.
> _______________________________________________
> jgit-dev mailing list
> jgit-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jgit-dev


Back to the top