Skip to content
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

Provide indication of push / pull progress #1527

Closed
elemakil opened this issue Oct 1, 2014 · 3 comments
Closed

Provide indication of push / pull progress #1527

elemakil opened this issue Oct 1, 2014 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@elemakil
Copy link

elemakil commented Oct 1, 2014

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.

@tarsius tarsius added the enhancement New feature or request label Oct 1, 2014
@tarsius
Copy link
Member

tarsius commented Oct 4, 2014

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).

@tarsius tarsius added this to the 2.2.0 milestone Oct 4, 2014
@tarsius
Copy link
Member

tarsius commented Dec 25, 2014

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))))

@tarsius tarsius closed this as completed Dec 25, 2014
@tarsius tarsius modified the milestones: 2.1.0, later Mar 6, 2015
@chengcyber
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

3 participants