Browse Source

Update the commit-msg hook to the version from Gerrit 2.6

Change-Id: Iaf21ba8d2ceea58973dbc56f0b4ece54500cd997
David Pursehouse 12 năm trước cách đây
mục cha
commit
61df418c59
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      hooks/commit-msg

+ 2 - 2
hooks/commit-msg

@@ -1,5 +1,5 @@
 #!/bin/sh
-# From Gerrit Code Review 2.5.2
+# From Gerrit Code Review 2.6
 #
 # Part of Gerrit Code Review (http://code.google.com/p/gerrit/)
 #
@@ -154,7 +154,7 @@ add_ChangeId() {
 		if (unprinted) {
 			print "Change-Id: I'"$id"'"
 		}
-	}' "$MSG" > $T && mv $T "$MSG" || rm -f $T
+	}' "$MSG" > "$T" && mv "$T" "$MSG" || rm -f "$T"
 }
 _gen_ChangeIdInput() {
 	echo "tree `git write-tree`"