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

cli: underline added/removed lines only in color-words diffs #3974

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

martinvonz
Copy link
Owner

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added tests to cover my changes

We don't want e.g. `jj diff --git` to have underlined text because
it's redundant there. This patch fixes that by adding a new `token`
label used only in the color-words diff (for now - it may be used in
git diffs in the future).

This means we could remove the `line_number` label but I left it
because there's little harm in having it and it seems like it can
still be useful.

Thanks to @yuja for noticing and suggesting the fix.
Copy link
Collaborator

@ilyagr ilyagr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me.

I still think a test would be nice, but it seems like it might show up in another PR.

+1 on keeping "line-number"; I think that would have made the tests in #3914 somewhat more readable.

I wish I could think of a better name than "token", but it's fine if we can't. Perhaps text or content? I'm unsure; we can always change it later if we think of something or once it has more uses.

@martinvonz martinvonz enabled auto-merge (rebase) June 26, 2024 21:46
@martinvonz martinvonz merged commit 848bb61 into main Jun 26, 2024
29 checks passed
@martinvonz martinvonz deleted the push-wtmpkrtvnsuy branch June 26, 2024 21:47
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

Successfully merging this pull request may close these issues.

2 participants