[Cosmetic] Commiting a gerrit ChangeId before the commit hook was installed generates confusing message
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
git-review |
New
|
Undecided
|
Unassigned |
Bug Description
I was trying to send a new version of a patch to a gerrit server from
a new computer, so I made a change with a ChangeId in the description
and tried to review it:
strainu@
strainu@
M pywikibot/page.py
Switched to branch 'archivebot'
strainu@
strainu@
strainu@
[archivebot 282ad24] Update getFileVersionH
1 file changed, 3 insertions(+), 4 deletions(-)
strainu@
Creating a git remote called "gerrit" that maps to:
Your change was committed before the commit hook was installed.
Amending the commit to add a gerrit change id.
At this point I ended the transaction, as I was confused by the last
message: I was afraid the ChangeId would have changed, causing the
patch to be attached to another review.
According to a message from the git mailing list, this is a message from git_review/cmd.py
I think git-review should not show this message if the change description
already has a change id, or at least add another message that
clarifies the fact that the change id has not changed.
Having looked at the code, I believe the best way forward would be to change that message to: "Amending the commit to add a gerrit change id if none is available."