tools.linux.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patatt][PATCH] Make instructions for automatic signing more reliable
@ 2021-05-30 16:36 Paul Barker
  2021-05-31 15:12 ` Konstantin Ryabitsev
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Barker @ 2021-05-30 16:36 UTC (permalink / raw)
  To: tools, Konstantin Ryabitsev; +Cc: 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.

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

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
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patatt][PATCH] Make instructions for automatic signing more reliable
  2021-05-30 16:36 [patatt][PATCH] Make instructions for automatic signing more reliable Paul Barker
@ 2021-05-31 15:12 ` Konstantin Ryabitsev
  0 siblings, 0 replies; 2+ messages in thread
From: Konstantin Ryabitsev @ 2021-05-31 15:12 UTC (permalink / raw)
  To: Paul Barker, tools; +Cc: Konstantin Ryabitsev

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,
-- 
Konstantin Ryabitsev <konstantin.ryabitsev@linux.dev>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-31 15:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-30 16:36 [patatt][PATCH] Make instructions for automatic signing more reliable Paul Barker
2021-05-31 15:12 ` Konstantin Ryabitsev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).