git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jay Soffian <jaysoffian@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Pieter de Bie <pdebie@ai.rug.nl>,
	git@vger.kernel.org, sverre@rabbelier.nl
Subject: Re: [PATCH v3 1/2] git-am: emit usage when called w/o arguments and  w/o patch on stdin
Date: Wed, 28 Jan 2009 13:26:51 -0500	[thread overview]
Message-ID: <76718490901281026i45c26cb0r978f795a50dede19@mail.gmail.com> (raw)
In-Reply-To: <7v3af3thyj.fsf@gitster.siamese.dyndns.org>

On Wed, Jan 28, 2009 at 1:15 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Another approach we've taken in other places to avoid the "Huh?" that
> triggered this thread is to do something like:
>
>        if there is no argument
>        then
>                if reading from tty
>                then
>                        echo >&2 "Reading from terminal, waiting for input..."
>                fi
>                process stdin
>        else
>                for arg
>                do
>                        process $arg
>                done
>        fi
>
> Unfortunately, this will invalidate your "check -t 0 and error out" patch,
> but some people may find it easier to work with and more friendly.

Well perhaps we should just deal w/ctrl-c only and ignore the terminal
check altogether.

j.

  reply	other threads:[~2009-01-28 18:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-28 15:03 [PATCH v3 1/2] git-am: emit usage when called w/o arguments and w/o patch on stdin Jay Soffian
2009-01-28 15:03 ` [PATCH v3 2/2] git-am: minor cleanups Jay Soffian
2009-01-28 16:18 ` [PATCH v3 1/2] git-am: emit usage when called w/o arguments and w/o patch on stdin Pieter de Bie
2009-01-28 16:40   ` Jay Soffian
2009-01-28 18:15     ` Junio C Hamano
2009-01-28 18:26       ` Jay Soffian [this message]
2009-01-28 18:33         ` Sverre Rabbelier
2009-01-28 17:51   ` Jeff King
2009-01-28 18:52 ` 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=76718490901281026i45c26cb0r978f795a50dede19@mail.gmail.com \
    --to=jaysoffian@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pdebie@ai.rug.nl \
    --cc=sverre@rabbelier.nl \
    /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).