Hello,
Is the custom action required to achieve this output in the internal diff viewer?
Can't quite get the internal diff viewer to show the (optional) heading of the section that shows function that the hunk is part of, following the hunk range.
Is this showing of the function that the hunk is part of, even possible with current version of Sourcetree, 1.5.2.0 ?
Thanks much.
Yes, showing the method signature like it's shown in the "git diff" output.
Okay, so perhaps SourceTree isn't just using git diff under the hood.
It sounds like George wants SourceTree to parse the code being displayed in the diff so that method signatures would be included in the context. For example, a hunk would look like:
...
function MyFunction() {
...
//precontext line 3
//precontext line 2
//precontext line 1
/*
diffed lines
*/
//postcontext line 1
//postcontext line 2
//postcontext line 3
...
I expect most people would understand that the proposed feature is far too complex to implement reliably, especially in languages that allow nested functions. However, if you were able to implement this for even some languages, it would be incredibly helpful/cool.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi George,
Could you re-phrase your original question. I'm not understanding what you're getting at.
Cheers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, in the SourceTree in Log/History view, right side is a diff pane.
In a given diff output, one sees the following as an example:
Hunk 1 : Lines 3-15 (previously 3-14) ... ... dif output ...
That's good and all, but how do i show the diff heading that looks like following with the heading of the diff section that shows the function that the diff is part of ?
index b1d597c..1097bf4 100644 --- a/src/foo.c +++ b/src/foo.c @@ -1809,6 +1809,7 @@ blah42_routine(char** argv, ... ... dif output ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It did for me, I've never noticed that feature of git diff before, but it's pretty awesome.
Unfortunately, I don't think any existing options (including custom actions) are going to achieve what you want. File a feature request on jira.atlassian.com, then post a link here so I (and anyone else who is interested) can vote for it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey George. We parse out the diff in order to generate the diff view. We don't expose any of these options, you'd have to do a Git call to get them :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.