This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Invalid change detected on file execution permission #1102
Open
Description
Description
The github in atom is detecting invalid changes to file execution permission
Steps to Reproduce
~$ mkdir zed
~$ cd zed/
~/zed$ git init
Initialized empty Git repository in ~/zed/.git/
~/zed$ touch script.sh
~/zed$ ls -l
total 0
-rw-r--r-- 1 me Domain Users 0 Aug 15 11:01 script.sh
~/zed$ git add script.sh
~/zed$ git commit -m "First version"
[master (root-commit) 13d8d60] First version
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 script.sh
~/zed$ git status
On branch master
nothing to commit, working tree clean
Open zed
folder as project in Atom
At this point github in atom shows no changes
~/zed$ chmod a+x script.sh
~/zed$ ls -l
total 0
-rwxr-xr-x 1 me Domain Users 0 Aug 15 11:01 script.sh
~/zed$ git add script.sh
~/zed$ git diff --staged
diff --git a/script.sh b/script.sh
old mode 100644
new mode 100755
~/zed$ git commit -m "Change permission"
[master 9481348] Change permission
1 file changed, 0 insertions(+), 0 deletions(-)
mode change 100644 => 100755 script.sh
At this point github in Atom shows a change that git status
is not showing
If I staged the change in github in Atom it is the remove the valid execute permission
~/zed$ git status
On branch master
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: script.sh
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: script.sh
~/zed$ git diff
diff --git a/script.sh b/script.sh
old mode 100644
new mode 100755
~/zed$ git diff --staged
diff --git a/script.sh b/script.sh
old mode 100755
new mode 100644
I was expecting that github in Atom would understand that I'm in windows but I'm using cygwin that behaves like unix system. Can be by using git
from cygwin or an option to enable this behaviour.
Versions
Windows 10 - Version 1703 (OS Build 15063.483)
Atom - 1.19.1
Cygwin - CYGWIN_NT-10.0 W540-03067 2.8.2(0.313/5/3) 2017-07-12 10:58 x86_64 Cygwin
Cygwin git - 2.13.2