Re: [PATCH] Document patch subject line better

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Greg, Paul,

> > Ideally either I should change my patch sending process, or I should
> > change quilt. 
> 
> Change quilt.  I have a horrible patch to my local copy of quilt that
> adds this line, it's not hard to do.
> 
> I'll work on cleaning it up and getting the change into the upstream
> version of quilt this week.

I wasn't aware of the problem, this clearly sounds like a bug to me. I
guess that picking "---" as a separator wasn't exactly a subtle choice,
but still...

The following patch fixes it for me:

Index: scripts/patchfns.in
===================================================================
RCS file: /cvsroot/quilt/quilt/scripts/patchfns.in,v
retrieving revision 1.75
diff -u -r1.75 patchfns.in
--- scripts/patchfns.in	18 Sep 2005 16:02:31 -0000	1.75
+++ scripts/patchfns.in	3 Oct 2005 20:50:23 -0000
@@ -612,7 +612,7 @@
 patch_header()
 {
 	awk '
-	$1 == "***" || $1 == "---" \
+	($1 == "***" || $1 == "---") && NF > 1 \
 		{ exit }
 	/^Index:[ \t]|^diff[ \t]|^==*$|^RCS file: |^retrieving revision [0-9]+(\.[0-9]+)*$/ \
 		{ eat = eat $0 "\n"
@@ -628,7 +628,7 @@
 	/^Index:[ \t]|^diff[ \t]|^==*$|^RCS file: |^retrieving revision [0-9]+(\.[0-9]+)*$/ \
 		{ eat = eat $0 "\n"
 		  next }
-	$1 == "***" || $1 == "---" \
+	($1 == "***" || $1 == "---") && NF > 1 \
 		{ body=1 }
 	body	{ print eat $0
 		  eat = ""


Comments?

This only prevents quilt from stripping the "---" line, it does NOT
add the line if it's not there. Doing so would require template
support, I know many users are interested and a few implementations
exist, waiting to be merged upstream, but it's not there right now.

Greg, if you have a better fix, just send it to the quilt-dev and I'll
get it applied.

-- 
Jean Delvare
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux