-
Notifications
You must be signed in to change notification settings - Fork 77
git-pair-commit not working with JRuby #25
Comments
I've seen this happen before, and it was because git was not configured export GIT_EDITOR=vim ? By the way, I don't know if you know or not-- but I quit Pivotal. It Patrick J. Collins On Thu, 24 Jul 2014, Jonathan Barnes wrote:
|
no vim is setup as the git editor. I think it has something to do with JRuby's ability to make system calls. Maybe the environment is not available to it in the same way as MRI rubies |
I think this article strongly hints that system calls expecting a terminal environment won't work in JRuby: |
git-pair-commit requires ruby to make a system call to git-commit, but that causes problems when using JRuby as it is running in a JVM and does not have access to the environment when making system calls. See issue: vmware-archive/git_scripts#25 for more details
This is when installed via the 'system wide installation' and JRuby is installed via rbenv
The error occurs when the system call is run to do the git commit with the environment variables set. It has to do with the vim instance not having input/output be the terminal.
I modified the installed git_pair.rb to print out the command that it attempts to
system
and all looks good there and when I run that command myself there is no problem.here is some output from running
git pair-commit
with some additional info printed such as what command is being invoked by thesystem
command, what version of ruby the current environment is using and what the RUBY_VERSION constant is set to in the running script.the net effect of vim not having the input/output set correctly is that some vim like window is presented with the commit message, but the user is unable to get out of visual mode, and thus save and exit the session. You have to ctrl+c to quit vim and the shell itself is also busted and needs to be killed.
The text was updated successfully, but these errors were encountered: