[PATCH] Fix compilation error when git commit message has quotes (")

Chokshi, Mitul mitul.chokshi at intel.com
Thu Apr 7 16:52:34 UTC 2016


Hi Yong,

Thanks for the review comments. I'll send the updated patch shortly.

Regards,
Mitul

-----Original Message-----
From: Yong Bakos [mailto:junk at humanoriented.com] 
Sent: Thursday, April 7, 2016 3:40 PM
To: Chokshi, Mitul <mitul.chokshi at intel.com>; wayland-devel at lists.freedesktop.org
Subject: Re: [PATCH] Fix compilation error when git commit message has quotes (")

> On Apr 7, 2016, at 3:14 AM, Chokshi, Mitul <mitul.chokshi at intel.com> wrote:
> 
> 
> Used stream editor to replace " with \"
> 
> Signed-off-by: Mitul Chokshi <mitul.chokshi at intel.com>
> ---
> Makefile.am | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Makefile.am b/Makefile.am index d1644ac..a09ea0b 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -162,7 +162,7 @@ endif
> 
> if HAVE_GIT_REPO
> src/git-version.h : $(top_srcdir)/.git/logs/HEAD
> -	$(AM_V_GEN)echo "#define BUILD_ID \"$(shell git --git-dir=$(top_srcdir)/.git describe --always --dirty) $(shell git --git-dir=$(top_srcdir)/.git log -1 --format='%s (%ci)')\"" > $@
> +	$(AM_V_GEN)echo "#define BUILD_ID \"$(shell git 
> +--git-dir=$(top_srcdir)/.git describe --always --dirty) $(shell git 
> +--git-dir=$(top_srcdir)/.git log -1 --format='%s (%ci)' | $(SED) 
> +'s|\"|\\\"|g' )\"" > $@
> else
> src/git-version.h :
> 	$(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or 
> tarball)\"" > $@
> --
> 1.9.1


Hi Mitul,
Thanks for the patch - it's something I've reviewed, but it took me time to
answer:

1) What repository/project is this for?
   Using a subject line of [PATCH weston] is preferred.
   Tip: git config --add format.subjectprefix "PATCH `basename $PWD`"

2) What problem does this fix?
   "A double-quote in a log message prematurely ends the enquoted string
   in src/git-version.h, causing an error during compilation."
   I know this is a simple patch, but writing a good commit message goes
   a long way in speeding up a review.

3) The maintainers prefer a short prefix for the first line of the commit
   message. eg: "makefile: Fix compilation error when..."

(btw, you're way more experienced than I am at this, so please forgive me if you already know all this.)

Reviewed-by: Yong Bakos <ybakos at humanoriented.com>

yong

--------------------------------------------------------------
Intel Research and Development Ireland Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263


This e-mail and any attachments may contain confidential material for the sole
use of the intended recipient(s). Any review or distribution by others is
strictly prohibited. If you are not the intended recipient, please contact the
sender and delete all copies.



More information about the wayland-devel mailing list