-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Differentiate between staged and unstaged changes #136
base: master
Are you sure you want to change the base?
Conversation
If a line as staged and unstaged changes it will be colors with markup.changed.git_gutter.staged_unstaged It will also use a new icon
* Use the --staged flag of git diff to get staged changes * Keep an adjustment map to adjust staged change line numbers The diff returned by *git diff --staged* does NOT consider unstaged changes. This means that we get the line numbers for where the staged changes would be at if there were no unstaged changes. So when there are unstaged changes the line numbers for where the staged changes are get shifted. As we process the unstaged changes we keep track of an adjustment map (how many lines were added/removed for each line - at what line number) and apply this to the staged changes to put the line numbers in the correct place.
Creates handler if not present. Also should fix the key error (when handler isn't present) in #138
Would love to test this. Is there an easy way to install |
No there is not, but you can install it very easily with git. If you need On Thursday, February 6, 2014, Raynos (Jake Verbaten) <
|
Will this be finished? |
I understand. Thank you very much. |
This would be great, I just made a reset(ustage)/checkout of selected hunk in the git package. kemayo/sublime-text-git#404 With the gutter having no difference between the two it is a bit hard knowing which one to use. |
This would be very useful If it gets updated I might try the PR, just warn me |
This still being looked at? |
I havn't done much about GitGutter at all as most of its features are part of core ST right now. I thought about a more "lightweight" variant to handle stuff, which is not yet part of the core, but hesitated due to some incompatibilities it would imply. I played around with solutions about displaying staged/unstaged changes but the required changes are quite huge and I ran into several issues which were not so easy to handle. Abandoned those work in the end. I personally got used to use Sublime Merge for more sophisticated comparisons, so havn't the need to push that feature into GitGutter. Don't even know how to properly mark it in the gutter as we default to ST's default minidiff if it is available. |
f34b421
to
ee362a7
Compare
No description provided.