[__git]: Change default behaviour for --mode parameter
By default it only applies to the top-level directory, that way any permissions that are specified in git are respected after cloning. Old behaviour can be obtained with the new `--mode-recursive` parameter. Closes #818.
This commit is contained in:
parent
79c3734913
commit
14f0780775
3 changed files with 13 additions and 1 deletions
|
@ -52,8 +52,11 @@ case $state_should in
|
|||
{ [ -n "$group" ] && [ "$group_is" != "$group" ]; }; then
|
||||
echo chown -R "${owner}:${group}" "$destination"
|
||||
fi
|
||||
if [ -f "$__object/parameter/mode-recursive" ]; then
|
||||
mode_recursive="-R"
|
||||
fi
|
||||
if [ -n "$mode" ]; then
|
||||
echo chmod -R "$mode" "$destination"
|
||||
echo chmod "${mode_recursive}" "$mode" "$destination"
|
||||
fi
|
||||
;;
|
||||
|
||||
|
|
|
@ -31,10 +31,18 @@ group
|
|||
|
||||
mode
|
||||
Unix permissions, suitable for chmod.
|
||||
By default it only applies to the top-level directory.
|
||||
See the mode-recursive parameter as well.
|
||||
|
||||
owner
|
||||
User to chown to.
|
||||
|
||||
BOOLEAN PARAMETERS
|
||||
------------------
|
||||
mode-recursive
|
||||
If present and --mode is passed, the given permissions will be applied
|
||||
recursively to the working directory.
|
||||
|
||||
recursive
|
||||
Passes the --recurse-submodules flag to git when cloning the repository.
|
||||
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
mode-recursive
|
||||
recursive
|
||||
shallow
|
||||
|
|
Loading…
Reference in a new issue