git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Stephen Bannasch <stephen.bannasch@deanbrook.org>
To: Marek Zawirski <marek.zawirski@gmail.com>
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 13:36:18 -0400	[thread overview]
Message-ID: <p0624080dc4aa78c93ffe@[192.168.1.106]> (raw)
In-Reply-To: <488482A2.4000601@gmail.com>

At 2:35 PM +0200 7/21/08, Marek Zawirski wrote:
>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.

Thanks for looking at this problem Marek. 

If you get a change working for jgit that might not be available in a branch on git://repo.or.cz/egit.gi will you send a patch.

I am looking forward to continuing my tests using jgit from Java and JRuby.

  reply	other threads:[~2008-07-21 17:37 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
2008-07-21 17:36     ` Stephen Bannasch [this message]
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='p0624080dc4aa78c93ffe@[192.168.1.106]' \
    --to=stephen.bannasch@deanbrook.org \
    --cc=git@vger.kernel.org \
    --cc=marek.zawirski@gmail.com \
    --cc=robin.rosenberg@dewire.com \
    --cc=spearce@spearce.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).