|
@@ -1,5 +1,5 @@
|
1
|
1
|
#!/bin/sh
|
2
|
|
-# From Gerrit Code Review 2.4.2
|
|
2
|
+# From Gerrit Code Review 2.8.1
|
3
|
3
|
#
|
4
|
4
|
# Part of Gerrit Code Review (http://code.google.com/p/gerrit/)
|
5
|
5
|
#
|
|
@@ -18,6 +18,8 @@
|
18
|
18
|
# limitations under the License.
|
19
|
19
|
#
|
20
|
20
|
|
|
21
|
+unset GREP_OPTIONS
|
|
22
|
+
|
21
|
23
|
CHANGE_ID_AFTER="Bug|Issue"
|
22
|
24
|
MSG="$1"
|
23
|
25
|
|
|
@@ -37,6 +39,11 @@ add_ChangeId() {
|
37
|
39
|
return
|
38
|
40
|
fi
|
39
|
41
|
|
|
42
|
+ if test "false" = "`git config --bool --get gerrit.createChangeId`"
|
|
43
|
+ then
|
|
44
|
+ return
|
|
45
|
+ fi
|
|
46
|
+
|
40
|
47
|
# Does Change-Id: already exist? if so, exit (no change).
|
41
|
48
|
if grep -i '^Change-Id:' "$MSG" >/dev/null
|
42
|
49
|
then
|
|
@@ -152,7 +159,7 @@ add_ChangeId() {
|
152
|
159
|
if (unprinted) {
|
153
|
160
|
print "Change-Id: I'"$id"'"
|
154
|
161
|
}
|
155
|
|
- }' "$MSG" > $T && mv $T "$MSG" || rm -f $T
|
|
162
|
+ }' "$MSG" > "$T" && mv "$T" "$MSG" || rm -f "$T"
|
156
|
163
|
}
|
157
|
164
|
_gen_ChangeIdInput() {
|
158
|
165
|
echo "tree `git write-tree`"
|