Conversation
|
/cc #492 |
LibGit2Sharp.Tests/BlameFixture.cs
Outdated
There was a problem hiding this comment.
Missing trailing newline hunt mode on 😛
|
@ben you rock! Final nitpick (at least for now 😉), could you please add braces to |
|
git-blame: Show what revision and author last modified each line of a file. Currently, we're exposing a I was wondering if that would make sense to introduce a |
LibGit2Sharp/Blame.cs
Outdated
There was a problem hiding this comment.
Should this be called BlameHunkCollection?
There was a problem hiding this comment.
Why not? How does it feel from the code perspective?
There was a problem hiding this comment.
👍 for change - it better communicates how to use the type.
Should this also implement IEnumerable<BlameHunk>?
|
Added newlines to the end of all the files, and put braces on all the |
|
Mmm, tasty 🍺. BTW, was crashing for me on x86 and amd64 both, (At least I think ben#1 is what's needed. Watching the memory window shows that the marshaller takes a crap on that memory in the marshalling but pinvoke is mostly magic to me, so I'm not 100%.) |
LibGit2Sharp/Blame.cs
Outdated
There was a problem hiding this comment.
I'd rather not use the [Obsolete] argument for this kind of usage.
How about just dropping the entries?
|
Rebased so I can make sure Travis is happy. I'll have to rebase again once #565 is merged, but I figure this should be squashed a bit anyway. I've updated the description with the tasks that are remaining. |
LibGit2Sharp/Blame.cs
Outdated
There was a problem hiding this comment.
I was under this impression that you were willing to name this BlameHunkCollection
There was a problem hiding this comment.
Could you please make this IEnumerable<BlameHunk>?
|
Regarding the naming of the latest and earliest committishes to consider: what about |
👍 |
|
Done! 🌞 @nulltoken, we should probably squash this down. Do you want anything separated out, or just one big commit? |
LibGit2Sharp/BlameOptions.cs
Outdated
There was a problem hiding this comment.
This can be sealed with non-virtual members.
I'd put the |
LibGit2Sharp/BlameHunk.cs
Outdated
There was a problem hiding this comment.
How about moving to zero based?
|
Switched to 0-based numbering, and sealed |
|
There, down to two commits. And Travis is happy. Is anyone else happy? I'm happy. |
LibGit2Sharp/BlameHunk.cs
Outdated
There was a problem hiding this comment.
I know you just changed this, but this still feels like a really good reason to use 1 ourselves...
There was a problem hiding this comment.
Not to mention that most UIs will likely want to render the full blame, with line numbers that the user will expect...starting at 1.
There was a problem hiding this comment.
@dahlbyk 👊 @nulltoken Who will win?
I originally made the numbering 1-based for exactly those reasons, but it does feel a little weird.
There was a problem hiding this comment.
I haven't used this, but think I like using 0 - based numbering... (and then letting the UI's on top of us handle the conversion to 1 based).
There was a problem hiding this comment.
@dahlbyk 👊@nulltoken Who will win?
@nulltoken, of course. I'm a pacifist. Emphasis on fist.
|
Should there be a test exercising |
|
I suppose so. |
|
There. |
LibGit2Sharp/BlameHunk.cs
Outdated
There was a problem hiding this comment.
I was just looking at the above comment and noticed that you use FinalStartLineNumber 2X here. Should one of these be rawhunk.OrigStartLineNumber?
There was a problem hiding this comment.
WOO, good catch. The orig* fields aren't being filled in just yet, but at some point they will be. 💗
Be that way |
LibGit2Sharp/BlameHunk.cs
Outdated
|
@ben THIS IS ALL YOUR FAULT! ...and I 💓 you for this. |
|
Thanks for all! I am try to blame using (var repo = new Repository(@"path\to\libgit2sharp")) // updated to 4f4819e
{
var blame = repo.Blame(".gitignore");
}The debugger display is And // Libgit2's line numbers are 1-based
FinalStartLineNumber = rawHunk.FinalStartLineNumber - 1;
InitialStartLineNumber = rawHunk.OrigStartLineNumber - 1;So, I think the line range number which in the debugger display not quite right. The information /cc @nulltoken @ben |




Bind the
git_blame_*APIs.buffer blame - what should the signature be?Remove buffer-blame binding until neededShould this and Diff go into a(separate PR)Changesnamespace?Until/SincenamingCloses #492.