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

Re: [PATCH v3 1/2] git-am: emit usage when called w/o arguments and w/o patch on stdin

From
Jay Soffian <jaysoffian@gmail.com>
Date
Jan 28, 2009, 18:26 UTC
Message-ID
<76718490901281026i45c26cb0r978f795a50dede19@mail.gmail.com>
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:
Show 19 quoted lines
> 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.
Previous: Junio C HamanoNext: Sverre Rabbelier
Message 6 of 9 in “git-am: emit usage when called w/o arguments and w/o patch on stdin”
  1. 1/2 git-am: emit usage when called w/o arguments and w/o patch on stdinJay Soffian, Jan 28, 2009
  2. 2/2 git-am: minor cleanupsJay Soffian, Jan 28, 2009
  3. Pieter de BieJan 28, 2009
  4. Jay SoffianJan 28, 2009
  5. Junio C HamanoJan 28, 2009
  6. Jay SoffianJan 28, 2009
  7. Sverre RabbelierJan 28, 2009
  8. Jeff KingJan 28, 2009
  9. Junio C HamanoJan 28, 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.