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

Re: Bug? Files are losing history after subtree merge

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Oct 2, 2013, 20:21 UTC
Message-ID
<vpqy56bjuen.fsf@anie.imag.fr>
In-Reply-To
<CAN0XMO+y3Cwsz5LwbmzHBe31Rf-RwMykynLmvmqUsxY8f+1dsQ@mail.gmail.com>
Ralf Thielow <ralf.thielow@gmail.com> writes:
> Thanks for explanation.
> I knew the history of the repo is there, but the history of single files
> (and the ability to look at it)

There is no such thing as "single file history" in Git. Git knows about the history of the project, and knows which files were there at each commit. Then, some commands can walk through history following the history of a file. "git blame" is very good at it, and should work with subtree merges. "git log --follow" is a quick hack that nobody bothered to fix up to now (sadly).

You can use workarounds like
  git log -- '*git-gui.sh'

(from the toplevel), to view each commit that touched a file whose name ends with git-gui.sh. It won't follow actual renames, and may show false positive if you have several files with the same basename. But it may help.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Ralf ThielowNext: Ralf Thielow
Message 4 of 5 in “Bug? Files are losing history after subtree merge”
  1. Ralf ThielowOct 2, 2013
  2. Matthieu MoyOct 2, 2013
  3. Ralf ThielowOct 2, 2013
  4. Matthieu MoyOct 2, 2013
  5. Ralf ThielowOct 2, 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.