On Friday, April 22, 2016 at 6:16:35 PM UTC+3, Matthew Economou wrote:
> Dear all,
> 
> How do I debug this?  Magit invokes sudo to read the git repo, but
> somewhere its invocation of `git commit` fails, and I'm not seeing any
> meaningful error in the *Messages* buffer:
> 
> Tramp: Opening connection for root@hostname net using sudo...
> Tramp: Sending command `exec env SHELL=/bin/sh sudo -u root -s -H -p
> Password:'
> Tramp: Waiting for prompts from remote shell...
> Tramp: Sending Password
> Tramp: Waiting for prompts from remote shell...done
> Tramp: Found remote shell prompt on `hostname'
> Tramp: Opening connection for root@hostname using sudo...done
> Tramp: Inserting `/sudo:root@hostname:/path/.git/COMMIT_EDITMSG'...
> Copying /sudo:root@hostname:/path/.git/COMMIT_EDITMSG to
> /tmp/tramp.99342UqK...done
> Tramp: Inserting `/sudo:root@hostname:/path/.git/COMMIT_EDITMSG'...done
> Tramp: Checking `vc-registered' for
> /sudo:root@hostname:/path/.git/COMMIT_EDITMSG...
> Type C-c C-c to finish, or C-c C-k to cancel
> Tramp: Checking `vc-registered' for
> /sudo:root@hostname:/path/.git/COMMIT_EDITMSG...done
> Tramp: Inserting `/sudo:root@hostname:/path/.git/COMMIT_EDITMSG'...done
> Saving file /sudo:root@hostname:/path/.git/COMMIT_EDITMSG...
> Copying /tmp/tramp.99342h0Q to
> /sudo:root@hostname:/path/.git/COMMIT_EDITMSG...done
> Wrote /sudo:root@hostname:/path/.git/COMMIT_EDITMSG
> 
> At this point I've saved the commit message via C-c C-c, but when Emacs
> returns to the *magit* buffer, the staged commits are still uncommitted.
> 
> How should I proceed?
> 
> Best wishes,
> Matthew
> 
> -- 
> "The lyf so short, the craft so longe to lerne."

The issue was investigated. See: https://github.com/magit/magit/issues/2672

The solution is to configure with-editor to explicitly use Bash:

(setq with-editor-sleeping-editor "\
bash -c '\
echo \"WITH-EDITOR: $$ OPEN $0\"; \
sleep 604800 & sleep=$!; \
trap \"kill $sleep; exit 0\" USR1; \
trap \"kill $sleep; exit 1\" USR2; \
wait $sleep'")

Regards,
Andrew

-- 
You received this message because you are subscribed to the Google Groups 
"magit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to