Skip to content

Conversation

@fpytloun
Copy link

  • Disabled unconditional addition of "remote.origin.tagOpt" config; only add if not fetching exact ref
  • Introduced exactRef flag to detect when fetching a specific origin ref
  • When fetching exact ref, checkout uses "FETCH_HEAD" instead of the ref name to avoid detached head advice
  • Cleaned up commented-out code and improved fetch argument logic accordingly

Fixes: #102

Copy link
Member

@joaopapereira joaopapereira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a little bit concerned with this change since we tried removing that same line before and failed for some cases like: #263
Can you please confirm that a we will not have a regression here?

@github-project-automation github-project-automation bot moved this to In Progress in Carvel Oct 13, 2025
@fpytloun
Copy link
Author

I am a little bit concerned with this change since we tried removing that same line before and failed for some cases like: #263 Can you please confirm that a we will not have a regression here?

I read that issue and assuming failure was this: #263 (comment)

The trick is to simply checkout FETCH_HEAD instead of unresolved tag 🙂

…ct refs

- Disabled unconditional addition of "remote.origin.tagOpt" config; only add if not fetching exact ref
- Introduced exactRef flag to detect when fetching a specific origin ref
- When fetching exact ref, checkout uses "FETCH_HEAD" instead of the ref name to avoid detached head advice
- Cleaned up commented-out code and improved fetch argument logic accordingly

Signed-off-by: Filip Pytloun <[email protected]>
Copy link
Member

@joaopapereira joaopapereira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In terms of the solution looks good. Can you please check why the tests are failing and if there's is something that can be done about the linting errors?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

For faster sync, add option to only download a single branch

2 participants