Magit: Provide indication of push / pull progress

Created on 2 Oct 2014  路  3Comments  路  Source: magit/magit

This is a feature request.

I think it would be useful if magit would provide some progress indication while pushing / pulling. I have already posted this as question on the new emacs StackExchange, however, it appears that this is rather a feature request than a question of customisation. Below follows a copy of my emacs.SE question:

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.

feature request

Most helpful comment

For anyone found this issue:
See https://github.com/magit/magit/wiki/Tips-and-Tricks#automatically-displaying-the-process-buffer

All 3 comments

Thanks for opening this here. I don't think I will get to it very soon and have for now added the 2.2.0 milestone. But it's not all that unlikely that this will make it into the next release (2.1.0).

I have decided against implementing this. It doesn't really seem all that useful to me. I am still considering improving when and for how long the process buffer popups up, but logging progress to the echo area seems like overkill.

This should get you started though. Only tested on next. Note that output isn't necessarily received a line at a time.

(defadvice magit-start-process (after spam-echo-area activate)
  (set-process-filter
   magit-this-process
   `(lambda (process string)
      (,(process-filter magit-this-process) process string)
      ;; TODO Make the following smarter
      (message "%s" string))))

For anyone found this issue:
See https://github.com/magit/magit/wiki/Tips-and-Tricks#automatically-displaying-the-process-buffer

Was this page helpful?
0 / 5 - 0 ratings