Re: [PATCH] send-email: lazily assign editor variable

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Junio C Hamano
Date: Wednesday, March 24, 2010 - 10:52 am

Michael J Gruber <git@drmicha.warpmail.net> writes:


We would want to describe what kind of problems they are better than "may
lead to problems", though.  Something like this?

    b4479f0 (add -i, send-email, svn, p4, etc: use "git var GIT_EDITOR",
    2009-10-30) introduced the use of "git var GIT_EDITOR" to obtain the
    preferred editor program, instead of reading environment variables
    themselves.

    However, "git var GIT_EDITOR" run without a tty (think "cron job") would
    give a fatal error "Terminal is dumb, but EDITOR unset".  This is not a
    problem for add-i, svn, p4 and callers of git_editor() defined in
    git-sh-setup, as all of these call it just before launching the editor.
    At that point, we know the caller wants to edit, and they cannot without a
    tty.

    But send-email ran this near the beginning of the program, even if it is
    not going to use any editor (e.g. run without --compose).  Fix this by
    calling the command only when we edit a file.


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[REGRESSION] git var GIT_EDITOR fails without tty, Uwe =?iso-8859-1?Q?K ..., (Mon Mar 22, 7:59 am)
[PATCH] send-email: lazily assign editor variable, Michael J Gruber, (Mon Mar 22, 9:12 am)
Re: [PATCH] send-email: lazily assign editor variable, Uwe =?iso-8859-1?Q?K ..., (Mon Mar 22, 9:41 am)
[PATCH] send-email: do not check for editor until needed, Jonathan Nieder, (Mon Mar 22, 4:25 pm)
Re: [PATCH] send-email: lazily assign editor variable, Jonathan Nieder, (Mon Mar 22, 5:58 pm)
RE: [PATCH] send-email: do not check for editor until needed, Peter Kjellerstedt, (Tue Mar 23, 2:15 am)
Re: [PATCH] send-email: lazily assign editor variable, Michael J Gruber, (Tue Mar 23, 3:56 am)
Re: [PATCH] send-email: do not check for editor until needed, Jonathan Nieder, (Tue Mar 23, 12:25 pm)
Re: [PATCH] send-email: lazily assign editor variable, Junio C Hamano, (Wed Mar 24, 10:52 am)
Re: [PATCH] send-email: lazily assign editor variable, Jonathan Nieder, (Wed Mar 24, 10:17 pm)
Re: [PATCH] send-email: lazily assign editor variable, Michael J Gruber, (Thu Mar 25, 1:03 am)
Re: [PATCH] send-email: lazily assign editor variable, Junio C Hamano, (Fri Mar 26, 12:32 pm)
Re: [PATCH] send-email: lazily assign editor variable, Junio C Hamano, (Fri Mar 26, 12:32 pm)
Re: [PATCH] send-email: lazily assign editor variable, Jonathan Nieder, (Fri Mar 26, 2:45 pm)