git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Jeenu VNext: Johan Herland
Message 4 of 6 in “git notes and core.editor config”
  1. Jeenu VJan 11, 2011
  2. Johan HerlandJan 11, 2011
  3. Jeenu VJan 11, 2011
  4. Thomas RastJan 11, 2011
  5. Johan HerlandJan 11, 2011
  6. Jeenu VJan 11, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.