-
Notifications
You must be signed in to change notification settings - Fork 162
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
branch on git subs can be implicitly HEAD when not specified #762
Comments
We need to be careful with this one. I think the read branch is implicitly HEAD if not specified. If read and write branch are the same, a loop can be created. I think. It's been a while since I looked at this. I'll dig into it some tomorrow. |
It also should be out of the ordinary to write to the head of the repo's default branch. If branches aren't Stage-specific and promotions at all Stages are writing to the same branch, things get crazy quickly. Suppose "test" writes to |
From godocs:
Tangentially related:
Here |
We can revisit this when time permits and if it is still relevant after work on #2219 is complete. fwiw, the built-in prevention of "loop formation" (i.e. stopping you from writing to a branch you also subscribe to) was removed some time ago since the advent of include/exclude filters on git subscriptions has since made it possible, with the right configuration, to write to a branch you also subscribe to without forming a loop. |
This issue has been automatically marked as stale because it had no activity for 90 days. It will be closed if no activity occurs in the next 30 days but can be reopened if it becomes relevant again. |
This issue hasn't been relevant for some time. Around the same time Warehouses gained all sorts of path filters, these guardrails were removed. And since that time, we've also moved on from the legacy promotion mechanisms to discrete promotion steps that are easier to understand and reason over. The current behavior matches what any user of a git client would expect. When you commit, you commit to whatever branch is currently checked out. When you push, you push to that same branch unless otherwise specified. Closing as no longer relevant. |
Tripped on this trying to onboard a new kargo project
writeBranch can be implicitly HEAD of the remote, if user doesn't supply it. This would cut down on our boilerplate and make examples more universally compatible.
The text was updated successfully, but these errors were encountered: