Skip to content

Undesired commit of whitespace changes #824

Open
@DiThi

Description

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").

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions