diff options
| author | Gavin Mak <gavinmak@google.com> | 2026-02-06 14:55:34 -0800 |
|---|---|---|
| committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2026-03-17 14:28:39 -0700 |
| commit | 67881c0c3b27d850c57070919f4476b370de7768 (patch) | |
| tree | 677767437a0246e0ae6a7d6e3ca84adfc4cf72c6 /git_command.py | |
| parent | 551087cd980976775470cde5f7ede264a90b5349 (diff) | |
| download | git-repo-67881c0c3b27d850c57070919f4476b370de7768.tar.gz | |
git_refs: read refs via git plumbing for files/reftable
Replace direct `packed-refs` file parsing with `git for-each-ref`
plumbing to support both `files` and `reftable` backends.
Bug: 476209856
Change-Id: I2ad8ff8f3382426600f15370c997f9bc17165485
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/550401
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Mike Frysinger <vapier@google.com>
Tested-by: Gavin Mak <gavinmak@google.com>
Diffstat (limited to 'git_command.py')
| -rw-r--r-- | git_command.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/git_command.py b/git_command.py index 04844079f..89e8d2f44 100644 --- a/git_command.py +++ b/git_command.py | |||
| @@ -22,7 +22,6 @@ from typing import Any, Optional | |||
| 22 | 22 | ||
| 23 | from error import GitError | 23 | from error import GitError |
| 24 | from error import RepoExitError | 24 | from error import RepoExitError |
| 25 | from git_refs import HEAD | ||
| 26 | from git_trace2_event_log_base import BaseEventLog | 25 | from git_trace2_event_log_base import BaseEventLog |
| 27 | import platform_utils | 26 | import platform_utils |
| 28 | from repo_logging import RepoLogger | 27 | from repo_logging import RepoLogger |
| @@ -83,7 +82,7 @@ def RepoSourceVersion(): | |||
| 83 | proj = os.path.dirname(os.path.abspath(__file__)) | 82 | proj = os.path.dirname(os.path.abspath(__file__)) |
| 84 | env[GIT_DIR] = os.path.join(proj, ".git") | 83 | env[GIT_DIR] = os.path.join(proj, ".git") |
| 85 | result = subprocess.run( | 84 | result = subprocess.run( |
| 86 | [GIT, "describe", HEAD], | 85 | [GIT, "describe", "HEAD"], |
| 87 | stdout=subprocess.PIPE, | 86 | stdout=subprocess.PIPE, |
| 88 | stderr=subprocess.DEVNULL, | 87 | stderr=subprocess.DEVNULL, |
| 89 | encoding="utf-8", | 88 | encoding="utf-8", |
