Skip to content
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

add/remove individual lines to/from staging in the diff view #337

Closed
snoblenet opened this issue Nov 29, 2018 · 5 comments
Closed

add/remove individual lines to/from staging in the diff view #337

snoblenet opened this issue Nov 29, 2018 · 5 comments

Comments

@snoblenet
Copy link

I would love it if we could add/remove individual lines to/from staging in the diff view.

I imagine:

  • j and k to move up and down in diff view
  • current line in diff view highlighted somehow (configurable UI)
  • a margin indicator for each line showing whether it is staged (and/or staged lines are in the bold font or colour reversed)
  • c to toggle whether the current line is staged
@jesseduffield
Copy link
Owner

This is one of the features I want most in the app. I'm not sure how to go about it though, it will probably require having a look to see what similar git-ui apps do in terms of which git commands to call or how the required patch files would be generated

@snoblenet
Copy link
Author

Looks complex. But you might get somewhere parsing the output of git add -e?

@jesseduffield
Copy link
Owner

I've whipped up a PR that I think does the job pretty well. The only issue is that once you've staged a file there's no clear way of how to reverse it. Either way please let me know your thoughts on that PR :)

@snoblenet
Copy link
Author

thanks i will take it for a spin after work

@jesseduffield
Copy link
Owner

closing due to inactivity. Let me know if there is something you'd like to see changed or added to the current implementation :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants