Re: git tag: don't complain of empty messages

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

 



Han-Wen Nienhuys <hanwen@xxxxxxxxx> writes:

> Hello,
>
> GIT refuses to set annotated tags without a comment. I think this is a
> silly restriction when the message is explicitly set to the empty
> string.
>
> The attached patch should fix this;  Unfortunately, I've been unable
> to test it. Running the script with sh -x stops at
>
> ++exec /home/hanwen/usr/pkg/git/bin/git-sh-setup
>
> -- 
>  Han-Wen Nienhuys - hanwen@xxxxxxxxx - http://www.xs4all.nl/~hanwen
> commit 446cfbd9edcfaf5fe76f597823e0e3314d091489
> Author: Han-Wen Nienhuys <hanwen@xxxxxxxxxxxx>
> Date:   Wed Nov 15 16:27:27 2006 +0100
>
>     always set tag if -m is given, even if empty
>

Please follow Documentation/SubmittingPatches.

> diff --git a/git-tag.sh b/git-tag.sh
> index ac269e3..f2533a3 100755
> --- a/git-tag.sh
> +++ b/git-tag.sh
> @@ -5,6 +5,7 @@ USAGE='-l [<pattern>] | [-a | -s | -u <k
>  SUBDIRECTORY_OK='Yes'
>  . git-sh-setup
>  
> +message_given=
>  annotate=
>  signed=
>  force=
> @@ -37,6 +38,7 @@ do
>      	annotate=1
>  	shift
>  	message="$1"
> +	message_given=1
>  	;;
>      -u)
>  	annotate=1

If you are going to do this, this hunk should be changed to
check if the command line ended with "-m" without next
parameter, in which case it should error out.

I do not have a strong objection against allowing tags without
messages, but at the same time I do not see a compelling reason
to allow them either.  Care to explain what workflow is helped
by an empty tag?

-
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]