git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: M Douglas McIlroy <m.douglas.mcilroy@dartmouth.edu>
Cc: git@vger.kernel.org
Subject: Re: default editor
Date: Sun, 7 Feb 2021 17:35:45 +0000	[thread overview]
Message-ID: <YCAk8Zx8KvZhaJMx@camp.crustytoothpaste.net> (raw)
In-Reply-To: <CAKH6PiWS5DvqctFnvZ+uyOzBs75hcy9HzbW_3gUCu+RE+oOYyw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1564 bytes --]

On 2021-02-07 at 13:24:07, M Douglas McIlroy wrote:
> While downloading git, I was asked to name a default editor, which I
> did: ed. from cygwin. It worked in the enuing test, but was rejected
> because it returned an error. I suppose this is because
> cygwin return  conventions are those of Unix, not Windows. That raises
> the question: does it matter? Does any other part of git depend on the
> editor's return value?

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.

At the command line, what does "git var GIT_EDITOR" print?  Is it
"/usr/bin/ed" or the like?  Or is it something like "/c/..."?  Also,
what is the exact error message you receive from trying to run your
command (copy and paste)?

The reason I ask is that Git for Windows ships with a POSIX-like
environment called MSYS, and as such, Unix-style paths are interpreted
according to that.  So to specify a path for Cygwin, you'd need to
specify it as a Unix-style path under /c (or /d, or whatever drive) so
that it could be invoked as a normal Windows program and not something
relative to the MSYS environment.  However, the path is handed off to
the shell, so it needs to be in a form that uses slashes.

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.
-- 
brian m. carlson (he/him or they/them)
Houston, Texas, US

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

  reply	other threads:[~2021-02-07 17:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-07 13:24 default editor M Douglas McIlroy
2021-02-07 17:35 ` brian m. carlson [this message]
2021-02-07 18:12   ` Junio C Hamano
2021-02-07 18:37     ` Jeff King
2021-02-07 19:09       ` brian m. carlson
2021-02-07 21:57       ` Eric Sunshine
2021-02-08 10:03         ` Adam Dinwoodie
2021-02-11 15:15           ` M Douglas McIlroy
2021-02-12  6:03             ` Eric Sunshine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YCAk8Zx8KvZhaJMx@camp.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=git@vger.kernel.org \
    --cc=m.douglas.mcilroy@dartmouth.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).