From: Marek Zawirski <marek.zawirski@gmail.com>
To: Stephen Bannasch <stephen.bannasch@deanbrook.org>
Cc: git@vger.kernel.org, Robin Rosenberg <robin.rosenberg@dewire.com>,
"Shawn O. Pearce" <spearce@spearce.org>
Subject: Re: problem using jgit
Date: Mon, 21 Jul 2008 14:35:46 +0200 [thread overview]
Message-ID: <488482A2.4000601@gmail.com> (raw)
In-Reply-To: <488467E3.7000107@gmail.com>
Marek Zawirski wrote:
> Stephen Bannasch wrote:
>> I've setup a simple test class that integrates jgit to clone a git
>> repository. However I'm getting a NullPointerError when
>> RevWalk.parseAny ends up producing a null object id.
>>
>> The code and the stack trace for the error are here:
>>
>> http://pastie.org/237711
>>
>> This problem occurs using the jgit from the master branch from this
>> repo:
>>
>> git://repo.or.cz/egit.git
> Hello Stephen,
>
> I think you've experienced error caused by the same bug as me, during
> my latest fetch/push GUI works few days ago.
> Your code looks fine, probably it's actually bug in jgit. I think
> it's some regression. Thanks for reporting.
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.
next prev parent reply other threads:[~2008-07-21 12:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-21 6:24 problem using jgit Stephen Bannasch
2008-07-21 10:41 ` Marek Zawirski
2008-07-21 12:35 ` Marek Zawirski [this message]
2008-07-21 17:36 ` Stephen Bannasch
2008-07-22 11:51 ` Marek Zawirski
2008-07-22 16:58 ` Shawn O. Pearce
2008-07-25 14:51 ` Marek Zawirski
2008-07-27 3:21 ` Shawn O. Pearce
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=488482A2.4000601@gmail.com \
--to=marek.zawirski@gmail.com \
--cc=git@vger.kernel.org \
--cc=robin.rosenberg@dewire.com \
--cc=spearce@spearce.org \
--cc=stephen.bannasch@deanbrook.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).