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

[Bug]: Wrong behavior when adding or removing a space in a string #705

Closed
1 task done
mengdaming opened this issue Jul 5, 2024 · 0 comments · Fixed by #707
Closed
1 task done

[Bug]: Wrong behavior when adding or removing a space in a string #705

mengdaming opened this issue Jul 5, 2024 · 0 comments · Fixed by #707
Assignees
Labels
bug Something isn't working S Small

Comments

@mengdaming
Copy link
Contributor

Contact Details

damien.menanteau@gmail.com

Describe the bug

When adding (or removing) a space to (from) a string value, TCR does not commit the changes at the end of its cycle.

To Reproduce

Steps to reproduce the behavior:

  1. Start TCR
  2. Start driver mode
  3. Add a space character to a string litteral in one of the production or test files, in such a way that all tests can pass
  4. Save the file
  5. This triggers a TCR cycle
  6. After build and tests have passed, TCR indicates that it won't commit any change because it considers that no files were changed since last commit.

Expected behavior

TCR should create a new commit with the added (or removed) space

Working Environment

  1. OS: Any
  2. Observed on TCR version 1.1.0, although the problem should be the same with earlier versions

Additional Context

This problem is a consequence of TCR using the option --ignore-all-space when running git diff. The original intent was to prevent TCR from commiting meaningless changes such as reformating, re-indenting, line-trailing spaces, etc, overlooking the possibility of having impactful space characters changes.
Proposal is to no longer use this flag when running git diff in order to clear this bug. Side effect will be that TCR may add extra commits that do not change the behaviour of the code.

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working S Small
Development

Successfully merging a pull request may close this issue.

1 participant