Re: [PATCH] tag: --force is quiet about new tags

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] tag: --force is quiet about new tags

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:56:22

Phil Hord [off-list ref] writes:
git tag --force is used to replace an existing tag with
a new reference.  Git helpfully tells the user the old
ref when this happens.  But if the tag name is new and does
not exist, git tells the user the old ref anyway (000000).

Teach git to ignore --force if the tag is new.  Add a test
for this and also to ensure --force can replace tags at all.

Signed-off-by: Phil Hord <redacted>
---
I think we would still want to allow the operation to go through,
even when the --force option is given, to create a new tag.  I agree
that the message should not say "Updated".  So teaching Git not to
issue the "Updated" message makes perfect sense.  It is somewhat
misleading to say we are teaching Git to ignore the option, though.

Thanks.

Re: [PATCH] tag: --force is quiet about new tags

From: Phil Hord <hidden>
Date: 2016-06-15 22:56:22

On Tue, Mar 12, 2013 at 11:33 PM, Junio C Hamano [off-list ref] wrote:
Phil Hord [off-list ref] writes:
quoted
git tag --force is used to replace an existing tag with
a new reference.  Git helpfully tells the user the old
ref when this happens.  But if the tag name is new and does
not exist, git tells the user the old ref anyway (000000).

Teach git to ignore --force if the tag is new.  Add a test
for this and also to ensure --force can replace tags at all.

Signed-off-by: Phil Hord <redacted>
---
I think we would still want to allow the operation to go through,
even when the --force option is given, to create a new tag.  I agree
that the message should not say "Updated".  So teaching Git not to
issue the "Updated" message makes perfect sense.  It is somewhat
misleading to say we are teaching Git to ignore the option, though.

Thanks.
My phrasing was too ambiguous.  What you described is exactly what the
patch does.  --force is superfluous when the tag does not already
exist.  It is only checked in two places, and one of those is to
decide whether to print the "Updated" message.  How's this?

   Teach 'git tag --force' to suppress the update message if
   the tag is new.  Add a test for this and also to ensure
   --force can replace tags at all.

Phil

Re: [PATCH] tag: --force is quiet about new tags

From: Michael J Gruber <hidden>
Date: 2016-06-15 22:56:23

Phil Hord venit, vidit, dixit 13.03.2013 05:21:
On Tue, Mar 12, 2013 at 11:33 PM, Junio C Hamano [off-list ref] wrote:
quoted
Phil Hord [off-list ref] writes:
quoted
git tag --force is used to replace an existing tag with
a new reference.  Git helpfully tells the user the old
ref when this happens.  But if the tag name is new and does
not exist, git tells the user the old ref anyway (000000).

Teach git to ignore --force if the tag is new.  Add a test
for this and also to ensure --force can replace tags at all.

Signed-off-by: Phil Hord <redacted>
---
I think we would still want to allow the operation to go through,
even when the --force option is given, to create a new tag.  I agree
that the message should not say "Updated".  So teaching Git not to
issue the "Updated" message makes perfect sense.  It is somewhat
misleading to say we are teaching Git to ignore the option, though.

Thanks.
My phrasing was too ambiguous.  What you described is exactly what the
patch does.  --force is superfluous when the tag does not already
exist.  It is only checked in two places, and one of those is to
decide whether to print the "Updated" message.  How's this?

   Teach 'git tag --force' to suppress the update message if
   the tag is new.  Add a test for this and also to ensure
   --force can replace tags at all.

Phil
Looks good to me, both the patch and the (updated) commit message.

Michael
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help