Skip to content

ci: fix git unshallow opts on main#8580

Merged
jedevc merged 1 commit into
dagger:mainfrom
jedevc:version-checkout-should-work-on-main
Sep 26, 2024
Merged

ci: fix git unshallow opts on main#8580
jedevc merged 1 commit into
dagger:mainfrom
jedevc:version-checkout-should-work-on-main

Conversation

@jedevc
Copy link
Copy Markdown
Contributor

@jedevc jedevc commented Sep 26, 2024

https://github.com/dagger/dagger/actions/runs/11058080873/job/30723306886

We need --update-head-ok here:

-u
--update-head-ok

By default git fetch refuses to update the head which corresponds to the current branch. This flag disables the check. This is purely for the internal use for git pull to communicate with git fetch, and unless you are implementing your own Porcelain you are not supposed to use it.


Wrong! There's a reason it tells you not to use this flag, we can instead avoid this by just entering a detached head state intentionally, then we can rewrite all the refs we like, no worries.

@jedevc jedevc requested a review from shykes September 26, 2024 18:31
@jedevc jedevc force-pushed the version-checkout-should-work-on-main branch from 44be6e9 to 8cbc05c Compare September 26, 2024 18:41
Signed-off-by: Justin Chadwell <me@jedevc.com>
@jedevc jedevc merged commit 970cfc9 into dagger:main Sep 26, 2024
@jedevc jedevc deleted the version-checkout-should-work-on-main branch September 26, 2024 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants