Tôi đang sử dụng git phiên bản 1.5.6.3, và có vẻ như git không nhận thấy chế độ của một thư mục thay đổiCách git xử lý quyền thư mục?
#create a test repository with a folder with 777 mode
:~$ mkdir -p test/folder
:~$ touch test/folder/dummy.txt
:~$ cd test
:~/test$ chmod 777 folder/
#init git repository
:~/test$ git init
Initialized empty Git repository in ~/test/.git/
:~/test$ git add .
:~/test$ git commit -m 'commit a directory'
Created initial commit 9b6b21a: commit a directory
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 folder/dummy.txt
#change folder permission to 744
:~/test$ chmod 744 folder/
:~/test$ git status
# On branch master
nothing to commit (working directory clean)
gì 04000
đứng cho?
:~/test$ git ls-tree HEAD folder
040000 tree 726c1d5f0155771348ea2daee6239791f1cd7731 folder
Đây có phải là hành vi bình thường không?
Làm cách nào để theo dõi thay đổi chế độ thư mục?
Liên quan: http://stackoverflow.com/questions/737673/how-to-read-the-mode-field-of-git-ls-trees-output –