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

Undesired commit of whitespace changes #824

Open
DiThi opened this issue Jan 21, 2025 · 0 comments
Open

Undesired commit of whitespace changes #824

DiThi opened this issue Jan 21, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@DiThi
Copy link

DiThi commented Jan 21, 2025

Steps to reproduce:

  • In a file make some change near the top.
  • Then indent some block of code further down. In my case I indent with 4 spaces.
  • Make some other change further down.
  • In gittyup all 3 changes will show in the diff view, in separate hunks.
  • In options -> diff, enable "Ignore Whitespace (-w)".
  • In gittyup now two changes appear.
  • Stage the top change only.
  • Commit.

Expected result:

Only the staged change should have been committed.

Actual result:

Both the staged change and the whitespace change were commited. Note that the change doesn't appear in the diff view until you disable the option.

This is a problem particularly with languages with significant whitespace, where I didn't notice until after I made a bunch of other commits on top of it, and undoing it is very cumbersome.

Related: #603

(Ideally we should be able to ignore non-significant whitespace (anything that is not indentation), but that's probably a feature request for the git project, not a GUI.)

Gittyup version: 1.4.0, Arch Linux (gittyup-git package from AUR, commit is 28fa70a according to "About").

@Murmele Murmele added the enhancement New feature or request label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants