(评论)
(comments)

原始链接: https://news.ycombinator.com/item?id=43941608

Screenshotbot.io 实现了 Git-upload-pack 用于更简单的 CI 集成,不再依赖于 GitHub 特定的 API,而是更广泛地采用 Git 来支持 GitLab 和 BitBucket 等平台。这种方法允许他们在 Git 层进行集成,并为 GitHub/Lab 用户带来额外的便捷性改进。 一位用户质疑了与 Azure DevOps(“multi-ack”协议)相关的特定代码排除。作者解释说 Azure DevOps 需要“multi-ack”,而 Screenshotbot 尚未支持。他们目前禁用了 Azure DevOps,并为非浅层克隆提供了备用方案。 讨论还涉及浅层克隆。虽然 Git 支持浅层克隆,但 Screenshotbot 之前要求客户避免使用它们,因为他们需要完整的 Git 提交图。使用 upload-pack 消除了此限制,允许他们即使使用浅层克隆也能通过 SSH 获取提交图。后续问题澄清说,此更改主要在于访问提交图,而不依赖于特定平台的 API。

相关文章
  • 使用 Git-upload-pack 简化 CI 集成 2025-05-10
  • (评论) 2025-05-08
  • (评论) 2025-04-10
  • (评论) 2025-05-10
  • (评论) 2025-03-23

  • 原文
    Hacker News new | past | comments | ask | show | jobs | submit login
    Using Git-upload-pack for a simpler CI integration (screenshotbot.io)
    20 points by tdrhq 1 day ago | hide | past | favorite | 8 comments










    > it also makes it easier for us to integrate with other Git providers such as GitLab, BitBucket or Phabricator.

    I worry sometimes that we've made GitHub too loadbearing so its great to see a devtools company embrace git more generally that just GitHub



    Agreed. In a personal project I'm hoping to release I've taken the approach of integrating at the Git layer, but then providing some small quality of life improvements if you're using Git{Hub,Lab} in a way that I can easily support more in the future. GitHub is not Git.


    Thanks! (author here)


    Huh, I didn't see the .lisp coming in the linked source code.

    But since T1892 is presumably their internal ticket tracker, I wonder why this got the call-out

    > (not (str:containsp "ssh.dev.azure.com" repo))

    ; https://github.com/screenshotbot/screenshotbot-oss/blob/main...



    Azure DevOps has an additional requirement that Git clients support a protocol feature called "multi-ack". We don't support it yet, and we didn't think we need it.

    Rather than blocking our roll-out on implementing multi-ack, we just disabled this for Azure DevOps for now. We do have a fallback as long as the user isn't using shallow clones.



    I'm confused. Git does have built-in support for shallow clones:

        git clone --depth=1 $repository
    
    will only fetch the latest versions of files.

    You can even use the `--filter=tree:0` option to `git clone` with `git sparse-checkout` to only fetch subsets of the repository.



    Yes, but our SaaS tool required our customers to not use sparse or shallow checkouts since we needed the git commit-graph.

    Using upload-pack allowed us to remove that constraint, since even in a shallow clone we can still get the commit graph via SSH from the remote.



    But your post seemed to indicate you already had access to the commit graph. Is this just about getting that information without depending on APIs?






    Consider applying for YC's Summer 2025 batch! Applications are open till May 13


    Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact



    Search:
    联系我们 contact @ memedata.com