git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] hooks/commit-msg: add example to add Signed-off-by line to message

From
APAndy Parkins <andyparkins@gmail.com>
Date
Dec 22, 2006, 09:28 UTC
Message-ID
<200612220928.08921.andyparkins@gmail.com>
In-Reply-To
<7v64c47abv.fsf@assigned-by-dhcp.cox.net>
On Friday 2006 December 22 05:45, Junio C Hamano wrote:
> I suspect this sed script is quite wrong.  Did you test it?

I plead not guilty; cut and pasted from Johannes. In it's defence; I've been using it since he gave it to me without trouble. My patch is wrapping it a little differently, but the sed is certainly the same.

Amazingly it does work though...
>  * quoting with dq means you are losing one level of backslash
>    to the shell and sed is not seeing them.
Unusual.  It doesn't seem to apply to non-recognised escapes:

$ echo "\1\(\)\+$/" \1\(\)\+$/

>  * one-or-more regexp '+' is typically not found in sed.
Seems to be in mine (GNU sed version 4.1.5).

$ echo "xxxxxx" | sed -n 's/\(x\+\)$/MATCH/p' MATCH

> off that new change as well, I think.  So checking the last
> instance of the existing signed-off-by line, ignoring earlier
> ones, may be more preferrable.
Accepted.

Notwithstanding the fact that it seems to be working for me; I'll fix the problems you highlight and re-patch.

Andy
-- 
Dr Andy Parkins, M Eng (hons), MIEE
andyparkins@gmail.com
Previous: Junio C Hamano
Message 11 of 11 in “hooks/pre-commit: add example to add Signed-off-by line to message”
  1. hooks/pre-commit: add example to add Signed-off-by line to messageJohannes Schindelin, Nov 29, 2006
  2. Andy ParkinsDec 20, 2006
  3. hooks/pre-commit: add example to add Signed-off-by line to messageAndy Parkins, Dec 20, 2006
  4. Johannes SchindelinDec 20, 2006
  5. Junio C HamanoDec 20, 2006
  6. Johannes SchindelinDec 20, 2006
  7. Junio C HamanoDec 20, 2006
  8. Johannes SchindelinDec 21, 2006
  9. hooks/commit-msg: add example to add Signed-off-by line to messageAndy Parkins, Dec 21, 2006
  10. Junio C HamanoDec 22, 2006
  11. Andy ParkinsDec 22, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.