github-api - Github Repo信息中的参数大小是什么意思

标签 github-api

我正在使用 Github API 来获取 repo 信息。因为有一个参数“大小”,它没有写在 github api 文档中它的确切含义。它是以字节为单位提交到存储库的代码行的大小吗?

在这里可以看到返回的响应中的大小参数
http://developer.github.com/v3/repos/

最佳答案

考虑到这些命令是针对完整存储库(列表、获取、编辑...),它应该引用该存储库中元素的完整大小,如“See the size of a github repo before cloning it?”中所述。

好像是在 Kb :

  • 对于像 example repo "HelloWorld" 这样的小型存储库:"size": 140, :一旦我克隆它,它就会在我的硬盘上注册,大小略低于 140 Kb,
  • 对于更大的存储库(如 git repo 本身,超过 40Mo: "size": 40844, )。


  • 更新(2013 年 2 月,来自 nulltokencomment)

    答案“See the size of a github repo before cloning it?”确认git alternates objects的大小以Kb为单位.

    The disk usage against the bare repository doesn't account for the shared object store and thus returns an "incomplete" value through the API call.

    关于github-api - Github Repo信息中的参数大小是什么意思,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14090214/

    相关文章:

    javascript - 哪里可以查看GitHub REST api的二次限速?

    github - 运行 GitHub 搜索 API 时缺少 PR

    github - 是否可以使用 GitHub 的 API 运行 gitblame -L 1,5 README.md 之类的东西?

    r - 使用 httr 通过 Travis-CI 在 Github 进行身份验证以及本地身份验证(本地有效,远程无效)

    curl - 从脚本访问/下载github文件的官方方式?

    graphql - 如何查询 GitHub v4 API 以获取特定标签处的目录内容?

    powershell - 使用 Invoke-WebRequest 以及用户名和密码在 GitHub API 上进行基本身份验证

    linux - 在 JSON 对象中扩展表达式的问题

    python - 屏蔽/隐藏 github 访问 token

    ruby-on-rails - 使用 github api 为 github 存储库创建 webhook