gpt4 book ai didi

Git 推送,将消息流式传输到客户端

转载 作者:太空狗 更新时间:2023-10-29 13:53:20 30 4
gpt4 key购买 nike

假设我有一个 git 服务器。在每次推送时,我都需要启动一个进程,我可以通过一个钩子(Hook)来完成。

需要将进程的标准输出写入执行推送的 git 客户端。这与 Heroku 或 Openshift 推送非常相似。

问题是 - 如何将文本流/消息发送回 git 客户端,以便它在终端上打印出来?

最佳答案

Git Hook page确实提到:

Both standard output and standard error output are forwarded to git send-pack on the other end, so you can simply echo messages for the user.

如果您想查看脚本执行的所有命令,请不要忘记添加 set -x

关于Git 推送,将消息流式传输到客户端,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25761979/

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