GitDiffMargin icon indicating copy to clipboard operation
GitDiffMargin copied to clipboard

Compare to index

Open sharwell opened this issue 9 years ago • 4 comments

  1. 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.
  2. 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 avatar Sep 18 '14 17:09 sharwell

@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

laurentkempe avatar Sep 18 '14 20:09 laurentkempe

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?

laurentkempe avatar Oct 29 '14 17:10 laurentkempe

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 avatar Apr 30 '17 07:04 jcansdale

@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.

ricksladkey avatar Jun 03 '18 04:06 ricksladkey