experimental/tools: set-change-id-hook

No-Try: true
Change-Id: I585d14f9614fc9b1ae03b04bb838e79d1efc2bb2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226511
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
This commit is contained in:
Hal Canary 2019-07-10 12:28:23 -04:00 committed by Skia Commit-Bot
parent f9fcf7ffa8
commit c726ca637b
2 changed files with 9 additions and 3 deletions

View File

@ -10,9 +10,7 @@ This command sets up a Git commit-message hook to add a unique Change-Id to
each commit. Gerrit only accepts changes with a Change-Id and uses it to
identify which review a change applies to.
curl -Lo "$(git rev-parse --git-dir)/hooks/commit-msg"
'https://gerrit-review.googlesource.com/tools/hooks/commit-msg'
chmod +x "$(git rev-parse --git-dir)/hooks/commit-msg"
experimental/tools/set-change-id-hook
If you acquired Skia from a mirror (such as github), you need to change the
`origin` remote to point to point to googlesource. Advanced uses will note

View File

@ -0,0 +1,8 @@
#! /bin/sh
# Copyright 2019 Google LLC
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
SRC='https://gerrit-review.googlesource.com/tools/hooks/commit-msg'
cd "$(dirname "$0")/.."
HOOK="$(git rev-parse --git-dir)/hooks/commit-msg"
curl -L -o "$HOOK" "$SRC" && chmod +x "$HOOK"