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

Track git blame through two unrelated histories

From
Ilia Pozhilov <ilyapoz@gmail.com>
Date
Mar 9, 2023, 11:05 UTC
Message-ID
<CAAo-ADZBBRxSROeAwrA9o30Etf3QQhLCaWQJtVsChVwT-AbgTg@mail.gmail.com>
Hello!

I have a weird use case. A repository at my company was migrated git -> non-git vcs -> git again.

During transition to non-git vcs the history was lost, i.e. an initial commit was created from some known commit from the old git repo.

Migration to new git repo was more transparent and we have the whole history.

So let's say I add two remotes and fetch all the commits, but they look like this:

A->B-> .... . . . -> Z    history1
1 -> 2 -> ..... -> 0 history2

and file contents in commits Z and 1 are exactly the same, but the commits themselves are completely unrelated for git.

What I want to achieve is blame working across this boundary.

What can I do? It this possible right now? Is it difficult to implement? Is there a good enough workaround? I don't think rewriting commits 1... 0 is an option, but rewriting A ... Z is an option.

What do you think?
Next: Junio C Hamano
Message 1 of 4 in “Track git blame through two unrelated histories”
  1. Ilia PozhilovMar 9, 2023
  2. Junio C HamanoMar 9, 2023
  3. Ilia PozhilovMar 13, 2023
  4. Ilia PozhilovMar 13, 2023

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.