Skip to content

x/review/git-codereview: give an error if the Change-Id: line is deleted #10386

@minux

Description

@minux

I think this is the reason why some CLs have more than one Gerrit
CL.

Given that using the same change to open a fresh new gerrit CL is
rarely needed, I think git-codereview should error out if the user
deletes the Change-Id: line (with git change).

And we can add a -f option to override the error (I'm also fine with
let the user git commit --amend to manually remove the Change-Id.)

Of course, git-codereview probably can't detect the case where
the user has used git commit --amend to remove the Change-Id,
but our contribution guideline uses git change, so the proposed
check should catch most problems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions