summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/guilt/files/improve_auto_header_gen.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/guilt/files/improve_auto_header_gen.patch')
-rw-r--r--meta/recipes-devtools/guilt/files/improve_auto_header_gen.patch71
1 files changed, 0 insertions, 71 deletions
diff --git a/meta/recipes-devtools/guilt/files/improve_auto_header_gen.patch b/meta/recipes-devtools/guilt/files/improve_auto_header_gen.patch
deleted file mode 100644
index fa7dd8ae00..0000000000
--- a/meta/recipes-devtools/guilt/files/improve_auto_header_gen.patch
+++ /dev/null
@@ -1,71 +0,0 @@
1guilt: improve the generation of an automatic header
2
3Patches that do not have a proper header are encountered when generating
4a tree. This improves the detection of these patches and generates a sane
5header so the eventual commit will be coherent
6
7Upstream-Status: Inappropriate [oe-specific]
8
9Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
10
11---
12
13 guilt | 24 ++++++++++++++++++------
14 1 file changed, 18 insertions(+), 6 deletions(-)
15
16--- a/guilt
17+++ b/guilt
18@@ -591,7 +591,12 @@ commit()
19 fi
20
21 # last try: make a default commit message if patch doesn't contain one
22- [ ! -s "$TMP_MSG" ] && echo "auto_msg: patch $pname" > "$TMP_MSG"
23+ if [ ! -s "$TMP_MSG" ]; then
24+ echo "auto_msg: importing `basename $pname`" > "$TMP_MSG"
25+ echo "" >> "$TMP_MSG"
26+ echo "This is an automatic import of patch $pname, no headers were" >> "$TMP_MSG"
27+ echo "detected and a default message was constructed" >> "$TMP_MSG"
28+ fi
29
30
31 if [ "$header_type" = "guilt" ]; then
32@@ -599,12 +604,14 @@ commit()
33 # extract a From line from the patch header, and set
34 # GIT_AUTHOR_{NAME,EMAIL}
35 author_str=`sed -n -e '/^From:/ { s/^From: //; p; q }; /^(diff |---)/ q' "$p"`
36- if [ ! -z "$author_str" ]; then
37- GIT_AUTHOR_NAME=`echo $author_str | sed -e 's/ *<.*$//'`
38- export GIT_AUTHOR_NAME="${GIT_AUTHOR_NAME:-" "}"
39- export GIT_AUTHOR_EMAIL="`echo $author_str | sed -e 's/[^<]*//'`"
40+ if [ -z "$author_str" ]; then
41+ author_str="auto commit <unknown@unknown>"
42 fi
43
44+ GIT_AUTHOR_NAME=`echo $author_str | sed -e 's/ *<.*$//'`
45+ export GIT_AUTHOR_NAME="${GIT_AUTHOR_NAME:-" "}"
46+ export GIT_AUTHOR_EMAIL="`echo $author_str | sed -e 's/[^<]*//'`"
47+
48
49 # check in the patch for a subject
50 SUBJECT="$(sed -n '/^Subject/ s/Subject: //p' "$p")"
51@@ -615,6 +622,11 @@ commit()
52 if [ ${#SUBJECT} -gt 60 ]; then
53 SUBJECT=${SUBJECT: -60}
54 fi
55+
56+ # remove the line from the tmp msg
57+ mv "$TMP_MSG" "$TMP_MSG.work"
58+ cat "$TMP_MSG.work" | grep -v -E ".*$SUBJECT.*" > "$TMP_MSG"
59+ rm "$TMP_MSG.work"
60 fi
61
62 if [ -z "$SUBJECT" ]; then
63@@ -629,7 +641,7 @@ commit()
64
65 SUBJECT=`echo $SUBJECT | sed s'%^ *%%'`
66
67- if [ ! -z "$SUBJECT" ]; then
68+ if [ -n "$SUBJECT" ]; then
69 echo "$SUBJECT" >> $TMP_MSG.subject
70 echo "" >> $TMP_MSG.subject
71 cat "$TMP_MSG" >> $TMP_MSG.subject