git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Brandon Casey <casey@nrlssc.navy.mil>
Date
Mar 24, 2008, 18:37 UTC
Message-ID
<47E7F4E3.8050406@nrlssc.navy.mil>
In-Reply-To
<alpine.LSU.1.00.0803241812230.4353@racer.site>
Johannes Schindelin wrote:
Show 21 quoted lines
> Hi,
> 
> On Mon, 24 Mar 2008, Brandon Casey wrote:
> 
>> Johannes Schindelin wrote:
>>
>>> On Mon, 24 Mar 2008, Brandon Casey wrote:
>>>
>>>> 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
Previous: Johannes SchindelinNext: Eyvind Bernhardsen
Message 13 of 23 in “filter-branch.sh: support nearly proper tag name filtering”
  1. 2/2 filter-branch.sh: support nearly proper tag name filteringBrandon Casey, Mar 20, 2008
  2. Johannes SchindelinMar 20, 2008
  3. Brandon CaseyMar 20, 2008
  4. Junio C HamanoMar 24, 2008
  5. Johannes SchindelinMar 24, 2008
  6. Junio C HamanoMar 24, 2008
  7. Johannes SchindelinMar 24, 2008
  8. Brandon CaseyMar 24, 2008
  9. Brandon CaseyMar 24, 2008
  10. Johannes SchindelinMar 24, 2008
  11. Brandon CaseyMar 24, 2008
  12. Johannes SchindelinMar 24, 2008
  13. Brandon CaseyMar 24, 2008
  14. filter-branch --all?Eyvind Bernhardsen, Mar 24, 2008
  15. Brandon CaseyMar 24, 2008
  16. Eyvind BernhardsenMar 24, 2008
  17. Brandon CaseyMar 24, 2008
  18. filter-branch.sh: support nearly proper tag name filteringBrandon Casey, Mar 24, 2008
  19. Brandon CaseyMar 24, 2008
  20. Junio C HamanoMar 25, 2008
  21. filter-branch.sh: support nearly proper tag name filteringBrandon Casey, Mar 25, 2008
  22. Junio C HamanoMar 26, 2008
  23. filter-branch.sh: support nearly proper tag name filteringBrandon Casey, Mar 26, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.