Skip to content

Conversation

ipetkov
Copy link
Contributor

@ipetkov ipetkov commented Aug 7, 2025

Checklist

Fixes #4682

Stacked on top of #7175 so I'm going to keep this as a draft until that PR lands

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added/updated tests to cover my changes

@ipetkov ipetkov force-pushed the ivan/push-ryoqzwwntvnl branch from 17f8bfc to daa4b40 Compare August 8, 2025 01:00
@ipetkov ipetkov changed the title cli/git: change default remote/clone configuration to always fetch tags cli/git: fix fetching all tags during jj git clone Aug 8, 2025
@ipetkov ipetkov changed the title cli/git: fix fetching all tags during jj git clone cli: fix fetching all tags during jj git clone Aug 8, 2025
@ipetkov ipetkov force-pushed the ivan/push-ryoqzwwntvnl branch from daa4b40 to 0c58d74 Compare August 8, 2025 16:03
@ipetkov ipetkov marked this pull request as ready for review August 8, 2025 16:05
@ipetkov ipetkov requested a review from a team as a code owner August 8, 2025 16:05
@ipetkov ipetkov force-pushed the ivan/push-ryoqzwwntvnl branch 2 times, most recently from caa8008 to 43d7c13 Compare August 16, 2025 00:01
Copy link
Contributor

@yuja yuja left a comment

Choose a reason for hiding this comment

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

Thanks.

By default `git clone` will fetch all tags on a remote (unless
`--no-tags` is specified). Eventually we'll want to support the same
behavior, though since we first configure a remote and then fetch, we'll
need to configure the remote with the correct *general* tag fetching
behavior, but still perform the first fetch with all tags included.
@ipetkov ipetkov force-pushed the ivan/push-ryoqzwwntvnl branch from 43d7c13 to ee666f2 Compare August 16, 2025 18:25
@ipetkov ipetkov requested a review from yuja August 16, 2025 18:26
@ipetkov ipetkov force-pushed the ivan/push-ryoqzwwntvnl branch from ee666f2 to 88cd649 Compare August 17, 2025 15:45
By default, `git clone` will fetch all tags (same as `git clone
--tags`), but since we perform a clone by creating a remote first then
fetching it, we have to be a little smarter and keep track of when we're
doing a clone so that we ensure all tags are fetched.

`git clone --no-tags` will skip fetching tags at all, and so this is
also the now the behavior of `jj git clone --fetch-tags none`

Closes #4682
@ipetkov ipetkov force-pushed the ivan/push-ryoqzwwntvnl branch from 88cd649 to 11ac92c Compare August 17, 2025 15:46
@ipetkov ipetkov added this pull request to the merge queue Aug 17, 2025
Merged via the queue into main with commit 3cb62c1 Aug 17, 2025
28 checks passed
@ipetkov ipetkov deleted the ivan/push-ryoqzwwntvnl branch August 17, 2025 16:00
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.

jj git clone not cloning all tags
2 participants