История изменений
Исправление slovazap, (текущая версия) :
Вот этот момент, можно поподробнее? Что-то всякие git show, log, diff-tree хотят локальную репу.
При чём тут git? API github.
% curl https://api.github.com/repos/openglredbook/examples/contents/include\?ref=f3f94c7ed38034a6cf751dd713aa55f8580dc9b
[
{
"name": "CheckError.h",
"path": "include/CheckError.h",
"sha": "be040fe75ec800bca4383529730a4fcbe4ac740e",
"size": 1281,
"url": "https://api.github.com/repos/openglredbook/examples/contents/include/CheckError.h?ref=f3f94c7ed38034a6cf751dd713aa55f8580dc9b",
"html_url": "https://github.com/openglredbook/examples/blob/f3f94c7ed38034a6cf751dd713aa55f8580dc9b/include/CheckError.h",
"git_url": "https://api.github.com/repos/openglredbook/examples/git/blobs/be040fe75ec800bca4383529730a4fcbe4ac740e",
"download_url": "https://raw.githubusercontent.com/openglredbook/examples/f3f94c7ed38034a6cf751dd713aa55f8580dc9b/include/CheckError.h",
"type": "file",
"_links": {
"self": "https://api.github.com/repos/openglredbook/examples/contents/include/CheckError.h?ref=f3f94c7ed38034a6cf751dd713aa55f8580dc9b",
"git": "https://api.github.com/repos/openglredbook/examples/git/blobs/be040fe75ec800bca4383529730a4fcbe4ac740e",
"html": "https://github.com/openglredbook/examples/blob/f3f94c7ed38034a6cf751dd713aa55f8580dc9b/include/CheckError.h"
}
},
{
"name": "GL",
"path": "include/GL",
"sha": "bd3a7677d7ba9535ab2d7bfa0b69659d46722274",
"size": 0,
"url": "https://api.github.com/repos/openglredbook/examples/contents/include/GL?ref=f3f94c7ed38034a6cf751dd713aa55f8580dc9b",
"html_url": "https://github.com/openglredbook/examples/tree/f3f94c7ed38034a6cf751dd713aa55f8580dc9b/include/GL",
"git_url": "https://api.github.com/repos/openglredbook/examples/git/trees/bd3a7677d7ba9535ab2d7bfa0b69659d46722274",
"download_url": null,
"type": "dir",
"_links": {
"self": "https://api.github.com/repos/openglredbook/examples/contents/include/GL?ref=f3f94c7ed38034a6cf751dd713aa55f8580dc9b",
"git": "https://api.github.com/repos/openglredbook/examples/git/trees/bd3a7677d7ba9535ab2d7bfa0b69659d46722274",
"html": "https://github.com/openglredbook/examples/tree/f3f94c7ed38034a6cf751dd713aa55f8580dc9b/include/GL"
}
},
{
"name": "GL3",
"path": "include/GL3",
"sha": "83ac14980b9489ad73d4885dd00030086dc160dc",
"size": 0,
"url": "https://api.github.com/repos/openglredbook/examples/contents/include/GL3?ref=f3f94c7ed38034a6cf751dd713aa55f8580dc9b",
"html_url": "https://github.com/openglredbook/examples/tree/f3f94c7ed38034a6cf751dd713aa55f8580dc9b/include/GL3",
"git_url": "https://api.github.com/repos/openglredbook/examples/git/trees/83ac14980b9489ad73d4885dd00030086dc160dc",
"download_url": null,
"type": "dir",
"_links": {
"self": "https://api.github.com/repos/openglredbook/examples/contents/include/GL3?ref=f3f94c7ed38034a6cf751dd713aa55f8580dc9b",
"git": "https://api.github.com/repos/openglredbook/examples/git/trees/83ac14980b9489ad73d4885dd00030086dc160dc",
"html": "https://github.com/openglredbook/examples/tree/f3f94c7ed38034a6cf751dd713aa55f8580dc9b/include/GL3"
}
},
...
]
Надеюсь с тем чтобы распарсить json и применить подход рекурсивно к директориям проблем не возникнет.
Исходная версия slovazap, :
Вот этот момент, можно поподробнее? Что-то всякие git show, log, diff-tree хотят локальную репу.
При чём тут git? API github.
% curl https://api.github.com/repos/openglredbook/examples/contents/include\?ref=f3f94c7ed38034a6cf751dd713aa55f8580dc9b
[
{
"name": "CheckError.h",
"path": "include/CheckError.h",
"sha": "be040fe75ec800bca4383529730a4fcbe4ac740e",
"size": 1281,
"url": "https://api.github.com/repos/openglredbook/examples/contents/include/CheckError.h?ref=f3f94c7ed38034a6cf751dd713aa55f8580dc9b",
"html_url": "https://github.com/openglredbook/examples/blob/f3f94c7ed38034a6cf751dd713aa55f8580dc9b/include/CheckError.h",
"git_url": "https://api.github.com/repos/openglredbook/examples/git/blobs/be040fe75ec800bca4383529730a4fcbe4ac740e",
"download_url": "https://raw.githubusercontent.com/openglredbook/examples/f3f94c7ed38034a6cf751dd713aa55f8580dc9b/include/CheckError.h",
"type": "file",
"_links": {
"self": "https://api.github.com/repos/openglredbook/examples/contents/include/CheckError.h?ref=f3f94c7ed38034a6cf751dd713aa55f8580dc9b",
"git": "https://api.github.com/repos/openglredbook/examples/git/blobs/be040fe75ec800bca4383529730a4fcbe4ac740e",
"html": "https://github.com/openglredbook/examples/blob/f3f94c7ed38034a6cf751dd713aa55f8580dc9b/include/CheckError.h"
}
},
{
"name": "GL",
"path": "include/GL",
"sha": "bd3a7677d7ba9535ab2d7bfa0b69659d46722274",
"size": 0,
"url": "https://api.github.com/repos/openglredbook/examples/contents/include/GL?ref=f3f94c7ed38034a6cf751dd713aa55f8580dc9b",
"html_url": "https://github.com/openglredbook/examples/tree/f3f94c7ed38034a6cf751dd713aa55f8580dc9b/include/GL",
"git_url": "https://api.github.com/repos/openglredbook/examples/git/trees/bd3a7677d7ba9535ab2d7bfa0b69659d46722274",
"download_url": null,
"type": "dir",
"_links": {
"self": "https://api.github.com/repos/openglredbook/examples/contents/include/GL?ref=f3f94c7ed38034a6cf751dd713aa55f8580dc9b",
"git": "https://api.github.com/repos/openglredbook/examples/git/trees/bd3a7677d7ba9535ab2d7bfa0b69659d46722274",
"html": "https://github.com/openglredbook/examples/tree/f3f94c7ed38034a6cf751dd713aa55f8580dc9b/include/GL"
}
},
{
"name": "GL3",
"path": "include/GL3",
"sha": "83ac14980b9489ad73d4885dd00030086dc160dc",
"size": 0,
"url": "https://api.github.com/repos/openglredbook/examples/contents/include/GL3?ref=f3f94c7ed38034a6cf751dd713aa55f8580dc9b",
"html_url": "https://github.com/openglredbook/examples/tree/f3f94c7ed38034a6cf751dd713aa55f8580dc9b/include/GL3",
"git_url": "https://api.github.com/repos/openglredbook/examples/git/trees/83ac14980b9489ad73d4885dd00030086dc160dc",
"download_url": null,
"type": "dir",
"_links": {
"self": "https://api.github.com/repos/openglredbook/examples/contents/include/GL3?ref=f3f94c7ed38034a6cf751dd713aa55f8580dc9b",
"git": "https://api.github.com/repos/openglredbook/examples/git/trees/83ac14980b9489ad73d4885dd00030086dc160dc",
"html": "https://github.com/openglredbook/examples/tree/f3f94c7ed38034a6cf751dd713aa55f8580dc9b/include/GL3"
}
},
...
]