[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] autocrlf=input with CRLF in repository does not behave like C Git


----- Ursprungligt meddelande -----
> FrÃn: "Robin Rosenberg" <robin.rosenberg@xxxxxxxxxx>
> Till: "Robin Stocker" <robin@xxxxxxxxx>
> Kopia: "JGit Developers list" <jgit-dev@xxxxxxxxxxx>
> Skickat: sÃndag, 8 dec 2013 12:33:28
> Ãmne: Re: [jgit-dev] autocrlf=input with CRLF in repository does not behave	like C Git
> 
> 
> ----- Ursprungligt meddelande -----
> > FrÃn: "Robin Stocker" <robin@xxxxxxxxx>
> > Till: "Robin Rosenberg" <robin.rosenberg@xxxxxxxxxx>
> > Kopia: "JGit Developers list" <jgit-dev@xxxxxxxxxxx>
> > Skickat: torsdag, 5 dec 2013 22:56:05
> > Ãmne: Re: [jgit-dev] autocrlf=input with CRLF in repository does not behave
> > 	like C Git
> > 
> > Hej,
> > 
> > Thanks for looking into this, Robin! There's a problem with the fix,
> > see extended test in patch set 3:
> > 
> > https://git.eclipse.org/r/#/c/19397/
> 
> ok, updated the patch. I did not investigate the exact behavior
> further, so please take a critical view. Adding more test would
> be helpful too.
> 
> One may note that JGit has a performance problem which gets
> worse here because we do not rewrite the smudged index after
> comparing the content. C Git does this and therefore does not
> have to repeat this content comparison again until the file, index
> or HEAD changes.

I was wrong there it seems, nevertheless a patch update was warranted
to help with performance anyway.

> The issue is more  likely to hurt with autocrlf enabled since we
> need to read the file more than once.
> 
> -- robin
> 
> 
> > Regards,
> >   Nibor
> > 
> > > I posted a patch there. I'd be nice if someone on Windows would test
> > > it.
> > > 
> > > -- robin
> > > 
> > > ----- Ursprungligt meddelande -----
> > > > FrÃn: "Robin Stocker" <robin@xxxxxxxxx>
> > > > Till: "JGit Developers list" <jgit-dev@xxxxxxxxxxx>
> > > > Skickat: torsdag, 5 dec 2013 15:15:47
> > > > Ãmne: [jgit-dev] autocrlf=input with CRLF in repository does not
> > > > behave	like C Git
> > > > 
> > > > Hey,
> > > > 
> > > > In the last few days, I've had several developers complain to me
> > > > about this, and I suspect that e.g. EGit is losing users because
> > > > of this.
> > > > 
> > > > The problem: When there are files in the repository that use CRLF,
> > > > and the user has "core.autocrlf" set to "input", all these files
> > > > are detected as modified (in IndexDiff).
> > > > 
> > > > C Git behaves as expected and does not show any changes.
> > > > 
> > > > Here's the bug report about this, with a failing test case:
> > > > 
> > > > https://bugs.eclipse.org/bugs/show_bug.cgi?id=372834
> > > > 
> > > > I would really appreciate it if someone familiar with the
> > > > DirCacheEntry code could take a look.
> > > > 
> > > > Cheers,
> > > >   Robin Stocker
> > > > _______________________________________________
> > > > jgit-dev mailing list
> > > > jgit-dev@xxxxxxxxxxx
> > > > https://dev.eclipse.org/mailman/listinfo/jgit-dev
> > > > 
> > > 
> > 
> _______________________________________________
> jgit-dev mailing list
> jgit-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jgit-dev
>