diff hgext/git/gitlog.py @ 52652:4dadaf300fe0

git: index changed files on-demand Instead of indexing the changed files for every commit immediately, we can index... 1. heads' changed files immediately 2. other commits' changed files on-demand This helps a lot on repositories with large histories since the initial mercurial invocation doesn't have to wait for the complete repo history to be indexed.
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Fri, 04 Oct 2024 10:51:44 -0400
parents cdbfe5e7592e
children 3865451a5fab
line wrap: on
line diff
--- a/hgext/git/gitlog.py	Fri Oct 04 10:51:26 2024 -0400
+++ b/hgext/git/gitlog.py	Fri Oct 04 10:51:44 2024 -0400
@@ -340,6 +340,7 @@
         n = self.synthetic(n)
         hn = gitutil.togitnode(n)
         # We've got a real commit!
+        index._index_repo_commit(self.gitrepo, self._db, hn, commit=True)
         files = [
             r[0]
             for r in self._db.execute(