git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Christian Jaeger <christian@jaeger.mine.nu>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: git tag -s: TAG_EDITMSG should not be deleted upon failures
Date: Sat, 6 Dec 2008 16:54:01 -0500	[thread overview]
Message-ID: <20081206215400.GA29440@coredump.intra.peff.net> (raw)
In-Reply-To: <7v8wqtvvql.fsf@gitster.siamese.dyndns.org>

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

  reply	other threads:[~2008-12-06 21:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-03 15:53 git tag -s: TAG_EDITMSG should not be deleted upon failures Christian Jaeger
2008-12-06 19:40 ` Jeff King
2008-12-06 19:42   ` Jeff King
2008-12-06 21:28   ` Junio C Hamano
2008-12-06 21:54     ` Jeff King [this message]
2008-12-06 23:00       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081206215400.GA29440@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=christian@jaeger.mine.nu \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).