• Gregory Nisbet's avatar
    [git-cl] Add option to git-cl upload to prohibit changeid manipulation. · 48d9e1e5
    Gregory Nisbet authored
    I recently encountered an error where I forgot to add a changeid locally to
    some-but-not-all commits in a stack of commits. When attempting to upload
    these commits via `git cl upload --no-squash`, I received a confusing message
    instructing me to install the Gerrit commit-msg hook even after the hook was
    installed. In order to debug this problem locally, I added the ability to
    prevent `git cl upload ...` from attempting to change the contents of
    messages. If the --no-add-changeid flag is passed, then the command will
    simply fail quasi-informatively.
    
    BUG=None
    TEST=attempted to upload this CL via `git cl upload --no-squash --no-add-changeid`, confirm that it fails.
    
    Change-Id: Id5f721c18143448db801095946f490880bb61786
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2828775Reviewed-by: 's avatarDirk Pranke <dpranke@google.com>
    Commit-Queue: Gregory Nisbet <gregorynisbet@google.com>
    48d9e1e5
git_cl.py 196 KB