Re: git tag -s: TAG_EDITMSG should not be deleted upon failures

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

 



On Sat, Dec 06, 2008 at 01:28:50PM -0800, Junio C Hamano wrote:

> Thanks.  I love patches that addresses bugs during -rc period.

Well, I'm not sure this was a bug fix versus an improvement, but at
least wasn't an all new feature. And it was short enough to look at in
one sitting.

Of course, I did still manage to introduce a bug in my 4-line
change...;)

>     - the "path" variable is uninitialized if we do not start editor at
>       all, so unlink(path) and free(path) have a very high chance of
>       failing.
> 
>       I think you need [Update #1] below squashed in to fix this.

Oops. Yes, that is definitely a problem.

> [Update #1]
> [...]
> -	char *path;
> +	char *path = NULL;

Right, that fix looks good.

> +	if (build_tag_object(buf, sign, result) < 0) {
> +		if (path)
> +			fprintf(stderr, "What you edited in your editor is left in %s",
> +				path);
> +		exit(128);
> +	}

Much better, though the message is a bit awkward. How about

  "The tag message has been left in %s"

?

Do you want me to resend, or do you want to fix up locally?

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