-
Notifications
You must be signed in to change notification settings - Fork 315
Blame showing all lines as NCY #260
Comments
Thanks for taking the task! I can't reprocude that here though:
|
I've finally found some time to work on this: Try with I'm assuming you agree that this should work? This also has similar issues with diff. The weird thing is that I can see where diff does it's crlf translation - and blame is using the textconv code from diff, but doesn't seem to be using the crlf translation code! I'm probably missing something though. Anyway, I've got a couple of things on the way. |
This probably happens with Vagrant, too? |
I haven't used Vagrant, so can't comment. What I've found is that in git diff, the The next issue is that in blame, it appears that |
Wow.. without looking at the history, I'm guessing there's been a restructure of all these functions in |
I've put changes up here: https://github.com/frogonwheels/git/tree/mrg/blame-crlf-v1 What I seem to have missed is how blame worked at all. When constructing the '00000000' fake commit which is the current working file, if the textconv failed (ie there wasn't one), then it seemed to just stream the file straight to memory! This is what I was seeing. Maybe in those other cases the textconv was behaving differently somehow. |
There were still a few problems, so I've made a new version https://github.com/frogonwheels/git/tree/mrg/blame-crlf-v2 Some feedback on the filespec blob commits would be good. It seems like there's some potential for quite bad behaviour there, as well as just missing out on the conversion. I guess this is also one for upstream. Now the only time I get issues is when I have binary nulls in my text file, and I'm happy to file that under expected behaviour.. though it's rather hard to diagnose (as in I didn't work it out until I was in the debugger and it triggered the 'is binary' heuristic). |
@frogonwheels I commented a bit on your v2. Please note, though, that it might be better to use GitHub to keep track of the current Pull Request version than to add |
@frogonwheels would you terribly mind switching to Git for Windows 2.x' SDK, rebase your branch, and open a Pull Request? Even if you think there is more work to be done; in that case, at least others can see your current state and help out. |
When doing a git blame (current master 8768113 ) with core.eol unset (native) and autocrlf=true, the entire file is always under 'work NCY'.
I suspect that there's a crlf translation issue here. This happens in git gui blame as well as git blame (which I use via fugitive.vim).
The text was updated successfully, but these errors were encountered: