-
Notifications
You must be signed in to change notification settings - Fork 389
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: show fetch progress with git.subprocess = true
#5519
Conversation
a597be4
to
229553d
Compare
…out tty With this and "git --progress" PR jj-vcs#5519, remote git progress will be displayed. The sideband callback is disabled in git2 code path if progress is not enabled. If this were enabled, most "git fetch" tests would fail with git2 due to remote progress messages. Since there's no git2 API to turn the remote progress off, and the git2 code path is supposed to be phased out, I just inserted ad-hoc workaround.
…out tty With this and "git --progress" PR #5519, remote git progress will be displayed. The sideband callback is disabled in git2 code path if progress is not enabled. If this were enabled, most "git fetch" tests would fail with git2 due to remote progress messages. Since there's no git2 API to turn the remote progress off, and the git2 code path is supposed to be phased out, I just inserted ad-hoc workaround.
@yuja there is some weird interplay here with #5521 Basically, in the case that the remote sends a message while the progress bar is updating, the progress bar will be split and not disappear, as it should. In particular, there is one message, like this:
I'm going to work on a fix in front of this. It will be hacky, but we can iterate over it |
How it looked before:
How it looks now (bar disappears when it's complete, as it should):
|
229553d
to
3f758a9
Compare
Doesn't it an issue of the frontend? I think the UI will have to hide progress bar when sideband message is received, or something like that. |
I mean, it would require a more involved frontend here. The progress bar is hidden in the end by issuing a |
Yeah, the frontend will have to do something based on both prgoress and sideband messages, but I think that's the correct way to fix the problem. It's weird that two separate machinery is writing to the same output stream. EDIT: fwiw, I think these callbacks can be merged into one once we drop support for git2.
Yes. If the current state is annoying, I would revert my patch. |
What do you think of the solution here of holding the sideband messages while progress is going on? It seems to be the best compromise (send sideband immediately when available, hold them for later when not). Agree that it's not the cleanest, but sounds like it wouldn't be to bad. |
I suspect that the git2 impl would be already broken (if progress and sideband messages are processed in the same way as |
It is |
It is. I'll take a look later. |
Now that I remember, the sideband callback for git fetch operations were always set to none. |
This helps sideband writer overwrite the progress bar. Suppose progress information is less important than sideband messages, it should be okay to always overwrite the progress bar. The sideband writer will erase the trailing characters and move the cursor back to the first column, and/or put "\n" accordingly.
I think this is copy-paste error from C implementation.
|
Tested both this PR and |
3f758a9
to
e2ddeb1
Compare
e2ddeb1
to
54955c3
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.
54955c3
to
3fbef62
Compare
Checklist
If applicable:
CHANGELOG.md