Re: Bug? Files are losing history after subtree merge
- From
Ralf Thielow <ralf.thielow@gmail.com>
- Date
- Oct 2, 2013, 20:44 UTC
- Message-ID
- <CAN0XMOJqmia4uTvOTBk75FcidD2hn6NbWf6a5R5GXPk1iDz4gQ@mail.gmail.com>
- In-Reply-To
- <vpqy56bjuen.fsf@anie.imag.fr>
On Wed, Oct 2, 2013 at 10:21 PM, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:
Show 13 quoted lines
> 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). >
Yeah From a user perspective there is a "single file history", isn't it? And in this case the history is gone. At least in the subtree case...
> You can use workarounds like > > git log -- '*git-gui.sh' >
"My" users are using gui tools, so there's sadly no chance to change the commands. I just wanted to mention the issue but I've worked around it so it's no problem anymore.
Show 8 quoted lines
> (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/