`git-rv export` should not populate metadata if no review is in progress and no changes are available to be uploaded
Opened this issue · 0 comments
dhermes commented
Currently, git rv export
will run even if there are no commits, because it could potentially update the metadata, i.e. a person may want to change the issue subject without sending any changes:
git rv export --message="I didn't do anything. Ha!"
However, this still works before a review has begun, which should not occur.
Example:
- First clone a new repo
$ git clone https://github.com/GoogleCloudPlatform/git-rv
$ cd git-rv
- Do absolutely nothing
- Try to export your nothing changes
$ git rv export -r reviewer@mail.com
No output from ['git', 'diff', '--no-color', '--no-ext-diff', '--full-index', '--ignore-submodules', SOMEHASH']
and realize that upload.py
refused to upload anything, this ending the command.
- Check to make sure nothing bad happened
$ git rv getinfo
{
"reviewers": [
"reviewer@mail.com"
],
"private": false,
"remote_info": {
"url": "https://github.com/GoogleCloudPlatform/git-rv",
"last_synced": "SOMEHASH",
"remote": "origin",
"commit_hash": "SOMEHASH",
"branch": "master"
},
"server": "codereview.appspot.com"
}
Oh no!
/cc @fredsa