"git wtf" command: get a history of the current selection #547
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This came about to scratch my own itch - it provides a counterpart to sublime-text-git's blame handling that summarises the history of a set of lines rather than surface noisier file level change information provided by "Git: Log Current File" or just the last commit message for each line from "Git: Blame".
It's a simple wrapper round
git log -L
- https://git-scm.com/docs/git-log#git-log--LltstartgtltendgtltfilegtI'd love to extend this to support following functions rather than line ranges, but this appears more involved - it's based on per language regexes to match the methods with language tailored defaults usually configured via
.gitattributes
(http://urbanautomaton.com/blog/2014/09/22/tracking-method-history-in-git/). It's probably easiest to duplicate those regexes in to plugin itself. It's also not entirely clear to me what would be the ideal UX for choosing method over range.Hopefully the naming isn't too abrasive... 😃