-
Notifications
You must be signed in to change notification settings - Fork 0
Bump version, and ensure new versions always released #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
f7f98ff
Bump version, and ensure new versions always released
mventnor-kintsugi ad35d1e
Merge remote-tracking branch 'origin/main' into fix/bump-ver-0.3.1
mventnor-kintsugi 5ba78fb
In CI environments, you must do a shallow fetch even with an origin/ …
mventnor-kintsugi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| __version__ = "0.3.0" | ||
| __version__ = "0.3.1" |
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: kintsugi-tax/squawk-pre-commit
Length of output: 2934
🏁 Script executed:
Repository: kintsugi-tax/squawk-pre-commit
Length of output: 3078
🏁 Script executed:
Repository: kintsugi-tax/squawk-pre-commit
Length of output: 3117
🏁 Script executed:
Repository: kintsugi-tax/squawk-pre-commit
Length of output: 1753
🌐 Web query:
git fetch shallow clone remote tracking branch refs/remotes behavior💡 Result:
In a shallow clone (
git clone --depth N ...), Git typically behaves differently for remote-tracking branches (refs/remotes/<remote>/...) because--depthimplies--single-branchunless you add--no-single-branch. As a result, the clone is configured to fetch/update only one remote-tracking branch by default. [1]What actually happens to
refs/remotes/...Normal (non–single-branch) clone
Your remote fetch refspec is usually:
+refs/heads/*:refs/remotes/origin/*So
git fetch originupdates allrefs/remotes/origin/*remote-tracking branches. [2]Shallow clone (default: single-branch)
Git writes a narrow refspec (only the cloned branch), e.g.:
+refs/heads/main:refs/remotes/origin/mainSo
git fetch originwill keep updating onlyrefs/remotes/origin/main, and you may not even have otherrefs/remotes/origin/<branch>names locally to update. [1]That’s why people often observe “
git fetchdoesn’t bring in otherremotes/origin/*branches” in shallow clones: it’s mostly the configured refspec / single-branch mode, not a special rule aboutrefs/remotesthemselves. [1]How to fetch other branches (while staying shallow)
Option A (best upfront): clone shallow but not single-branch
This keeps history shallow but allows remote-tracking branches for multiple branches to be created/updated. [1]
Option B: fetch a specific extra branch by explicit refspec
This directly tells Git which
refs/remotes/...name to update. [3]Option C: change what the remote tracks (persistent)
Adjust the remote’s branch list / fetch refspec so future
git fetchupdates additionalrefs/remotes/origin/*. (Common approaches:git remote set-branches ...or editingremote.origin.fetch.) [4]Shallow boundary caveat (
.git/shallow)When fetching in/into shallow history, some updates may require changing the shallow boundary; Git can refuse such updates unless you allow it (e.g.
git fetch --update-shallow ...). [2]Sources:
git-clonedocs on--depthimplying--single-branchand how that limits future fetch updates [1];git-fetchdocs on refspecs, remote-tracking branches, and--update-shallow[2]; common refspec workaround examples [3]; discussion of changing tracked branches / refspec in shallow clones [4].Use explicit refspec to ensure remote-tracking branch is created in shallow clones.
In shallow clones (common in CI),
git fetch origin <branch>without an explicit refspec won't createrefs/remotes/origin/<branch>because the narrow refspec only tracks the single cloned branch. The function returnsTrueif fetch succeeds, but the ref may not exist locally afterward.Use an explicit refspec to ensure the remote-tracking branch is created:
🔧 Proposed fix with explicit refspec
if branch.startswith("origin/"): remote_branch = branch.removeprefix("origin/") fetch = subprocess.run( - ["git", "fetch", "origin", remote_branch, "--depth=1"], + ["git", "fetch", "origin", f"{remote_branch}:refs/remotes/origin/{remote_branch}", "--depth=1"], capture_output=True, )🧰 Tools
🪛 Ruff (0.15.2)
[error] 160-160:
subprocesscall: check for execution of untrusted input(S603)
[error] 161-161: Starting a process with a partial executable path
(S607)
🤖 Prompt for AI Agents