Thread (11 messages) flat view 11 messages, 4 authors, 2016-06-15

Re: [PATCH 2/2] filter-branch.sh: support nearly proper tag name filtering

From: Brandon Casey <hidden>
Date: 2016-06-15 22:44:25

Johannes Schindelin wrote:
Hi,

On Mon, 24 Mar 2008, Brandon Casey wrote:
quoted
Johannes Schindelin wrote:
quoted
On Mon, 24 Mar 2008, Brandon Casey wrote:
quoted
So right now, tags matching the refspec are rewritten. They are 
currently rewritten with a lightweight tag.
That is unintended.  My understanding of a tag was always that it is 
something immutable.  I mean, _really_ immutable.  If you released a 
certain version, then that is tagged.  You must not rewrite the tag.  
Ever.
Then what is the intended behavior for --tag-name-filter?
To be honest, I wanted to rip that part out before posting the initial 
filter-branch patches, and forgot/was too lazy.

IMO there should be clean semantics first, and a default mode that does 
_not_ rewrite tags at all first.
There isn't really a "default" mode for --tag-name-filter, a script must
always be supplied. The name of the option (--tag- _name_ -filter) implies
that it is intended for changing the names of tags. If the user decides
not to change the name, then I think the user would expect the old tag to
be replaced.

So the user could choose to:

          Rewrite tag ref: --tag-name-filter cat
                        or
 Give new tags a new name: --tag-name-filter 'sed -e s/$/.new/'
                        or
       Save original tags: --tag-name-filter 'sed -e s/$/.orig/'
     Then create new ones: --tag-name-filter 'sed -e s/\.orig$//' [plus additional filtering]

More precise control over tag filtering should probably have an option
with a different name like --tag-filter, at which point --tag-name-filter
could be deprecated.

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