0

我正在使用 chef 每分钟一次在我的生产服务器上获取更改,并且在 github 存储库中,我有 6 个 spawn-fcgi 脚本在 runit 的控制下。如果只有一个文件更改,我需要重新启动 runit 以获取更改。我的伪代码如下所示。

git fetch
for each file:
    if file changed from last sync:
       sv start myrunit
    else:
        pass

我愿意接受最佳实践方法。

谢谢

4

1 回答 1

0
git diff --name-only HEAD@{1}..HEAD

will list files changed between the previous and current checked-out commit.

于 2012-04-10T05:13:09.737 回答