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

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

 



"brian m. carlson" <sandals@xxxxxxxxxxxxxxxxxxxx> 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
--
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]