Subject: Re: [PATCH v2 4/9] am: add the --gpg-sign option

From: Junio C Hamano <[email-masked]>
Date: Mon, 27 Jan 2014 15:26:41 -0800

"brian m. carlson" <[email-masked]> writes:

> @@ -900,7 +906,8 @@ did you forget to use 'git add'?"
>  			GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"
>  			export GIT_COMMITTER_DATE
>  		fi &&
> -		git commit-tree $tree ${parent:+-p} $parent <"$dotest/final-commit"
> +		git commit-tree ${gpg_sign_opt:+"$gpg_sign_opt"} $tree ${parent:+-p} $parent \
> +			<"$dotest/final-commit"

Yuck.  This is unsightly.

It used to be that "commit-tree" was an oddball that took a
mandatory argument $tree always as its first thing, and required
zero or more "-p $parent" after and it did not take any other
options (no -m, no -F, no -S, no nothing).

The original is written in such a way that honors that odd
tradition, because it was how it was written originally, and it did
not need to pass any other option to require the new style
invocation (see "git commit-tree --help" and look at the SYNOPSIS
section).

Now you are passing dash-options to the command, I think it is time
to update the call to the modern style even in the default, non-signed
case.

	git commit-tree ${parent:+-p} $parent ${gpg_sign_opt:+"$gpg_sign_opt"} $tree

>  	) &&
>  	git update-ref -m "$GIT_REFLOG_ACTION: $FIRSTLINE" HEAD $commit $parent ||
>  	stop_here $this