diff mbox series

[patatt] Make instructions for automatic signing more reliable

Message ID 20210530163623.926-1-paul@pbarker.dev (mailing list archive)
State New, archived
Headers show
Series [patatt] Make instructions for automatic signing more reliable | expand

Commit Message

Paul Barker May 30, 2021, 4:36 p.m. UTC
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.

Signed-off-by: Paul Barker <paul@pbarker.dev>
---
 README.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Konstantin Ryabitsev May 31, 2021, 3:12 p.m. UTC | #1
On Sun, 30 May 2021 17:36:23 +0100, Paul Barker wrote:
> 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,
diff mbox series

Patch

diff --git a/README.rst b/README.rst
index 924b622..70056bd 100644
--- a/README.rst
+++ b/README.rst
@@ -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
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~