Conversation
When CI triggers on a tag push (e.g., v2.1.0), DAAF_BRANCH resolves to the tag name. update_daaf.sh validates this via git rev-parse --verify origin/<value>, which fails for tags because they live at refs/tags/, not refs/remotes/origin/. This produces a confusing "branch not found" error instead of explaining that tags can't be used for updates. - Add tag detection (refs/tags/ probe) to update_daaf.sh and update_daaf.ps1 after the branch check fails, with a clear error message explaining tags are immutable snapshots - Override DAAF_BRANCH="" on all update_daaf.sh CI steps so tag-triggered runs auto-detect main/master - Add BATS and Pester tests for tag detection and regression tests for values that are neither branches nor tags - Fix existing "nonexistent branch" bash test mock to explicitly fail the new tag probe (prevent catch-all from triggering wrong error path) - Clarify in user docs that DAAF_BRANCH accepts tags for install but only branches for update Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
git clone --depth 1 -b <ref> implies --single-branch, which locks the fetch refspec to only the cloned ref. After overriding DAAF_BRANCH="" for tag-triggered CI runs, the auto-detect path tries origin/main — but main was never fetched because the refspec was still narrow. Add a refspec check before git fetch in both update_daaf.sh and update_daaf.ps1 that widens to the standard wildcard (+refs/heads/*:refs/remotes/origin/*) if it detects a narrow single-branch refspec. This ensures all remote branches are visible for both auto-detect and user-specified DAAF_BRANCH values. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Without --replace-all, git config appends a second value rather than replacing the narrow single-branch refspec. The wildcard still works (git processes all refspecs), but --replace-all produces a cleaner single-value result and avoids leaving a redundant narrow entry. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.