desktop / desktop/desktop

Permission changes are classified as whitespace changes

Open
#11,685 4 comments 1 reaction 0 assignees View on GitHub
bug priority-3
Dominant language
TypeScript
Stars
21.8k
Forks
10.5k
Avg merge
1d 15h
Merged PRs (30d)
25

Description

### Describe the bug

Even though file permissions are unrelated to whitespace, both the staged and commit change views will incorrectly report that a change to file permissions is a change to whitespace.

### Version & OS

- **GitHub Desktop:** 2.6.4
- **Operating System:** macOS Big Sur 11.2.2

### Steps to reproduce the behavior

1. Run `chmod +x `
2. Select the file in GitHub Desktop
3. Run `git diff `
4. Observe that GitHub Desktop reports "Only file permission changes found"

### Expected behavior

When the 'hide whitespace changes' option is enabled, the view should display "No content changes found", or if a more specific message is desired, both views should display "Only file permission changes found".

### Actual behavior

If the 'hide whitespace changes' option is enabled, the view displays "Only whitespace changes found". Otherwise, it displays "No content changes found".

### Screenshots

!["Only whitespace changes found" after changing file permissions](https://user-images.githubusercontent.com/24855774/109868187-58cef080-7c35-11eb-8d8e-bb303b8654e2.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.