Re: [PATCH] revision walker: Fix --boundary when limited

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Mon, 5 Mar 2007, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes:
> 
> >> +	if (revs->reverse) {
> >> +		l = NULL;
> >> +		while ((c = get_revision_1(revs)))
> >> +			commit_list_insert(c, &l);
> >> +		revs->commits = l;
> >> +		revs->reverse = 0;
> >>  	}
> >
> > Clever!
> 
> It is not clever, but just is stupid and WRONG.  It just shows
> how little I care about --reverse ;-).
> 
> revision_1() is to get the full list without non limit limiters,
> so the above loop would not even deplete the max_count but
> literally grabs everything.

Oops. I missed the _1(), _and_ the missing "revs->reverse = 0"...

> >> +	for (l = c->parents; l; l = l->next) {
> >
> > AFAICT this changes behaviour: c->parents were possibly rewritten.
> 
> Well, the behaviour of max with boundary in 'master' did the same thing, 
> as what was in revs->commits are rewritten parents of commits we already 
> returned, didn't it?

I missed that, too. Maybe I should get more familiar with the revision 
walker first, before continuing to ask for ridicule.

Ciao,
Dscho

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]