git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Petr Baudis <pasky@suse.cz>
Cc: Amos Waterland <apw@us.ibm.com>,
	junkio@cox.net, git@vger.kernel.org, boutcher@cs.umn.edu
Subject: Re: [PATCH] do not open editor in dumb terminal
Date: Sun, 05 Feb 2006 16:56:39 -0800	[thread overview]
Message-ID: <7vek2hcnjs.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: 20060205174422.GG31278@pasky.or.cz

Petr Baudis <pasky@suse.cz> writes:

> Cogito solves this by [ -t ] and just doing cat instead of $EDITOR if
> the input is not a terminal. Couldn't Junio just do
>
> 	emacsclient | cg^H^Hgit commit
>
> in that case? (Note that I'm totally clueless about what emacsclient's
> usage actually is.)

It works just like other editors you can sanely use as EDITOR or
VISUAL.  Takes list of files to edit on the command line, lets
the user interact with it and modify the files, writes out the
results to the files and exits.

So you could have suggested something like this:

	$ ( $EDITOR tmpfile && cat tmpfile ) | cg commit

I think "git commit -F -" reads from stdin so an equilvalent can
be done with "git commit", but I suspect a sane user would
rather do this instead if he uses a temporary file:

	$ $EDITOR tmpfile
        $ git commit -F tmpfile

      reply	other threads:[~2006-02-06  0:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-03 11:41 [PATCH] do not open editor in dumb terminal Amos Waterland
2006-02-03 19:56 ` Junio C Hamano
2006-02-05  0:37   ` Amos Waterland
2006-02-05  1:58     ` H. Peter Anvin
2006-02-05  2:54     ` Junio C Hamano
2006-02-05  5:04       ` Daniel Barkalow
2006-02-05  5:48         ` Junio C Hamano
2006-02-05 17:44 ` Petr Baudis
2006-02-06  0:56   ` Junio C Hamano [this message]

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=7vek2hcnjs.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=apw@us.ibm.com \
    --cc=boutcher@cs.umn.edu \
    --cc=git@vger.kernel.org \
    --cc=pasky@suse.cz \
    /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).