我正在尝试此codereview工具。我在使用git时遇到问题。这是输出git status:
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: path/to/something/modified.js
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .gitignore
# .reviewboardrc
Run Code Online (Sandbox Code Playgroud)
如果我尝试post-review --guess-summary --guess-description -p在此状态下运行,则会收到以下消息:
似乎没有任何差异!
现在,如果我运行git add -u,git status则是:
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: path/to/something/modified.js
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .gitignore
# .reviewboardrc
Run Code Online (Sandbox Code Playgroud)
在这种情况下,如果我再次运行,post-review --guess-summary --guess-description -p我仍然会收到相同的消息:
似乎没有任何差异!
在这一点上,如果我使用命令来提交它,则会收到git commit -m "my commit"以下消息(很明显):
[master 027e044]我的提交1文件已更改,1插入(+)
然后再次运行post-review命令,我的输出是:
Review request #22 posted.
http://192.168.133.218/r/22/
Run Code Online (Sandbox Code Playgroud)
这让我感到困惑,因为如果您要阅读ReviewBoard常见问题解答,则会看到以下消息:
git的基本预提交工作流如下所示:
Run Code Online (Sandbox Code Playgroud)Clone the central repository. Make a change you want reviewed, but do not commit it yet. Run post-review (or otherwise submit a diff). Get reviews, update your change as needed. When the change is marked to ship, commit it to master and push it to the origin.
由于我的意图是进行预提交,因此您可以向我解释为什么在我进行提交更改之前为什么没有区别?