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

Support inline-diffs when using bat as a git pager #369

Closed
bendem opened this issue Oct 20, 2018 · 6 comments
Closed

Support inline-diffs when using bat as a git pager #369

bendem opened this issue Oct 20, 2018 · 6 comments

Comments

@bendem
Copy link

bendem commented Oct 20, 2018

Extracting this from #23 (comment)

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

@bendem Could you elaborate what that means?

I mean that git supports highlighting inside of lines, which I don't think bat does yet. That would be an awesome feature to have.

diff-highlight
screen shot 2018-10-03 at 09 35 11

no diff-highlight
screen shot 2018-10-03 at 09 36 31

@sharkdp
Copy link
Owner

sharkdp commented Dec 7, 2018

Thank you for the feedback.

I still don't really understand what this feature request is about. We do not show diffs in bat at all (and don't really plan to). We show the current version of the file and git modification markers to indicate any changes with respect to the Git index.

How exactly would you like this to be integrated in bat? Would you like to see some form of highlighted text (e.g. by using a background color) for the exact part of the line that has been modified (i.e. those lines that are now marked by ~)?

@bendem
Copy link
Author

bendem commented Dec 10, 2018

#23 is about using bat as a git pager. In that case, it is actually displaying diffs, not showing the current version of the file.

@bendem
Copy link
Author

bendem commented Dec 10, 2018

Probably a better example:
screenshot 2018-12-10 at 12 38 36

@dvogt23
Copy link

dvogt23 commented Dec 10, 2018

@sharkdp
Copy link
Owner

sharkdp commented Dec 11, 2018

#23 is about using bat as a git pager.

The original question was about that, but we decided to go another way (use libgit2 inside bat directly).

In that case, it is actually displaying diffs, not showing the current version of the file.

In the linked ticket, you wrote "I mean that git supports highlighting inside of lines, which I don't think bat does yet.", so I was thinking that you want us to implement inline-diffing in bat (see also my comment above).

Judging from the screenshot you now posted, I'm assuming this is just a bug report that the background-color highlighting is missing when piping git diff into bat. If this is the case, I don't know how to reproduce this. I don't have inline-highlighting in git diff.

I'm a little bit tired of having to guess what this is really about, so I would ask you to please write a detailed request or bug description.

@sharkdp
Copy link
Owner

sharkdp commented Jan 8, 2019

Closing this, as it's still not clear to me what this ticket is about - sorry. Happy to reopen this if there is further feedback.

@sharkdp sharkdp closed this as completed Jan 8, 2019
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

3 participants