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

Re: History rewriting swiss army knife

From
Junio C Hamano <junkio@cox.net>
Date
Mar 24, 2006, 22:47 UTC
Message-ID
<7vek0rzchc.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060324140831.GY18185@pasky.or.cz>
Petr Baudis <pasky@suse.cz> writes:
Show 5 quoted lines
>   It's never been so easy before - I've written cg-admin-rewritehist,
> which will execute your filters for each commit (which can rewrite the
> tree contents, just the tree itself through the index, committer/author
> information and commit message) while the script will obviously preserve
> all the other information like merges, author/committer information etc.

Hmph. The above description sounds like you are not allowing the user's custom script to drop existing parent (or graft a new one) while rewriting. I have not looked at how you are interfacing with user's custom script, but I sort-of expected you to throw a commit at it from older to newer (i.e. topo-order in reverse), along with the names of already re-written commit objects that are parents of taht commit, and have it build a rewritten commit and report its object name back to you.

But it sounds like a useful tool in certain situations -- I sounded mildly negative last night, but after you gave an example of cleaning up a half-botched import, I changed my mind.

Previous: Petr BaudisNext: Petr Baudis
Message 2 of 3 in “History rewriting swiss army knife”
  1. Petr BaudisMar 24, 2006
  2. Junio C HamanoMar 24, 2006
  3. Petr BaudisMar 26, 2006

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.