-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Filter to only include hunks? #23
Comments
Thank you for the feedback! Nice idea! I actually was on a similar track here: #12 (see
Definitely! However, maybe it would be worth to first discuss some details here in this ticket? For example, how would the command line interface (subcommand, option/flag) for that feature look like?
Yes, libgit2 sounds like the better option to me. |
I think that at this point a single flag or subcommand would be appropriate -- the assumption with a Requirements I'm confident should be part of thisThis flag/subcommand (hereafter referred to as
Unresolved questions
|
@ErichDonGubler Thank you very much for writing this up! It might take me a few days before I get back to you on this. |
What I don't really like about adding a So here is a slightly different proposal that I would like to discuss:
Edit: changed |
Your first bullet point sounds like a waaay-streamlined version of what I just proposed. I would definitely choose that over what I suggested. :) I would also vote for only doing the first bullet point as a first iteration -- I'd be happy with that, and I don't know how straightforward it would be to highlight things without the full file. |
Since we are speaking about this and it's being considered, is there any plan for also supporting diff-highlight type of highlighting? |
@bendem Could you elaborate what that means? |
I think my proposal above should be rather straightforward to implement. I think we should first (possibly in a separate PR) update the In a second step, we would then use the Git modifications and the value given in the |
I mean that git supports highlighting inside of lines, which I don't think |
@bendem Thank you for your feedback. This is not really related to this ticket. I don't currently plan to implement inline-diffs and I think that would be quite a substantial feature. If you think this should be discussed, please open a new ticket. |
That first part has been implemented in #368 |
@ErichDonGubler: Are you aware of https://github.com/dandavison/delta, which implements a pager for git diffs? |
We are aware of |
This adds a new `--diff` option that can be used to only show lines close to Git changes (added/removed/modified lines). The amount of additional context can be controlled with `--diff-context=N`. closes #23
It's been almost two years, but I finally found the time to implement this. See #940 for details and screenshot. |
This adds a new `--diff` option that can be used to only show lines close to Git changes (added/removed/modified lines). The amount of additional context can be controlled with `--diff-context=N`. closes #23
This adds a new `--diff` option that can be used to only show lines close to Git changes (added/removed/modified lines). The amount of additional context can be controlled with `--diff-context=N`. closes #23
This adds a new `--diff` option that can be used to only show lines close to Git changes (added/removed/modified lines). The amount of additional context can be controlled with `--diff-context=N`. closes #23
@sharkdp: Not enough emojis to express my excitement. :) |
This adds a new `--diff` option that can be used to only show lines close to Git changes (added/removed/modified lines). The amount of additional context can be controlled with `--diff-context=N`. closes #23
@sharkdp can you publish a new release? |
Released in v0.15.0. |
First: congrats on the release, and props for creatively putting together the pieces that make this work!
Anyway: It'd be really neat if this could be used as an alternative to the default
pager
in Git -- this is REALLY nice-looking, and I'd love to use this as a pager. Would you be open to a PR or implementing yourself a feature to filter out everything that's not a hunk in a diff? I'm not sure if this should be a special way to processdiff
/patch
files or just integrated withlibgit2
directly -- the latter is probably easier, since you're already usinglibgit2
as a dependency.The text was updated successfully, but these errors were encountered: