Skip to contentSkip to conversation

Make instructions for automatic signing more reliable

PATCH Applied Paul Barker 2 participants 2 messages May 30, 2021 – May 31, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Make instructions for automatic signing more reliable

We can't assume that the git directory path is '.git' from the root of the source tree. For example, this is not the correct path if patatt is checked out as a git submodule. We should use git rev-parse --git-dir to reliably determine the git directory path. We should also surround the path in quotes in case the user has cloned patatt in a path containing spaces.

---
 README.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
README.rst +2 -2
index 924b622..70056bd 100644
@@ -184,8 +184,8 @@ Automatic signing via the sendemail-validate hook
 If everything is working well, you can start automatically signing all
 outgoing patches sent via git-send-email::
 
-    $ echo 'patatt sign --hook "${1}"' > .git/hooks/sendemail-validate
-    $ chmod a+x .git/hooks/sendemail-validate
+    $ echo 'patatt sign --hook "${1}"' > "$(git rev-parse --git-dir)/hooks/sendemail-validate"
+    $ chmod a+x "$(git rev-parse --git-dir)/hooks/sendemail-validate"
 
 PGP vs ed25519 keys considerations
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signature · 1 line
2.31.1
#1 lore raw
Quoted 6 lines · Paul Barker

We can't assume that the git directory path is '.git' from the root of the source tree. For example, this is not the correct path if patatt is checked out as a git submodule. We should use git rev-parse --git-dir to reliably determine the git directory path. We should also surround the path in quotes in case the user has cloned patatt in a path containing spaces.

Applied, thanks!

[1/1] Make instructions for automatic signing more reliable

      commit: 1fc7ed529fc07036072b79c040f083b1db1c668a

Best regards,

Signature · 1 line
Konstantin Ryabitsev <[email protected]>