signatures.lore.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Konstantin Ryabitsev <konstantin.ryabitsev@linux.dev>
To: signatures@kernel.org
Subject: [PATCH 4/5] Make instructions for automatic signing more reliable
Date: Thu,  3 Jun 2021 13:18:14 -0400	[thread overview]
Message-ID: <1fc7ed529fc07036072b79c040f083b1db1c668a.1622740672.git.konstantin.ryabitsev@linux.dev> (raw)
In-Reply-To: <7754d7d35d03b462109c4a93d625f0af21383312.1622740672.git.konstantin.ryabitsev@linux.dev>

From: Paul Barker <paul@pbarker.dev>

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>
Signed-off-by: Konstantin Ryabitsev <konstantin.ryabitsev@linux.dev>
Link: https://lore.kernel.org/r/20210530163623.926-1-paul@pbarker.dev
---
 README.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.rst b/README.rst
index b751b68..de299d1 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


  parent reply	other threads:[~2021-06-03 17:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-03 17:18 [PATCH 1/5] Fix lookups for uncommitted keys Konstantin Ryabitsev
2021-06-03 17:18 ` [PATCH 2/5] Add "frequently seen commentary" Konstantin Ryabitsev
2021-06-03 17:18 ` [PATCH 3/5] Handle MIME encoded-word & other header manglings Konstantin Ryabitsev
2021-06-03 17:18 ` Konstantin Ryabitsev [this message]
2021-06-03 17:18 ` [PATCH 5/5] Throw a NoKeyError when no matching PGP key Konstantin Ryabitsev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1fc7ed529fc07036072b79c040f083b1db1c668a.1622740672.git.konstantin.ryabitsev@linux.dev \
    --to=konstantin.ryabitsev@linux.dev \
    --cc=signatures@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).