All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Eric Wong <normalperson@yhbt.net>, git@vger.kernel.org
Subject: Re: [PATCH] builtin-config: add --exec-editor for use in scripts
Date: Mon, 02 Feb 2009 01:56:57 -0800 (PST)	[thread overview]
Message-ID: <m3pri1w484.fsf@localhost.localdomain> (raw)
In-Reply-To: <7v4ozdo7yt.fsf@gitster.siamese.dyndns.org>

Junio C Hamano <gitster@pobox.com> writes:
> Eric Wong <normalperson@yhbt.net> writes:
> 
> > This exposes the launch_editor() library function for use by
> > various scripting languages.  This allows the ensure consistent
> > handling of GIT_EDITOR/VISUAL/EDITOR environment variables as
> > well as the handling of special characters such as spaces in the
> > various environment variables.
> >
> > Signed-off-by: Eric Wong <normalperson@yhbt.net>
> > ---
> >
> >  I'm not sure if git-config is the best place to stick it.  I plan to
> >  start using this in git-svn but I don't want to implement Git::Editor
> >  in Perl and have to keep track of editor.c.  Of course this also makes
> >  the logic/rules used in libgit usable to any other scripting language
> >  capable of launching other programs.
> 
> I agree that git-config is probably a wrong place.  A separate command
> "git editor" (or "git user-preference --editor", if you extend it to pager
> and others) perhaps?
> 
> I also agree that something like this would make scripting Porcelains a
> much pleasant experience.

I don't think this is something that should be put in 'git rev-parse',
but perhaps a bit obscure 'git var' (print a git logical variable)
would be a good place for that?

-- 
Jakub Narebski
Poland
ShadeHawk on #git

  reply	other threads:[~2009-02-02  9:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-01  2:53 [PATCH] builtin-config: add --exec-editor for use in scripts Eric Wong
2009-02-02  3:04 ` Junio C Hamano
2009-02-02  9:56   ` Jakub Narebski [this message]
2009-02-03  4:55     ` Eric Wong
2009-02-03  6:30       ` Junio C Hamano

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=m3pri1w484.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=normalperson@yhbt.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.