带有git的ReviewBoard。“似乎没有任何区别!” 但是这里有

die*_*rre 5 git review-board

我正在尝试此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 -ugit 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的基本预提交工作流如下所示:

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.
Run Code Online (Sandbox Code Playgroud)

由于我的意图是进行预提交,因此您可以向我解释为什么在我进行提交更改之前为什么没有区别?