我正在尝试创建一个后置合并钩子脚本,它只在从特定分支合并时运行。如何确定更改来自于哪个分支的特定提交的名称?
例如:
if $from_specific_branch == 1 then
git diff --name-status HEAD@{1} HEAD "some_folder" |
while read st file; do
#skip deleted
if [ "$st" == 'D' ]; then continue; fi
# .. do something with those files
end