]> code.ossystems Code Review - openembedded-core.git/commitdiff
send-pull-request: Use current date in mail headers
authorDarren Hart <dvhart@linux.intel.com>
Mon, 20 Dec 2010 18:42:44 +0000 (10:42 -0800)
committerRichard Purdie <rpurdie@linux.intel.com>
Tue, 21 Dec 2010 09:29:12 +0000 (09:29 +0000)
Some users experience problems viewing the pull requests as a sequential
mail series due to the script using the git commit date for the patches
and today's date for the cover letter.

Address this by renaming the email Date: header to Old-Date: and adding
a new Date: header with a current timestamp.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Reported-by: Gary Thomas <gary@mlbassoc.com>
Cc: Josh Lock <josh@linux.intel.com>
scripts/send-pull-request

index 0576a5dd44189982691974352286bbcc191616c2..03a78f9b1e3d7c9658baf8a1ef91342a8aa170e6 100755 (executable)
@@ -118,7 +118,11 @@ if [ "$cont" == "y" ] || [ "$cont" == "Y" ]; then
         # 
         # Use tail to remove the email envelope from git or formail as
         # msmtp (sendmail) would choke on them.
-        cat $PATCH | formail -I "To: $TO" -I "CC: $CC" | tail -n +2 | sendmail -t
+        #
+        # Modify the patch date for sequential delivery, but retain the
+        # original date as "Old-Date".
+        DATE=$(date +"%a, %d %b %Y %k:%M:%S %z")
+        cat $PATCH | formail -I "To: $TO" -I "CC: $CC" -i "Date: $DATE" | tail -n +2 | sendmail -t
         if [ $? -eq 1 ]; then
             ERROR=1
         fi