-
Notifications
You must be signed in to change notification settings - Fork 323
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
[git] jj cannot export refs when remote-tracking branch is path-like prefix to a branch #493
Comments
Hmm, I'm not sure what to do about that other than to skip one of the refs in such cases. That would at least be better than failing. I think I've heard that the reftable format allows that case but even if that's true, it's a long time until we can start depending on that... |
A band-aid might be to add args to |
This just happened to me when trying to
|
I'm almost done with a fix for this. The only thing I'm wondering is how to report it to the user. I've made FYI, the message I added to
That indicates that a branch with the empty string as name and the |
Since we now write a (partial) view object of the exported branches to disk (since 7904474), we can safely skip exporting some branches. We already skip conflicted branches. This commit makes us also skip branches that we fail to write to the backing Git repo, instead of failing the whole operation (after possibly updating some Git refs). I made the `export_refs()` function return the branches that failed. We should probably make that a struct later and have a separate field for branches that we skipped due to conflicts. Closes #493.
Thanks Martin! I think showing this for every command is OK, as it would encourage me to actually resolve the issue. Another thing that would be useful (for error messages in general, TBH) would be suggestions on how to resolve these situations. |
Good point. I sent #812 to add a hint. |
Thanks! |
My repo has a remote-tracking branch, e.g.
origin/test
, and I have a local branchtest/something
. When trying to export refs to Git, jj complains withNote that because Git uses file paths to store refs, it doesn't allow both
test
andtest/something
to be branches at the same time.The text was updated successfully, but these errors were encountered: