Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8123391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:10:04+00:00 2026-06-06T06:10:04+00:00

(let ((default-directory /home/vision/)) (magit-pull) (magit-fetch upstream) (magit-merge upstream/master) (magit-push)) I’m getting: Running git fetch

  • 0
(let ((default-directory "/home/vision/"))
  (magit-pull)
  (magit-fetch "upstream")
  (magit-merge "upstream/master")
  (magit-push))

I’m getting:

Running git fetch upstream
Git is already running

How can I wait for fetch finish?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T06:10:09+00:00Added an answer on June 6, 2026 at 6:10 am

    Magit is intended as an interactive front-end for git, so things like magit-fetch are not really intended to be run from your code… But if you really insist, a quick look at the code shows you that magit-process is a variable that holds the process while it is running, and it’s cleared when it’s done. You can therefore use it with a loop that waits until that happens:

    (progn
      (magit-fetch "upstream")
      (while magit-process (sleep-for 0.25))
      (magit-fetch "upstream"))
    

    But that’s really pushing it — for example, what happens when the fetch fails?

    BTW, another thing that you can do is look at the source which is a one-line function in the magit-fetch case:

    (apply 'magit-run-git-async "fetch" remote magit-custom-options)
    

    and write code that uses the non-async version:

    (progn
      (apply 'magit-run-git "fetch" "upstream" magit-custom-options)
      (apply 'magit-run-git "fetch" "upstream" magit-custom-options))
    

    (And you can suggest a patch to add an optional flag argument, but that seems like an iffy feature for an interactive tool…)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is my try : #!/Usr/bin/emacs --script (let ((default-directory /home/vision)) (shell-command git pull;) but
Let's say I have the following line in .emacs file. (setq-default default-directory ~/Desktop/mag) How
I tried to follow this but the default modelbinder let my array null on
Let's say I have two files default.aspx and the associated default.aspx.cs . default.aspx.cs: protected
Let's say I have the following workflow with Mercurial: stable (clone on server) default
Is there any way to have a default MessageBox.Show() caption? Let says I would
In Firefox, we can customize the default values for HTTP headers, let's say for
Let's say I have two branches named default and newfeature . I have a
the directory structure I'm trying to achieve would be this: application/default/views/layouts/layout.phtml application/default/views/scripts/index/index.phtml application/admin/views/layouts/layout.phtml application/admin/views/scripts/index/index.phtml
Let's consider the following scenario: a function which can generate code colors from white

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.