Re: default editor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"brian m. carlson" <sandals@xxxxxxxxxxxxxxxxxxxx> writes:

> First of all, I don't use Windows and this sounds like a
> Windows-specific problem, so you may have more help at the Git for
> Windows issue tracker.  But I'll try to help anyway.

I don't do Windows, either ;-)

> I don't think the return value is the problem.  Both Unix and Windows
> return 0 on success and nonzero on error, and Git will interpret
> editor return codes that way.

When git spawns an editor, it is asking the editor to give the text
file that has been edited by the end user into a shape that the end
user is happy with.  A non-zero exit is a way for the end user to
tell the editor (and hence git) that, even though the user has ended
the editor session, the resulting contents is not satisfactory and
not to be used.

If the 'ed' in question behaves the same as traditional UNIX 'ed' (I
am guessing so, as even this is on Windows, Cygwin was mentioned),
you can start making changes and attempt to quit without saving by
typing 'q<RET>' twice (the first one will be greeted with '?'
meaning "are you sure you want to quit without saving", and the
second one lets you quit).  'ed' will signal the calling environment
that the editor session was aborted by exiting with a non-zero
status.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux