15

I'm missing some visual indication of the push / pull progress. After executing the appropriate command, magit prints

Pushing to domain.tld:repo.git

however, no further indication of the progress is given. On a slow network connection or if the data to be transmitted is large, the process can take quite some time, hence, it would be nice if magit could give some indication of progress.

Naturally the *magit-process* buffer contains git's own progress indication but how do you tell magit to pass the relevant part through to the echo area?

Even better would be if the progress indicator is added to the mode line, thus allowing the user to close the magit-status buffer and continue working while git is doing the heavy lifting.

Edit: I'm not looking for indication that magit is pushing / pulling, I know that because I just hit P/F. I want to see at which stage of pushing / pulling it is (i.e. (un)packing, transmitting) and how much of that action it already did.

Remember, if you run git through the terminal it'll print something like

Pushing to domain.tld:repo.git
Counting objects: 29, done.
Writing objects: 100% (15/15), 249.80 KiB | 28.00 KiB/s, done.
Total 15 (delta 10), reused 0 (delta 0)
To domain.tld:repo.git
5436bd0..d9ec32a master -> master
updating local tracking ref 'refs/remotes/origin/master'

[obviously this is a snapshot of the dynamic output]. I would like that progress to be displayed from within emacs.

Edit2: Opened feature request on github

1

2 Answers 2

7

That feature has existed forever. But I have to admit that I never noticed that either, and only know about it because I stumbled into the implementation :-)

When an asynchronous process is running you will see e.g. Magit git update instead of just Magit in the mode-line.

4
  • I see that I did not express clear enough what I'm looking for. Please read the edit I've added to my post.
    – elemakil
    Commented Oct 1, 2014 at 15:51
  • I see. May I ask why you need to know at what stage the command is?
    – tarsius
    Commented Oct 1, 2014 at 17:40
  • 3
    Please open a feature request.
    – tarsius
    Commented Oct 1, 2014 at 18:24
  • 4
    Please note that I have decided not to implement the requested feature.
    – tarsius
    Commented Dec 30, 2015 at 23:13
1

While still not a progress indicator, the following enhancements in Magit 2.12 are relevant:

  • The mode line process indicator, displayed in the mode line when Git is run for side-effects, is now more visible than before, and is additionally used to highlight process errors.

    New face magit-mode-line-process is applied to the mode line process indicator to improve the visibility of pending asynchronous processes (in particular), as Magit remains responsive after initiating such commands (for instance fetching or rebasing), but will not update its buffers until the process has completed, which might take longer than anticipated. Customize this face if you wish to make this indicator more (or less) visible. #3284

    If the Git process returns an error, the mode line process indicator is no longer removed, and new face magit-mode-line-process-error is applied to highlight the error status. Details of the error from the process buffer are also provided as a tool-tip. The error indicator will remain visible in the mode line until a magit buffer is refreshed. If you do not want errors to be indicated in the mode line, customize the magit-process-display-mode-line-error user option. #3297

M-x customize-face RET magit-mode-line-process RET

If you give this face a high-contrast foreground colour, you are certain to notice whenever a git process is taking a long time to complete.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.