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

DAG revert hangs because git opens hidden editor (nano) for commit message #1020

Closed
nyanpasu64 opened this issue Dec 5, 2019 · 2 comments
Closed

Comments

@nyanpasu64
Copy link

When I open git-cola DAG and try to revert a commit (not the most recent one), git-cola DAG (and git-cola if I opened dag through it) freeze. This is because git commit runs an invisible nano without a terminal window, which blocks waiting for me to enter a commit message.

Interestingly, nano doesn't terminate immediately. I manually ran cat /dev/null | nano, and nano terminates saying Too many errors from stdin.

In my git config --global -l, core.editor=nano.

pstree -al [pid of python] output:

python -m pdb /home/nyanpasu64/.local/bin/git-dag
  |-git -c diff.suppressBlankEmpty=false -c log.showSignature=false revert db1979ab02fb75431fbc5a6ecb8104a6aa60c54d
  |   `-git commit -n -e
  |       `-nano /home/nyanpasu64/Dropbox/encrypted/code/exotracker/.git/COMMIT_EDITMSG

Ignore that I was running pdb. I initially encountered this bug with both git dag spawned from cola, and git dag run directly from shell.

Git Cola master f363095 v3.6.

@davvid
Copy link
Member

davvid commented Dec 12, 2019

cola follows what you configure, e.g. git config gui.editor 'gvim -o -f' or use the settings page.

This editor affects only the graphical sessions; git commit on the command line will continue to use your other editor. You need to configure a command that blocks in the foreground, and doesn't fork and return control to the terminal when it runs. What's happening is it's launching using your terminal editor but there's no terminal present.

@davvid
Copy link
Member

davvid commented Dec 12, 2019

Hmm, let me make sure we're calling git revert --no-edit. Thanks for the heads-up.

@davvid davvid closed this as completed in 3a8cec0 Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants