Re: git notes and core.editor config
- From
Thomas Rast <trast@student.ethz.ch>
- Date
- Jan 11, 2011, 12:26 UTC
- Message-ID
- <201101111326.02277.trast@student.ethz.ch>
- In-Reply-To
- <AANLkTik-=s-F8dmBRLU8o9LcSztb1P0WnkN5HK_n_No4@mail.gmail.com>
Jeenu V wrote:
Show 12 quoted lines
> On Tue, Jan 11, 2011 at 4:01 PM, Johan Herland <johan@herland.net> wrote: > >> In other words, I > >> don't think [git-notes] honors shell quoting for editor config variable. > > > > Indeed, it could, but I cannot immediately see what causes it. In > > current 'master', builtin/notes.c launches the editor like this: > > > > if (launch_editor(path, &(msg->buf), NULL)) ... > > > > while builtin/commit.c lauches the editor like this: > > > > if (launch_editor(git_path(commit_editmsg), NULL, env)) ...
[...]
> $ git --version > git version 1.7.0.4
git-notes was a script before 1.7.1, and that was indeed buggy in that it used the editor as
${GIT_EDITOR:-${core_editor:-${VISUAL:-${EDITOR:-vi}}}} "$MSG_FILE"instead of using git_editor() from git-sh-setup, which would have gone through eval.
The builtin version of git-notes does not have this problem.
--
Thomas Rast
trast@{inf,student}.ethz.ch