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:
signature.asc
Description: PGP signature