Re: [feature request] 2) Remove many tags at once and 1) Prune tags on old-branch-before-rebase

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

Re: [feature request] 2) Remove many tags at once and 1) Prune tags on old-branch-before-rebase

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

Eric Chamberland [off-list ref] writes:
1) git tag --delete-tags-to-danglings-and-unnamed-banches

This would be able to remove all tags that refers to commits which are
on branches that are no more referenced by any branch name.  This is
happening when you tag something, then "git rebase".  Your tag will
still be there on the old-and-before-rebase branch and won't be
"pruned" by any git command... (that I know of...)
Not interesting for at least two reasons.

Why are "tags" any special?  "git branch --delete-merged" may also
be of interest, and for that matter "git update-ref -d" to deal with
any ref in general would be equally valid if such an option were a
good idea.

What you want is a way to compute, given a set of tags (or refs in
general) and a set of branches (or another set of refs in general),
find the ones in the former that none of the latter can reach.  With
that, you can drive "git tag -d $(that way)".

In other words, the feature does not belong to "git tag" command.
2) git tag -d "TOKEN*"
Again, not interesting.  You already have:

    git for-each-ref --format='%(refname:short)' refs/tags/TOKEN\* |
    xargs -r git tag -d

Re: [feature request] 2) Remove many tags at once and 1) Prune tags on old-branch-before-rebase

From: Eric Chamberland <hidden>
Date: 2016-06-15 22:56:20

Hi Junio,

On 03/07/2013 06:33 PM, Junio C Hamano wrote:
Eric Chamberland [off-list ref] writes:

What you want is a way to compute, given a set of tags (or refs in
general) and a set of branches (or another set of refs in general),
find the ones in the former that none of the latter can reach.  With
that, you can drive "git tag -d $(that way)".
Yes, this is *exactly* what I want...
In other words, the feature does not belong to "git tag" command.
quoted
2) git tag -d "TOKEN*"
Again, not interesting.  You already have:

     git for-each-ref --format='%(refname:short)' refs/tags/TOKEN\* |
     xargs -r git tag -d
I don't agree here for one reason:

git tag -l "TOKEN*"

already exists and works very well...

So why is it not interesting to have:

git tag -d "TOKEN*"

?

We can also write:

git tag -d `git tag -l "TOKEN*"`

but a simple addition to "-d" feature looks like a receivable behavior 
here, no?

Thanks,

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