git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sven Verdoolaege <skimo@kotnet.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Git Mailing List <git@vger.kernel.org>,
	Junio C Hamano <junkio@cox.net>,
	"Shawn O. Pearce" <spearce@spearce.org>,
	David Kastrup <dak@gnu.org>, Jeff King <peff@peff.net>
Subject: Re: [PATCH, take 1] Linear-time/space rename logic (exact renames only)
Date: Mon, 22 Oct 2007 09:07:50 +0200	[thread overview]
Message-ID: <20071022070750.GM1179MdfPADPa@greensroom.kotnet.org> (raw)
In-Reply-To: <alpine.LFD.0.999.0710211603200.10525@woody.linux-foundation.org>

On Sun, Oct 21, 2007 at 04:59:03PM -0700, Linus Torvalds wrote:
> +static int find_same_files(void *ptr)
> +{
> +	struct file_similarity *p = ptr;
> +	struct file_similarity *src = NULL, *dst = NULL;
> +
> +	/* Split the hash list up into sources and destinations */
> +	do {
> +		struct file_similarity *entry = p;
> +		p = p->next;
> +		if (entry->src_dst < 0) {
> +			entry->next = src;
> +			src = entry;
> +		} else {
> +			entry->next = dst;
> +			dst = entry;
> +		}
> +	} while (p);

Aren't you truncating the ptr list after the first entry here?
(While you still need the whole list in free_file_table.)

skimo

  parent reply	other threads:[~2007-10-22  7:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-21 23:59 [PATCH, take 1] Linear-time/space rename logic (exact renames only) Linus Torvalds
2007-10-22  0:31 ` David Symonds
2007-10-22  5:41   ` Linus Torvalds
2007-10-22  6:47 ` Jeff King
2007-10-22  7:07 ` Sven Verdoolaege [this message]
2007-10-22  7:21   ` Jeff King
2007-10-22 16:33   ` Linus Torvalds
2007-10-22 17:29     ` [PATCH, take 2] " Linus Torvalds
2007-10-22 19:31       ` Linus Torvalds
2007-10-22 19:44         ` Linus Torvalds
2007-10-22 21:17           ` Alex Riesen
2007-10-22 21:37             ` Linus Torvalds
2007-10-22 22:54               ` Alex Riesen

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=20071022070750.GM1179MdfPADPa@greensroom.kotnet.org \
    --to=skimo@kotnet.org \
    --cc=dak@gnu.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=peff@peff.net \
    --cc=skimo@liacs.nl \
    --cc=spearce@spearce.org \
    --cc=torvalds@linux-foundation.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).