git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Robin Rosenberg <robin.rosenberg.lists@dewire.com>
Cc: git@vger.kernel.org
Subject: Re: [EGIT PATCH 3/3] Add a ref log reader class
Date: Sun, 7 Jun 2009 15:47:54 -0700	[thread overview]
Message-ID: <20090607224754.GF16497@spearce.org> (raw)
In-Reply-To: <200906080045.26927.robin.rosenberg.lists@dewire.com>

Robin Rosenberg <robin.rosenberg.lists@dewire.com> wrote:
> m?ndag 08 juni 2009 00:21:54 skrev "Shawn O. Pearce" <spearce@spearce.org>:
> > Robin Rosenberg <robin.rosenberg@dewire.com> wrote:
> ...
> > > +			int p1 = RawParseUtils.next(raw, p0 + 1, ':');
> > > +			if (p1 == -1)
> > > +				throw new IllegalArgumentException(
> > > +						"Raw log message does not parse as log entry");
> > 
> > Technically, missing a ':' is legal.  Everything after the '\t'
> > is the comment.  It may be splittable into an action/comment,
> > it might not be.
> 
> Do you think I should just skip parsing out action? I don't really need it. I can
> go with everything after tab as one string for my purposes, i.e. reading reflogs
> in JUnit tests.

Yea, just skip it.
 
> As for optimized reading, I'd rather spend my time on something else. Reading
> reflogs won't likely be a real problem and I think the interface will be stable
> even if it needs to be optimized.
> 
> The other stuff I'll fix.

OK, sounds fine to me.

Maybe we should cap the limit at say 20 MiB of log or something, and
refuse to read anything more than that, rather than allowing 2 GiB.

Or, since we most likely only care about the tail, if its over 5
MiB, skip through to the end and then read the last 5 MiB, and if we
have a partial entry left over at the start of the buffer, ignore it.

-- 
Shawn.

  reply	other threads:[~2009-06-07 22:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-07 20:19 [EGIT PATCH 0/3] Ref log reader Robin Rosenberg
2009-06-07 20:19 ` [EGIT PATCH 1/3] Assert the name and origName properties of Ref objects Robin Rosenberg
2009-06-07 20:19   ` [EGIT PATCH 2/3] Add methods to RawParseUtils for scanning backwards Robin Rosenberg
2009-06-07 20:19     ` [EGIT PATCH 3/3] Add a ref log reader class Robin Rosenberg
2009-06-07 22:21       ` Shawn O. Pearce
2009-06-07 22:45         ` Robin Rosenberg
2009-06-07 22:47           ` Shawn O. Pearce [this message]
2009-06-08 17:28             ` [EGIT PATCH 1/2] Add methods to RawParseUtils for scanning backwards Robin Rosenberg
2009-06-08 17:28               ` [EGIT PATCH 2/2] Add a ref log reader class Robin Rosenberg
2009-06-12 19:52                 ` Shawn O. Pearce
2009-06-15 21:25                   ` [EGIT PATCH 1/2] Use a UTC relative time zone for PersonIdent Robin Rosenberg
2009-06-15 21:25                     ` [EGIT PATCH 2/2] Add a ref log reader class Robin Rosenberg
2009-06-15 22:21                       ` Robin Rosenberg

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=20090607224754.GF16497@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=robin.rosenberg.lists@dewire.com \
    /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).