GitDiffMargin
GitDiffMargin copied to clipboard
Compare to index
- Create a new editor option that controls the visibility of the diff margin. Future versions of the extension could implement a UI for controlling this value, and it will automatically be functional.
- Implement three new commands for controlling the base version used in comparison operations. The commands are defined and implemented, but not exposed in the UI.
- Compare to Index: The working copy is compared to the index (where files get staged).
- Compare to Head: The working copy is compared to the latest commit.
- Toggle Compare to Index: A single command which toggles between Compare to Index and Compare to Head.
@sharwell I will go on with further tests and then I think we could release the new version which is already loaded with new great features. Then I will get back to that PR
Really cool idea, I love it! I think this would be a kind of advanced user feature. @sharwell Do you think we could compare to the first commit of the current branch?
I was wondering if there were any hooks to do this kind of thing in recent versions? I'd like to be able to diff with a specific branch (for GitHub PR integration). Is this PR a good place to start or is it very out of date? 😄
@jcansdale I submitted a much simpler PR #155 against the latest head of master that demonstrates a quick-and-dirty way to accomplish what you are trying to do.