threads / discuss / 34634

"git log --follow filename" (with diff.renameLimit=0) not working after subtree add

Subject: "git log --follow filename" (with diff.renameLimit=0) not working after subtree add

## tl;dr

One message between Aug 7, 2013 and Aug 7, 2013.

replies: 0people: 1as markdown or json

Diogo de Campos· Aug 7, 2013, 15:51 UTC · lore
Problem:
"git log --follow filename" is not working for files after a big move.
Scenario:

Just performed a "git subtree add" where big projects were moved into another repository, and I'm not able to view history for a single file.

Sample output: Output after subtree add (no output)

> git log --follow --oneline file.py

Output from same command in old repository (the one that was merged with subtree, this is the output i expect to continue having atfer a merge)

> git log --follow --oneline file.py

cefa32b Convert doc strings to Sphinx 748b2dd Added target for C++ tests 1f2b52e Using default git_source_server for everything after moving to Stash ... [more commits]

A couple of notes:
- Made sure I used --follow
- Using options diff.renameLimit=0 and diff.renames=true
- Tried options -C and -M (even though there were no changes, should
be a 100% rename match)
- "git subtree add" was made without --squash to keep history
- "git blame file.py" works fine, detects all changes and rename history
- Commits added after the merge are tracked, but log stops at merge
- Tested with git 1.8.3.4
- This guy in StackOverflow seems to have the same problem:
http://stackoverflow.com/questions/4393527/why-might-git-log-not-show-history-for-a-moved-file-and-what-can-i-do-about-it

Relevant output for "git config -l" in repository: core.symlinks=false core.autocrlf=false color.diff=auto color.status=auto color.branch=auto color.interactive=true pack.packsizelimit=2g help.format=html http.sslcainfo=/bin/curl-ca-bundle.crt sendemail.smtpserver=/bin/msmtp.exe diff.astextplain.textconv=astextplain rebase.autosquash=true core.packedgitlimit=128m diff.renamelimit=0 diff.renames=true core.repositoryformatversion=0 core.filemode=false core.bare=false core.logallrefupdates=true core.symlinks=false core.ignorecase=true core.hidedotfiles=dotGitOnly

--
Diogo Campos

← back to recent threads