From edd068e4680171b382dd69faf91609faee4e2549 Mon Sep 17 00:00:00 2001 From: Travis Chen Date: Sat, 8 Feb 2020 11:46:30 -0800 Subject: Add git-config option to set rsync put flags Provide the ability to pass flags to `rsync` when uploading. There are two ways to set the configuration: - `gcrypt.rsync-put-flags` - `remote..gcrypt-rsync-put-flags` The flags will be applied to `rsync` during uploading when using the `rsync://` backend. If `remote..gcrypt-rsync-put-flags` is set, the flags set in `gcrypt.rsync-put-flags` will not be applied to the remote ``. This change also includes documentation. We have tested with the following configurations: 1. none set 2. `git config gcrypt.rsync-put-flags "--perms --chmod=g+rX"` 3. `git config remote..rsync-put-flags "--perms --chmod=o+rX"` 4. both (2) and (3) All local files start with only owner permissions set, and umask is set to 077. In (1), no change in behavior as before, as expected. In (2), the remote files have the group permissions set, as expected. In (3), the remote files have the other permissions set, as expected. In (4), the remote files have the other permissions set, but do not have the group permissions set, as expected. Signed-off-by: Travis Chen --- README.rst | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'README.rst') diff --git a/README.rst b/README.rst index 1bfbdaf..902e15f 100644 --- a/README.rst +++ b/README.rst @@ -89,6 +89,13 @@ The following ``git-config(1)`` variables are supported: part of the participant list. You may use the per-remote version to sign different remotes using different keys. +``remote..gcrypt-rsync-put-flags`` + .. +``gcrypt.rsync-put-flags`` + Flags to be passed to ``rsync`` when uploading to a remote using the + ``rsync://`` backend. If the flags are set to a specific remote, the + global flags, if also set, will not be applied for that remote. + Environment variables ===================== -- cgit v1.2.3