gpt4 book ai didi

Post-receive githook for loop(接收后githook for循环)

转载 作者:bug小助手 更新时间:2023-10-25 18:15:53 27 4
gpt4 key购买 nike



Is there logic that can check if the push included the creation of a new file in the a files directory in git repo?

是否有逻辑可以检查推送是否包括在git repo的a文件目录中创建新文件?


I am looking to execute a python script only if the push had a new file created in the files directory.

我希望只有当推送在文件目录中创建了一个新文件时,才会执行一个python脚本。


One example uses git diff --name-only --diff-filter=A and grep

一个示例使用git diff --name-only --diff-filter=A和grep


Which does look to answer my question, how could I use a for loop to execute the python script x amount of times using each new file set as a parameter?

这确实回答了我的问题,我如何才能使用for循环将每个新文件集作为参数执行x次呢?


Eg. 3 new files added to the directory githook to then execute the python script 3 times each time passing the new file as a variable?

例.3个添加到githook目录的新文件,然后每次将新文件作为变量传递时执行3次python脚本?


更多回答
优秀答案推荐
更多回答

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com