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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jay Soffian <jaysoffian@xxxxxxxxx> writes:

> On Wed, Jan 28, 2009 at 11:18 AM, Pieter de Bie <pdebie@xxxxxxxxx> wrote:
>> FWIW, I sometimes like to run 'git am', paste in a patch and hit ctrl-d.
>>
>> I can probably retrain my finger to use 'git am -', but I'm not sure if that
>> works (after this patch)? At least it's not mentioned in the manpage.
>
> "git am -" doesn't work (before or after this patch), but "cat | git am" will.

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.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux