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

Re: git filter-branch --filter-notes/--post-rewrite?

From
Thomas Rast <trast@student.ethz.ch>
Date
Mar 18, 2011, 09:53 UTC
Message-ID
<201103181053.58969.trast@student.ethz.ch>
In-Reply-To
<201103180116.14754.johan@herland.net>
Johan Herland wrote:
Show 15 quoted lines
> On Thursday 17 March 2011, Hallvard B Furuseth wrote:
> > Is there a git version where filter-branch can copy notes, or with a
> > post-rewrite hook?  I found an old discussion of that on WWW, but
> > nothing seems to have come of that yet.  Currently I remove the 'rm
> > -rf "$tempdir"' in git-filter-branch.sh so the info is available
> > for a separate script.
> 
> No, AFAIK notes copying (or post-rewrite hook) has not yet been implemented 
> in filter-branch. However, it shouldn't be very difficult to add support for 
> this:
> 
> Looking at git-rebase.sh (where it _is_ implemented), it seems to be a 
> matter of feeding "old_sha1 new_sha1" pairs into a "rewritten" file, and 
> then passing that file to the stdin of "git notes copy --for-rewrite=filter-
> branch" (followed by passing the same file to the "post-rewrite" hook).
I had a patch for this back when post-rewrite was invented,
  http://thread.gmane.org/gmane.comp.version-control.git/139919/focus=139917

but Hannes replied that it should grow a real notes filter, and while I dropped it there, I tend to agree with him. Feel free to pick it up again.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Previous: Johan HerlandNext: Hallvard B Furuseth
Message 3 of 5 in “git filter-branch --filter-notes/--post-rewrite?”
  1. Hallvard B FurusethMar 17, 2011
  2. Johan HerlandMar 18, 2011
  3. Thomas RastMar 18, 2011
  4. Hallvard B FurusethMar 20, 2011
  5. Johan HerlandMar 21, 2011

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.