Commit dc4fb156 authored by Noam Postavsky's avatar Noam Postavsky

magit-clone: restore dropped code

The code for setting remote.pushDefault and unsetting origin/HEAD was
accidentally dropped in [1].

[1]: "magit-clone: run asynchronously"
cf479b9c.
parent b26c87e3
......@@ -74,6 +74,13 @@ Then show the status buffer for the new repository."
(magit-process-sentinel process event)))
(when (and (eq (process-status process) 'exit)
(= (process-exit-status process) 0))
(let ((default-directory directory))
(when (or (eq magit-clone-set-remote.pushDefault t)
(and magit-clone-set-remote.pushDefault
(y-or-n-p "Set `remote.pushDefault' to \"origin\"? ")))
(magit-call-git "config" "remote.pushDefault" "origin"))
(unless magit-clone-set-remote-head
(magit-remote-unset-head "origin")))
(with-current-buffer (process-get process 'command-buf)
(magit-status-internal directory))))))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment