Skip to content

Accept commit SHA as ext_pillar git ref - #70547

Open
dwoz wants to merge 1 commit into
saltstack:3006.xfrom
dwoz:dwoz/fix/64199-ext-pillar-commit-sha
Open

dwoz wants to merge 1 commit into
saltstack:3006.xfrom
dwoz:dwoz/fix/64199-ext-pillar-commit-sha

Conversation

@dwoz

@dwoz dwoz commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Fixes #64199.

Fix lands in salt/utils/gitfs.py — adds a SHA fallback to GitPython.checkout and Pygit2.checkout so a hex ref (full or short) resolves to that commit, matching the behavior gitfs_remotes already provides.

The ``gitfs_remotes`` fileserver already accepts a 40-char hex SHA (or
short SHA) as its base ref, but ``ext_pillar: git`` rejected the same
input with "remote ref does not exist" because ``GitPython.checkout``
and ``Pygit2.checkout`` only tried ``origin/<ref>`` and ``tags/<ref>``.

Both providers now fall back to resolving a hex ref as a commit SHA
(matching the ``get_tree_from_sha`` branch already used by the gitfs
read path). The config shape is unchanged — existing branch/tag inputs
behave exactly as before.

Fixes saltstack#64199.
@dwoz
dwoz requested a review from a team as a code owner October 24, 2026 00:17
@dwoz dwoz added this to the Sulphur v3006.28 milestone Oct 24, 2026
@dwoz dwoz added the test:full Run the full test suite label Oct 24, 2026

This branch was previously deployed

1 inactive deployment
ci — 3bb43308 Deployed Oct 24, 2026 by dwoz via Build Onedir Packages / RPM (arm64) #27829
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants