Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] Transient poopies after JGit commit

lördagen den 20 februari 2010 11.53.14 skrev  Bill Burdick:
> I'm using JGit in my Xus project, which I talk about here:
> http://this-statement-is-false.blogspot.com/ and I'm experiencing just a
> tiny bit of poop in my test Git directory.  To do the commit, I'm using
>  code modified from egit and from a thread on the old list:
> https://kerneltrap.org/mailarchive/git/2009/2/4/4899784/thread
> 
> After I run my code, when I open gitk in the git project directory in which
> I just committed, gitk says there are "Local uncommitted changes, not
> checked into index".  When I select that item in gitk, it displays a list
>  of all of the files in the diff area, but there are no diff contents for
>  any of the files; just an empty entry under each file name.  After I use
>  git gui or git status and then reload or reopen gitk, the uncommitted
>  changes item is no longer in the list.
> 
> Is this normal behavior for JGit?  Here's the Scala script I'm using to
>  test JGit (should be fairly easy to read for a Java person).

Gitk lists all files for which there is a mismatch in the index stat fields, 
i.e. copies of values from stat(2) calls, JGit cannot (using portable code) 
fill out all stat(2) fields with the values C Git expects. There was a 
discussion on the list where the consesus was roughly that C Git is too picky, 
but not many patches. You can tell C Git to ignore ctime (core.trustctime = 
false)  and see if it helps. There is also the USE_STDEV #define to say whether 
the st_dev fieldd should be checked.

git status will rewrite the fields with values that C Git expects.

-- robin


Back to the top