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

[StGIT PATCH 3/4] Don't traverse the whole DAG when looking for uninteresting commits

From
Karl Hasselström <kha@treskal.com>
Date
Aug 13, 2007, 21:01 UTC
Message-ID
<20070813210136.25929.95213.stgit@yoghurt>
In-Reply-To
<20070813205801.25929.34925.stgit@yoghurt>

It's sufficient to look at the part of the DAG that's reachable from the patches. This might be a large subset, of course, but it could still be a significant improvement in some cases, especially when there is only one patch.

Signed-off-by: Karl Hasselström <kha@treskal.com>
---
 stgit/stack.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/stgit/stack.py b/stgit/stack.py
index 8f1c0ee..dbb27eb 100644
--- a/stgit/stack.py
+++ b/stgit/stack.py
@@ -459,7 +459,8 @@ class UninterestingCache:
         # Iterate over all commits. We are guaranteed to see each
         # commit before any of its children.
         for line in git._output_lines(
-            'git-rev-list --topo-order --reverse --parents --all'):
+            'git-rev-list --topo-order --reverse --parents --stdin',
+            ['%s\n' % p for p in patches]):
             commits = line.split()
             commit, parents = commits[0], Set(commits[1:])
 
Previous: Karl HasselströmNext: Karl Hasselström
Message 4 of 5 in “Optimizations for the DAG appliedness stuff”
  1. 0/4 Optimizations for the DAG appliedness stuffKarl Hasselström, Aug 13, 2007
  2. 1/4 Speed up the discovery of uninteresting commitsKarl Hasselström, Aug 13, 2007
  3. 2/4 Speed up appliedness check during patch creationKarl Hasselström, Aug 13, 2007
  4. 3/4 Don't traverse the whole DAG when looking for uninteresting commitsKarl Hasselström, Aug 13, 2007
  5. 4/4 Find uninteresting commits faster for special casesKarl Hasselström, Aug 13, 2007

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.