Commit Graph

2 Commits (678f73bd0e221ed8492033d88b4205707ebbc844)

Author SHA1 Message Date
Joanna Wang 8572d4bdcd Require prompt from users to confirm submodules commit.
Bug: 1481266
Change-Id: Ib840d6e472e3709919518a294e5489ba099a6188
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4875411
Auto-Submit: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
1 year ago
Gavin Mak 50b27a5308 Add gclient installhooks to add pre-commit hook
With submodules, users can accidentally stage and commit gitlink
changes. Add a new gclient command to install a pre-commit hook to
automatically drop gitlink changes that don't correspond to a DEPS
change.

Dropping gitlinks can be bypassed by setting
SKIP_GITLINK_PRECOMMIT=1.

Bug: 1481266
Change-Id: Idd8b273e7d8e37d52627964e8ed6004d068b6b7a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4863221
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
1 year ago