Re: [PATCH] git-am --one

From: Junio C Hamano <junkio@cox.net>
Date: 2005-12-14 12:54:01
"H. Peter Anvin" <hpa@zytor.com> writes:

> Junio C Hamano wrote:
>> I understand the motivation, but I suspect skipping mailsplit
>> might be simpler, like this untested code perhaps?
>> 	case "$one" in
>>         '')
>>         	... original code ...
>> 		;;
>>         *)
>> 		one=`printf "%${prec}d" 1`
>>         	cat "$@" >"$dotest/$one"
>>                 echo "$one" >"$dotest/last"
>>                 ;;
>> 	esac
>>
>
> If that works, great.  I just implemented it in the "most obviously 
> correct" way, meaning with as few changes as possible.

Another thing you may probably want is to loop over "$@", so
that the flag is not --one anymore, but --2822 (or --bare as
opposed to mbox format) and do something like this:

	case "$series_of_2822_messages" in
        '') ... original code ... ;;
        *)
        	i=1
                for input
                do
			this=`printf "%${prec}d" $i
                        cp "$input" "$dotest/$this"
                        i=$(($i+1))
		done
                printf "%${prec}d" $# >"$dotest/last"
                ;;
	esac

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Dec 14 12:54:36 2005

This archive was generated by hypermail 2.1.8 : 2005-12-14 12:54:43 EST