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

Re: [PATCH] config: Add new option to open an editor.

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 3, 2009, 23:31 UTC
Message-ID
<alpine.DEB.1.00.0902040029040.9822@pacific.mpi-cbg.de>
In-Reply-To
<94a0d4530902031525o11e512barfc2f50c33a520474@mail.gmail.com>
Hi,
On Wed, 4 Feb 2009, Felipe Contreras wrote:
Show 19 quoted lines
> On Wed, Feb 4, 2009 at 1:05 AM, Johannes Schindelin
> <Johannes.Schindelin@gmx.de> wrote:
> >
> > On Wed, 4 Feb 2009, Felipe Contreras wrote:
> >
> >> On Wed, Feb 4, 2009 at 12:53 AM, Johannes Schindelin
> >> <Johannes.Schindelin@gmx.de> wrote:
> >>
> >> > However, a test case would be nice...
> >>
> >> What would the the test case check?
> >
> > That 'GIT_CONFIG=bla GIT_EDITOR=echo git config -e' and 'GIT_DIR=blub 
> > GIT_EDITOR=echo git config -e' do the right thing.  Maybe even 
> > --global, but that would also be a good test that "git config --global 
> > -e" does not fail when there is no original file.
> 
> Hmm, I'm not sure what issues this test case would find. If there's a 
> problem with launch_editor that's something other test case should find.

The purpose of the test case is not to find problems now, but ensure that what the patch is intended to do does not get broken by subsequent patches.

Show 5 quoted lines
> If there's no original file it's up to the editor to create one, if for 
> some reason the editor fails at doing that it's a problem of the editor, 
> and there's not much 'git config -e' could do except show an error, and 
> that's what launch_editor would do. Same thing if the editor is wrong 
> (GIT_EDITOR=blah).

I was more thinking about 'git config --global -e' complaining that it could not find a non-existant file _before_ launching the editor.

Likewise, GIT_EDITOR=echo was meant to output the filename, not to edit the file.

Ciao, Dscho

Previous: Felipe ContrerasNext: Felipe Contreras
Message 7 of 25 in “config: Add new option to open an editor.”
  1. config: Add new option to open an editor.Felipe Contreras, Feb 3, 2009
  2. Johannes SchindelinFeb 3, 2009
  3. Felipe ContrerasFeb 3, 2009
  4. Johannes SchindelinFeb 3, 2009
  5. Felipe ContrerasFeb 3, 2009
  6. config: Add new option to open an editor.Felipe Contreras, Feb 3, 2009
  7. Johannes SchindelinFeb 3, 2009
  8. Felipe ContrerasFeb 3, 2009
  9. Jeff KingFeb 4, 2009
  10. Felipe ContrerasFeb 4, 2009
  11. Jeff KingFeb 4, 2009
  12. Felipe ContrerasFeb 4, 2009
  13. config: Add new option to open an editor.Felipe Contreras, Feb 4, 2009
  14. Junio C HamanoFeb 4, 2009
  15. Felipe ContrerasFeb 4, 2009
  16. Johannes SchindelinFeb 4, 2009
  17. Johannes SchindelinFeb 4, 2009
  18. Felipe ContrerasFeb 7, 2009
  19. Johannes SchindelinFeb 7, 2009
  20. Felipe ContrerasFeb 7, 2009
  21. Junio C HamanoFeb 7, 2009
  22. Felipe ContrerasFeb 7, 2009
  23. config: Add new option to open an editor.Felipe Contreras, Feb 7, 2009
  24. Johannes SchindelinFeb 4, 2009
  25. Felipe ContrerasFeb 4, 2009

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.