]> git.lizzy.rs Git - plan9front.git/commitdiff
git/branch: preserve checked in permissions on branch update
authorOri Bernstein <ori@eigenstate.org>
Sun, 13 Jun 2021 01:20:46 +0000 (01:20 +0000)
committerOri Bernstein <ori@eigenstate.org>
Sun, 13 Jun 2021 01:20:46 +0000 (01:20 +0000)
we need to copy the files, and we should copy them with the
permissions that exist in the repo.

sys/src/cmd/git/branch

index addfec4b6109a3533d383ee4edeb47f66b1dbd12..d3aa77d2bff99601631f235d119ba0c218a1bbdb 100755 (executable)
@@ -99,7 +99,7 @@ for(m in $cleanpaths){
                rm -rf .git/index9/tracked/$m
        }
        if(~ $b file){
-               cp  $basedir/tree/$m $m
+               cp -x $basedir/tree/$m $m
                walk -eq $m > .git/index9/tracked/$m
        }
 }