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

Re: Rewriting references to existing commits in commit messages with filter-branch

From
VZVadim Zeitlin <vz-git@zeitlins.org>
Date
Mar 11, 2013, 14:05 UTC
Message-ID
<loom.20130311T145745-986@post.gmane.org>
In-Reply-To
<513DE1E8.7010302@alum.mit.edu>
Michael Haggerty <mhagger <at> alum.mit.edu> writes:
Show 14 quoted lines
> 
> On 03/11/2013 12:45 PM, Vadim Zeitlin wrote:
> > [...]
> >  The first thing I'd like to do is to replace all references to subversion
> > revision numbers in the commit messages with the corresponding git commit
> > SHA1s. [...] I have a couple of dozens of errors which happen
> > because the file .git-rewrite/map/$commit doesn't exist yet when I'm trying
> > to look it up.
> 
> The quick and dirty solution would be to rewrite your script such that
> if the commit is still unknown to Git, it emits a warning and leaves the
> commit message unchanged (i.e., leaves the Subversion revision number
> untouched).  Then simply run the filter-branch a few times until it
> emits no warnings.
 Thanks, I did think about this but the trouble is that after the first rewrite
"git svn find-rev" wouldn't work any more, so I'd have to do the substitutions
manually. Which might be doable as there are not that many of them but, if
possible, I'd rather do it automatically.
 FWIW I'm playing with --date-order now (thanks Thomas) but somehow it seems to
create other problems while fixing (some of) the existing ones. I need to look
at this more closely to understand what's going on here...
VZ
Previous: Michael Haggerty
Message 7 of 7 in “Rewriting references to existing commits in commit messages with filter-branch”
  1. Vadim ZeitlinMar 11, 2013
  2. Lawrence MitchellMar 11, 2013
  3. Vadim ZeitlinMar 11, 2013
  4. Thomas RastMar 11, 2013
  5. Vadim ZeitlinMar 11, 2013
  6. Michael HaggertyMar 11, 2013
  7. Vadim ZeitlinMar 11, 2013

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.