Re: [PATCH 3/3] Make clear_commit_marks() clean harder
- From
Junio C Hamano <junkio@cox.net>
- Date
- Jul 3, 2006, 19:47 UTC
- Message-ID
- <7vzmfqqxlh.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.63.0607031553570.29667@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 12 quoted lines
>> > Don't care if objects have been parsed or not and don't stop when we >> > reach a commit that is already clean -- its parents could be dirty. >> >> There is something quite wrong with this patch. > > I always had the feeling that it was wrong to traverse not-yet-parsed > parents: How could a revision walk possibly come to a certain commit > without at least one continuous history of now-parsed objects? > > Also, AFAIK the revision walk sets flags for each commit it touched, and > we should not try to be smart-asses about the flags, but just unset these > flags.
The main points were made by Linus already.
Traversing is not needed -- not clearing not-yet-parsed is obviously wrong.
> BTW some very quick tests showed that the clear_commit_marks() thing that > I sent to the list was much faster than traversing all objects (which was > in my original version).
I have a crude workaround pushed out last night but will be replacing it with something less drastic. I think the final version should be what you had, perhaps minus not looking at the parsed flag for unmarking purposes.