You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Running jj git fetch will fetch all branches (and maybe tags?) of a remote repo, even if git fetch origin wouldn't (due to refspec definitions for the remote)
Describe the solution you'd like
It would be really nice if jj git fetch would honor the refspec definitions for the remote server (instead of fetching the entire repo) if they are present.
Alternatively I'd also settle for jj specific configuration to define equivalent behavior
Describe alternatives you've considered
As an alternative I've been getting by with running git fetch origin && jj git import which does the trick, but it would be nice to not have to remember to not run jj git fetch
Additional context
I work on a monorepo that gets a lot of traffic (tons of tags and branches that are being worked on). Generally speaking each developer working in this monorepo will push their branches behind a specific prefix so that we can judiciously filter out what is fetched by default by git. For example I have the following definition in .git/config:
That way by default, I'll only fetch and track the main branch as well as my own branches. (If I need to check out someone else's branch I do that with git fetch origin someone/their-branch && git checkout FETCH_HEAD but this functionality is out of scope for this feature request)
The text was updated successfully, but these errors were encountered:
We could support refspecs that fetc a subset of branches, but we probably don't want to support refspecs that rename branches. For example, +refs/heads/foo/*:refs/remotes/origin/bar/* would fetch a branch called foo/blah as local ref refs/remotes/origin/bar/blah, which jj would import them as bar/blah@origin. If you then push that to the remote, it would be pushed as bar/blah. Unless we also support renaming refspecs for push. I hope we won't need to support renaming in either direction.
Is your feature request related to a problem? Please describe.
Running
jj git fetch
will fetch all branches (and maybe tags?) of a remote repo, even ifgit fetch origin
wouldn't (due to refspec definitions for the remote)Describe the solution you'd like
It would be really nice if
jj git fetch
would honor the refspec definitions for the remote server (instead of fetching the entire repo) if they are present.Alternatively I'd also settle for
jj
specific configuration to define equivalent behaviorDescribe alternatives you've considered
As an alternative I've been getting by with running
git fetch origin && jj git import
which does the trick, but it would be nice to not have to remember to not runjj git fetch
Additional context
I work on a monorepo that gets a lot of traffic (tons of tags and branches that are being worked on). Generally speaking each developer working in this monorepo will push their branches behind a specific prefix so that we can judiciously filter out what is fetched by default by git. For example I have the following definition in
.git/config
:That way by default, I'll only fetch and track the
main
branch as well as my own branches.(If I need to check out someone else's branch I do that withgit fetch origin someone/their-branch && git checkout FETCH_HEAD
but this functionality is out of scope for this feature request)The text was updated successfully, but these errors were encountered: