Re: problem using jgit

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Marek Zawirski
Date: Monday, July 21, 2008 - 5:35 am

Marek Zawirski wrote:
It's caused by 14a630c3: Cached modification times for symbolic refs too
Changes introduced by this patch made Repository#getAllRefs() including 
Ref objects with null ObjectId in case of unresolvable (invalid?) HEAD 
symbolic ref, and null Ref for HEAD  when it doesn't exist. Previous 
behavior was just not including such refs in result.

Fix for null Ref is just a matter of simple filtering out null Ref 
object for HEAD, if it doesn't exist (just is it considered to be legal 
state of repository when HEAD doesn't exist?).

To fix null ObjectId issue, we have to either change all clients of this 
method or revert method to previous behavior. Now it's just unspecified 
in javadoc.
Robin, Shawn, what do you think? If we want to have unresolvable refs 
included, IMO it may be sensible to provide argument includeUnresolbable 
for Repository#getAllRefs() to let clients avoid burden of filtering 
them out when they don't need them (most cases, perhaps).
I can prepare fix for it (rather easy one) as you are unavailable now, 
let me now what's your opinion.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
problem using jgit, Stephen Bannasch, (Sun Jul 20, 11:24 pm)
Re: problem using jgit, Marek Zawirski, (Mon Jul 21, 3:41 am)
Re: problem using jgit, Marek Zawirski, (Mon Jul 21, 5:35 am)
Re: problem using jgit, Stephen Bannasch, (Mon Jul 21, 10:36 am)
Re: problem using jgit, Marek Zawirski, (Tue Jul 22, 4:51 am)
Re: problem using jgit, Shawn O. Pearce, (Tue Jul 22, 9:58 am)
Re: problem using jgit, Marek Zawirski, (Fri Jul 25, 7:51 am)
Re: problem using jgit, Shawn O. Pearce, (Sat Jul 26, 8:21 pm)