diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-06-27 11:19:39 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-06-27 11:19:39 -0300 |
commit | b171b4bf6091c1b3482b7ac3c14e1672f10c6950 (patch) | |
tree | d7df9c7c8848d163d89e0dbd670e431e08fd1bdb /mailimport | |
parent | 605f1e11883603ebdff5393dba81e084dbd41f12 (diff) | |
download | mediapointer-dvb-s2-b171b4bf6091c1b3482b7ac3c14e1672f10c6950.tar.gz mediapointer-dvb-s2-b171b4bf6091c1b3482b7ac3c14e1672f10c6950.tar.bz2 |
Improves commit message scripts
From: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch improves message description sanity rules:
- mailimport now prefers to edit using editdiff. This helps to fix
trivial CodingStyle errors at receive patches;
- hghead.pl will now remove blank whitespaces if no body exists;
- "make commit" will now run hghead.pl. This will do some sanity checks
at commit messages:
*) Will warrant that "from:" metatag exists, avoiding to have patches without
proper authorship id at someone's else tree;
*) Will order the tags at the expected way (subject, from, body, signatures);
*) Will warrant that one and just one blank line exists between each of the four
parts of the commit message.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'mailimport')
-rwxr-xr-x | mailimport | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/mailimport b/mailimport index 76364aeea..bd6d36c2e 100755 --- a/mailimport +++ b/mailimport @@ -34,7 +34,7 @@ edit_patch() mv $tmp/$newfile $next; fi echo Editing $next - $EDITOR $next + $ED $next } #################################################################### @@ -80,7 +80,7 @@ apply_patch () { if [ "`grep '^Bad:' $TMP2`" != "" ]; then echo "*** ERROR: Patch bad formed. Please fix." sleep 1 - $EDITOR $next + $ED $next cont=1 fi done @@ -214,8 +214,20 @@ if [ "$TMPDIR" == "" ]; then TMPDIR=/tmp fi -if [ "$EDITOR" == "" ]; then - EDITOR="nano -w" +if [ "`which editdiff`" != "" ]; then + ED="editdiff" +else + ED=$EDITOR +fi + +if [ "$ED" == "" ]; then + if [ "`which nano`" != "" ]; then + ED="nano -w" + elif [ "`which pico`" != "" ]; then + ED="pico -w" + else + ED="vi" + fi fi if [ "$CHECKPATCH" == "" ]; then |