[Development] No Change-Id being generated for commit message
Thiago Macieira
thiago.macieira at intel.com
Thu Mar 26 18:13:26 CET 2015
On Thursday 26 March 2015 09:45:35 Mandeep Sandhu wrote:
> Is there a place from where I can get the latest copy of commit-msg
> script? I currently used the hint in the failed 'git push' error
> message to download the hook.
>From Gerrit itself.
But I can tell you what mine is and is working:
clean_message=`sed -e '
/^diff --git a\/.*/{
s///
q
}
/^Signed-off-by:/d
/^#/d
' "$MSG" | git stripspace`
The script does:
1) if it reaches a line starting with "diff --git a/ ", it stops printing
2) it removes the signed-off-by line
3) it removes any comment lines
Given a regular commit message without signed-off-by, it should make no
changes.
There's something wrong with your sed or with your shell.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Development
mailing list