git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] config: Add new option to open an editor.
Date: Wed, 4 Feb 2009 01:43:06 +0200	[thread overview]
Message-ID: <94a0d4530902031543t2928c9c4ta75132ddb4a9c52@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.1.00.0902040029040.9822@pacific.mpi-cbg.de>

On Wed, Feb 4, 2009 at 1:31 AM, Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
> Hi,
>
> On Wed, 4 Feb 2009, Felipe Contreras wrote:
>
>> 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.

I know, I wonder what kinds of possible problems this test case would find.

>> 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.

You mean if somebody for some reason decides to do some extra checking
on the config_filename before executing launch_editor? I seriously
doubt anything more would be needed for this --edit option. Can this
patch be acked as it is?

-- 
Felipe Contreras

  reply	other threads:[~2009-02-03 23:44 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-03 22:40 [PATCH] config: Add new option to open an editor Felipe Contreras
2009-02-03 22:53 ` Johannes Schindelin
2009-02-03 22:56   ` Felipe Contreras
2009-02-03 23:05     ` Johannes Schindelin
2009-02-03 23:25       ` Felipe Contreras
2009-02-03 23:26         ` Felipe Contreras
2009-02-03 23:31         ` Johannes Schindelin
2009-02-03 23:43           ` Felipe Contreras [this message]
2009-02-04 14:53 ` Jeff King
2009-02-04 15:03   ` Felipe Contreras
2009-02-04 15:18     ` Jeff King
2009-02-04 15:41       ` Felipe Contreras
2009-02-04 22:34         ` [PATCH v3] " Felipe Contreras
2009-02-04 23:16           ` Junio C Hamano
2009-02-04 23:39             ` Felipe Contreras
2009-02-04 23:43             ` Johannes Schindelin
2009-02-04 23:49               ` Johannes Schindelin
2009-02-07 21:09                 ` Felipe Contreras
2009-02-07 21:14                   ` Johannes Schindelin
2009-02-07 21:15                     ` Felipe Contreras
2009-02-07 21:34                       ` Junio C Hamano
2009-02-07 21:50                         ` Felipe Contreras
2009-02-07 21:53                           ` [PATCH] " Felipe Contreras
2009-02-04 15:20     ` Johannes Schindelin
2009-02-04 15:42       ` Felipe Contreras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=94a0d4530902031543t2928c9c4ta75132ddb4a9c52@mail.gmail.com \
    --to=felipe.contreras@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).