使用atom作为git编辑器无法等待提交消息,为什么?

时间:2018-02-20 13:24:45

标签: git atom-editor

我已经通过以下方式配置了我的git编辑器:

git config --global core.editor "atom --wait"

git config --global core.editor "atom -w"

基于StackOverflow中的一些帖子。

我的.gitconfig文件就像是:

editor = atom -w

或:

editor = atom --wait

但是,当我尝试使用git commit时,由于空提交消息,git中止了提交。之后,Atom在此之后推出。如果我输入提交消息,请保存并退出。 bash中的消息是:

 Attempting to call a function in a renderer window that has been closed or released. Function provided here: Object. Remote event names: destroyed, crashed

有人能帮帮我吗?非常感谢提前。

1 个答案:

答案 0 :(得分:0)

我没有安装原子,但我为VS Code做了类似的事情。您是否尝试将命令放在引号内?

private void btn_Start_Click(object sender, EventArgs e) { if (sourceList.SelectedItems.Count == 0) return; int deviceNumber = sourceList.SelectedItems[0].Index; wo = new WaveOutEvent(); wi = new WaveIn(); wi.DeviceNumber = deviceNumber; wi.WaveFormat = new WaveFormat(44100, WaveIn.GetCapabilities(deviceNumber).Channels); wi.DataAvailable += new EventHandler<WaveInEventArgs>(wi_DataAvailable); bwp = new BufferedWaveProvider(wi.WaveFormat); bwp.BufferDuration = new TimeSpan(1, 0, 0); bwp.DiscardOnBufferOverflow = false; wi.StartRecording(); } private void wi_DataAvailable(object sender, WaveInEventArgs e) { bwp.AddSamples(e.Buffer, 0, e.BytesRecorded); } private void btn_Stop_Click(object sender, EventArgs e) { wi.StopRecording(); wo.Init(bwp); } private void btn_InitWaveOut_Click(object sender, EventArgs e) { wo.Play(); } private void btn_StopWaveOut_Click(object sender, EventArgs e) { wo.Stop(); } private void btn_PauseWaveOut_Click(object sender, EventArgs e) { wo.Pause(); }

我一直在使用Bash editor = 'atom -w' shell变量,因为我的默认编辑器根据我当时使用的操作系统而改变,无论我是否使用SSH ;所以在项目的Git配置中设置它对我来说不是一个解决方案。但它可能适合你。

所以请尝试并告诉我们会发生什么。

相关问题