[PATCH] Documentation: update git configuration for Link: tag

Johannes Berg posted 1 patch 2 years, 7 months ago
Documentation/maintainer/configure-git.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] Documentation: update git configuration for Link: tag
Posted by Johannes Berg 2 years, 7 months ago
From: Johannes Berg <johannes.berg@intel.com>

The latest version of git (2.41.0) changed the spelling
of Message-Id to Message-ID. Adjust the perl script here
to accept both spellings.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 Documentation/maintainer/configure-git.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/maintainer/configure-git.rst b/Documentation/maintainer/configure-git.rst
index 80ae5030a590..ec0ddfb9cdd3 100644
--- a/Documentation/maintainer/configure-git.rst
+++ b/Documentation/maintainer/configure-git.rst
@@ -56,7 +56,7 @@ by adding the following hook into your git:
 	$ cat >.git/hooks/applypatch-msg <<'EOF'
 	#!/bin/sh
 	. git-sh-setup
-	perl -pi -e 's|^Message-Id:\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' "$1"
+	perl -pi -e 's|^Message-I[dD]:\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' "$1"
 	test -x "$GIT_DIR/hooks/commit-msg" &&
 		exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"}
 	:
-- 
2.41.0
Re: [PATCH] Documentation: update git configuration for Link: tag
Posted by Jonathan Corbet 2 years, 7 months ago
Johannes Berg <johannes@sipsolutions.net> writes:

> From: Johannes Berg <johannes.berg@intel.com>
>
> The latest version of git (2.41.0) changed the spelling
> of Message-Id to Message-ID. Adjust the perl script here
> to accept both spellings.
>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> ---
>  Documentation/maintainer/configure-git.rst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/maintainer/configure-git.rst b/Documentation/maintainer/configure-git.rst
> index 80ae5030a590..ec0ddfb9cdd3 100644
> --- a/Documentation/maintainer/configure-git.rst
> +++ b/Documentation/maintainer/configure-git.rst
> @@ -56,7 +56,7 @@ by adding the following hook into your git:
>  	$ cat >.git/hooks/applypatch-msg <<'EOF'
>  	#!/bin/sh
>  	. git-sh-setup
> -	perl -pi -e 's|^Message-Id:\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' "$1"
> +	perl -pi -e 's|^Message-I[dD]:\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' "$1"
>  	test -x "$GIT_DIR/hooks/commit-msg" &&

Applied, thanks.

jon
Re: [PATCH] Documentation: update git configuration for Link: tag
Posted by Greg Kroah-Hartman 2 years, 7 months ago
On Mon, Jun 19, 2023 at 11:55:34AM +0200, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
> 
> The latest version of git (2.41.0) changed the spelling
> of Message-Id to Message-ID. Adjust the perl script here
> to accept both spellings.
> 
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> ---
>  Documentation/maintainer/configure-git.rst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks for figuring this out!

Tested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>