Re: [PATCH/POLL] git-format-patch: the default suffix is now .patch, not .txt

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

 



Andreas Ericsson wrote:
> Most have only "attach" through various means of point-and-click and
> drag-and-drop. Thunderbird too lacks the very basic ability of "include
> this file as part of the message". I still haven't been able to find an
> addon for it that does just that.

I use the External Editor extension with Thunderbird (it's mentioned in SubmittingPatches).

The script below is used as the external editor, which gives me an easy way to send patches
inline with Thunderbird.

/Lukas

#!/bin/bash

CONFFILE=~/.appprc

if [ -e "$CONFFILE" ] ; then
	LAST_DIR=`grep "^LAST_DIR=" $CONFFILE|sed -e 's/^LAST_DIR=//'`
	cd $LAST_DIR
else
	cd > /dev/null
fi

PATCH=$(zenity --file-selection)

if [ "$?" != "0" ] ; then
	#zenity --error --text "No patchfile given."
	exit 1
fi

cd - > /dev/null

SUBJECT=`sed -n -e '/^Subject: /p' $PATCH`
HEADERS=`sed -e '/^Subject: /d' $1`

echo "$SUBJECT" > $1
echo "$HEADERS" >> $1
sed -e '1,/^$/d' $PATCH >> $1

LAST_DIR=`dirname $PATCH`
sed -e 's@^LAST_DIR=.*@LAST_DIR='$LAST_DIR'@' $CONFFILE > $CONFFILE"_"
mv $CONFFILE"_" $CONFFILE

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]