Re: [PATCH] Document patch subject line better

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

 



Greg wrote (of the "---" line):
> No, my fix just always added it.

My preference would be to only add the "---" line
when starting with a brand new, empty patch file.

If an existing version of the patch file exists,
then just copy over the entire header (up to the
first actual patch) as is, no change.  If I choose
to edit the patch file header and remove the "---"
line, or do any other edit to it (short of creating
a line that looks like the start of a patch) then
quilt should respect that.

The following patch seems to accomplish this.

--- refresh.old	2005-10-03 17:31:41.000000000 -0700
+++ refresh	2005-10-03 20:02:04.000000000 -0700
@@ -247,7 +247,9 @@ fi
 
 mkdir -p $(dirname $patch_file)
 
-if ! cat_file $patch_file | patch_header > $tmp_header
+[ -s $patch_file ] || echo -e "\n---\n" > $tmp_header
+
+if ! cat_file $patch_file | patch_header >> $tmp_header
 then
 	die 1
 fi


-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <[email protected]> 1.925.600.0401
-
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