git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robin Rosenberg <robin.rosenberg.lists@dewire.com>
To: Constantine Plotnikov <constantine.plotnikov@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [JGIT PATCH] Support for delegating tree iterators
Date: Thu, 2 Jul 2009 22:00:39 +0200	[thread overview]
Message-ID: <200907022200.40179.robin.rosenberg.lists@dewire.com> (raw)
In-Reply-To: <1246470772-4496-1-git-send-email-constantine.plotnikov@gmail.com>

onsdag 01 juli 2009 19:52:52 skrev Constantine Plotnikov <constantine.plotnikov@gmail.com>:
> +	protected void ensurePathCapacity(final int capacity, final int len) {
> +		if(path.length >= capacity) {
> +			return;
> +		}
> +		final byte[] o = path;
> +		int current = o.length;
> +		int newCapacity = current;
> +		while(newCapacity < capacity && newCapacity > 0) {
> +			newCapacity <<= 1;
> +		}
> +		setPathCapacity(newCapacity, len);
> +	}

There are no JUnit tests that directly or indirectly proves this is working as only
the optimized path is taken.


> +	public int getNameLength() {
> +		return pathLen - pathOffset;
> +	}

> +	public void getName(byte[] buffer, int offset) {
> +		System.arraycopy(path, pathOffset, buffer, offset, pathLen - pathOffset);
> +	}

Never used? Not even unit test code.

> -- robin

      parent reply	other threads:[~2009-07-02 20:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-01 17:52 [JGIT PATCH] Support for delegating tree iterators Constantine Plotnikov
2009-07-01 22:34 ` Shawn O. Pearce
2009-07-01 22:41   ` Shawn O. Pearce
2009-07-02 20:00 ` Robin Rosenberg [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200907022200.40179.robin.rosenberg.lists@dewire.com \
    --to=robin.rosenberg.lists@dewire.com \
    --cc=constantine.plotnikov@gmail.com \
    --cc=git@vger.kernel.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.
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 NNTP newsgroup(s).