git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH/RFC 2/2] Make path-limiting be incremental when possible.

From
Linus Torvalds <torvalds@osdl.org>
Date
Mar 31, 2006, 19:39 UTC
Message-ID
<Pine.LNX.4.64.0603311135290.27203@g5.osdl.org>
In-Reply-To
<7v3bgzxgbg.fsf@assigned-by-dhcp.cox.net>
On Thu, 30 Mar 2006, Junio C Hamano wrote:
Show 6 quoted lines
> 
> There already was a report that --boundary stuff is not quite
> right, so what you are seeing might be that the new code exposes
> its original breakage even more.  I haven't looked into the
> breakage of the original version yet either, so I cannot really
> say how your change breaks it.
[ Awake and thinking about this again ]
No, I think the new breakage was just because I was being a stupid ass.

When I converted get_revision() to do the parent parsing up at the top instead of at the bottom, I just didn't think correctly about your new BOUNDARY code, and my conversion for that was just wrong. Part of the "do the parents early" code was also removing the current commit early, so suddenly your BOUNDARY case for doing that thing was just removing some other random commit instead, which was obviously wrong.

The fix is trivial - with the new get_revision() organization, the BOUNDARY case special-case actually goes away entirely, and this trivial patch (on top of my 2/2 patch) should just fix it.

At least it passes my tests again now, and looking at the code everything seems sane.

		Linus
---
diff --git a/revision.c b/revision.c
index 0e3f074..753633e 100644
--- a/revision.c
+++ b/revision.c
@@ -796,18 +796,6 @@ struct commit *get_revision(struct rev_i
 			if (revs->parents)
 				rewrite_parents(commit);
 		}
-		/* More to go? */
-		if (revs->max_count) {
-			if (commit->object.flags & BOUNDARY) {
-				/* this is already uninteresting,
-				 * so there is no point popping its
-				 * parents into the list.
-				 */
-				struct commit_list *it = revs->commits;
-				revs->commits = it->next;
-				free(it);
-			}
-		}
 		commit->object.flags |= SHOWN;
 		return commit;
 	} while (revs->commits);
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 17 in “Move "--parent" parsing into generic revision.c library code”
  1. 1/2 Move "--parent" parsing into generic revision.c library codeLinus Torvalds, Mar 31, 2006
  2. 2/2 Make path-limiting be incremental when possible.Linus Torvalds, Mar 31, 2006
  3. Linus TorvaldsMar 31, 2006
  4. Junio C HamanoMar 31, 2006
  5. Linus TorvaldsMar 31, 2006
  6. Junio C HamanoMar 31, 2006
  7. Linus TorvaldsMar 31, 2006
  8. Junio C HamanoMar 31, 2006
  9. Linus TorvaldsMar 31, 2006
  10. Junio C HamanoMar 31, 2006
  11. Linus TorvaldsApr 2, 2006
  12. Junio C HamanoApr 2, 2006
  13. revision: simplify argument parsing.Junio C Hamano, Apr 2, 2006
  14. revision: --max-age alone does not need limit_list() anymore.Junio C Hamano, Apr 2, 2006
  15. Junio C HamanoMar 31, 2006
  16. Linus TorvaldsMar 31, 2006
  17. Junio C HamanoApr 3, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.