File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -254,7 +254,8 @@ static int create_default_files(const char *template_path)
254
254
struct stat st2 ;
255
255
filemode = (!chmod (path , st1 .st_mode ^ S_IXUSR ) &&
256
256
!lstat (path , & st2 ) &&
257
- st1 .st_mode != st2 .st_mode );
257
+ st1 .st_mode != st2 .st_mode &&
258
+ !chmod (path , st1 .st_mode ));
258
259
}
259
260
git_config_set ("core.filemode" , filemode ? "true" : "false" );
260
261
Original file line number Diff line number Diff line change @@ -12,6 +12,13 @@ check_config () {
12
12
echo " expected a directory $1 , a file $1 /config and $1 /refs"
13
13
return 1
14
14
fi
15
+
16
+ if test_have_prereq POSIXPERM && test -x " $1 /config"
17
+ then
18
+ echo " $1 /config is executable?"
19
+ return 1
20
+ fi
21
+
15
22
bare=$( cd " $1 " && git config --bool core.bare)
16
23
worktree=$( cd " $1 " && git config core.worktree) ||
17
24
worktree=unset
You can’t perform that action at this time.
0 commit comments