-
Notifications
You must be signed in to change notification settings - Fork 322
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
Fix bug where a forgotten branch couldn't be fetched (v2) #1771
Conversation
da8c61f
to
468308d
Compare
b6416b1
to
26e5947
Compare
26e5947
to
9d78105
Compare
9d78105
to
106e3d6
Compare
This is a bit unwieldy; see a comment in the code for a detailed explanation. We'll have to decide whether we prefer this, or we prefer the approach of martinvonz#1771, or we have a better idea.
106e3d6
to
51940ba
Compare
This is a bit unwieldy; see a comment in the code for a detailed explanation. We'll have to decide whether we prefer this, or we prefer the approach of martinvonz#1771, or we have a better idea.
51940ba
to
33c8d72
Compare
Update: This approach is now replaced by the "export before fetch" approach discussed below. @martinvonz @yuja Are we OK with the "branch forget: force |
This is a bit unwieldy; see a comment in the code for a detailed explanation. We'll have to decide whether we prefer this, or we prefer the approach of martinvonz#1771, or we have a better idea.
33c8d72
to
29cca97
Compare
This is a bit unwieldy; see a comment in the code for a detailed explanation. We'll have to decide whether we prefer this, or we prefer the approach of martinvonz#1771, or we have a better idea.
29cca97
to
9b54e48
Compare
Another radical possibility would be to do automatic import/export in all repositories. This would remove a lot of test duplication and special cases in tests as well. The cost is:
|
I disagree at least for now. We have Maybe |
I think there's another option that @yuja may in fact have mentioned before: instead of doing |
It sounds less scary as |
Do you have an idea in mind? IMO, the export before fetch idea becomes quite similar to #1714. In a way, I could call the latter "addressing this edge case separately". I'm not sure I prefer #1714 to export-before-fetch; I currently think export-before-fetch is slightly cleaner (though slightly less optimized), but I'd be OK with either. I don't have a third idea at the moment. |
No. "export before fetch" would probably work, but I'm not pretty sure.
#1714 is bad in that it introduces inconsistent handling of I don't think "export before fetch" is a hard requirement (the behavior should be logically correct without it), but it will solve UX problem without breaking the internal design, I suppose. |
At the moment, I'm pretty comfortable with "export before fetch". It sounds like it's worth implementing it, especially since most of the work is already done. So, I'll do that, but let me know if you get a better idea or if you'd like me to wait. I also feel that the "export before fetch" approach is more likely to improve other strange fetch-undo-import-export interactions, but I haven't thought it though. I do think of the UX problem as pretty serious. I think a user in a non-colocated repo should never need to run |
Sounds good. I just don't wanna reject the whole PR just because the latter part could introduce another problem. (It's more like a UX problem of github ;) BTW, do you think |
This is a bit unwieldy; see a comment in the code for a detailed explanation. We'll have to decide whether we prefer this, or we prefer the approach of martinvonz#1771, or we have a better idea.
This is a bit unwieldy; see a comment in the code for a detailed explanation. We'll have to decide whether we prefer this, or we prefer the approach of martinvonz#1771, or we have a better idea.
This is a bit unwieldy; see a comment in the code for a detailed explanation. We'll have to decide whether we prefer this, or we prefer the approach of martinvonz#1771, or we have a better idea.
This is a bit unwieldy; see a comment in the code for a detailed explanation. We'll have to decide whether we prefer this, or we prefer the approach of martinvonz#1771, or we have a better idea.
900a81b
to
7ef607c
Compare
OK, here's export-before-fetch. PTAL, @yuja. |
This is a bit unwieldy; see a comment in the code for a detailed explanation. We'll have to decide whether we prefer this, or we prefer the approach of martinvonz#1771, or we have a better idea.
cc7cbf1
to
ccfa922
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
96227f4
to
794747a
Compare
This follows 3779b45, but in this case the refactor makes the logic more complicated. The main goal here is to prepare for the next commit.
I now believe that jj will need to store git-tracking refs for both local and remote-tracking branches of the git repo for the long term. See martinvonz#1666 (comment) More refactoring will likely happen when that bug is fixed.
47fb598
to
da89112
Compare
Thank you Yuya for the review and the many helpful suggestions! I'm planning to submit this 🎉 |
f2c2439
to
be52132
Compare
New approach to fix the bug described in the (now closed) PR #1714
Checklist
If applicable:
CHANGELOG.md