Skip to content

Conversation

@dmichon-msft
Copy link
Contributor

@dmichon-msft dmichon-msft commented Dec 11, 2025

Summary

The git ls-tree command has to read a collection of tree objects which can result in opening (and possibly fetching) a large number of packfiles. By comparison, git ls-files only has to read one file, the index (or multiple, if split index).

Since the output of these commands is slightly different, parsing was updated to detect Git submodules based on the objectmode field instead of the objecttype field (which is available in Git 2.51.0, which is currently bleeding edge).

Fixes #5499

Details

The unique mode value for Git submodules is 160000 and for symbolic links is 120000.

Updated getDetailedRepoStateAsync to parse out symbolic links to a separate map.

How it was tested

This PR's build should have the rerun using the new version of Rush have the same cache keys.

Impacted documentation

API documentation for package-deps-hash.

@dmichon-msft dmichon-msft force-pushed the user/dmichon/git-ls-files branch from ee50c07 to 609ef01 Compare December 11, 2025 23:18
@dmichon-msft dmichon-msft enabled auto-merge (squash) December 11, 2025 23:48
@dmichon-msft dmichon-msft merged commit 8e3826e into microsoft:main Dec 12, 2025
5 checks passed
@github-project-automation github-project-automation bot moved this from Needs triage to Closed in Bug Triage Dec 12, 2025
@dmichon-msft dmichon-msft deleted the user/dmichon/git-ls-files branch December 12, 2025 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

[@rustack/package-deps-hash] ls-tree HEAD -r causes codespaces to hang

4 participants