Re: [PATCH] commit: --amend -m '' silently fails to wipe message

2016-04-07 Thread Jeff King
On Thu, Apr 07, 2016 at 12:56:26PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > Yes, FWIW, those were the sites and reasons I identified last night. > > Your patch looks like the right thing to me. > > Thanks, let's do this then. I'd already anticipated your sign-off

Re: [PATCH] commit: --amend -m '' silently fails to wipe message

2016-04-07 Thread Junio C Hamano
Jeff King writes: > Yes, FWIW, those were the sites and reasons I identified last night. > Your patch looks like the right thing to me. Thanks, let's do this then. I'd already anticipated your sign-off ;-). -- >8 -- From: Jeff King Subject: commit: do not ignore

Re: [PATCH] commit: --amend -m '' silently fails to wipe message

2016-04-07 Thread Jeff King
On Thu, Apr 07, 2016 at 11:12:19AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > I guessed that this might have come from the conversion of "message" > > form a pointer (which could be NULL) into a strbuf. And indeed, it looks > > like f956853 (builtin-commit: resurrect

Re: [PATCH] commit: --amend -m '' silently fails to wipe message

2016-04-07 Thread Jeff King
On Thu, Apr 07, 2016 at 10:50:06AM +0100, Adam Dinwoodie wrote: > > PS Is there a previous thread? I see a couple people cc'd, including me, > >but I don't remember a previous discussion. Did I just forget it? > > No previous thread: I noticed the odd behaviour, and figured I'd report > it.

Re: [PATCH] commit: --amend -m '' silently fails to wipe message

2016-04-07 Thread Junio C Hamano
Jeff King writes: > I guessed that this might have come from the conversion of "message" > form a pointer (which could be NULL) into a strbuf. And indeed, it looks > like f956853 (builtin-commit: resurrect behavior for multiple -m > options, 2007-11-11) did that. Yikes. That is

Re: [PATCH] commit: --amend -m '' silently fails to wipe message

2016-04-07 Thread Adam Dinwoodie
On Thu, Apr 07, 2016 at 12:42:19AM -0400, Jeff King wrote: > On Wed, Apr 06, 2016 at 06:15:03PM +0100, Adam Dinwoodie wrote: > > `git commit --amend -m ''` seems to be an unambiguous request to blank a > > commit message, but it actually leaves the commit message as-is. That's > > the case

Re: [PATCH] commit: --amend -m '' silently fails to wipe message

2016-04-06 Thread Jeff King
On Thu, Apr 07, 2016 at 12:42:19AM -0400, Jeff King wrote: > On Wed, Apr 06, 2016 at 06:15:03PM +0100, Adam Dinwoodie wrote: > > > `git commit --amend -m ''` seems to be an unambiguous request to blank a > > commit message, but it actually leaves the commit message as-is. That's > > the case

Re: [PATCH] commit: --amend -m '' silently fails to wipe message

2016-04-06 Thread Jeff King
On Wed, Apr 06, 2016 at 06:15:03PM +0100, Adam Dinwoodie wrote: > `git commit --amend -m ''` seems to be an unambiguous request to blank a > commit message, but it actually leaves the commit message as-is. That's > the case regardless of whether `--allow-empty-message` is specified, and >

[PATCH] commit: --amend -m '' silently fails to wipe message

2016-04-06 Thread Adam Dinwoodie
`git commit --amend -m ''` seems to be an unambiguous request to blank a commit message, but it actually leaves the commit message as-is. That's the case regardless of whether `--allow-empty-message` is specified, and doesn't so much as drop a non-zero return code. Add failing tests to show this