【发布时间】:2018-06-18 09:10:02
【问题描述】:
我需要获取在 post-receive 挂钩中提交的文件名。
#!/bin/bash
while read oldrev newrev refname
do
/* If updated-file == "myFile", then do a specific task */
done
如何获取更改文件的引用?
【问题讨论】:
标签: git push githooks git-post-receive
我需要获取在 post-receive 挂钩中提交的文件名。
#!/bin/bash
while read oldrev newrev refname
do
/* If updated-file == "myFile", then do a specific task */
done
如何获取更改文件的引用?
【问题讨论】:
标签: git push githooks git-post-receive
我找到了一个简单的解决方案来获取已更改文件的列表。
git diff --name-only $oldrev $newrev
【讨论】: