Git objects

This commit is contained in:
Vincent Jacques
2012-03-03 08:58:15 +00:00
parent cbd7e2be65
commit 98c7953681
2 changed files with 35 additions and 13 deletions
+12 -13
View File
@@ -144,19 +144,6 @@ GitRef = GithubObject(
Editable( [ "sha" ], [ "force" ] ),
)
GitCommit = GithubObject(
"GitCommit",
BaseUrl( lambda obj: obj._repo._baseUrl + "/git/commits/" + obj.sha ),
InternalSimpleAttributes(
"sha", "url", "message",
"author", ### @todo Structure
"committer", ### @todo Structure
"tree", ### @todo Structure
"parents", ### @todo Structure
"_repo", ### Ugly hack
),
)
GitTree = GithubObject(
"GitTree",
BaseUrl( lambda obj: obj._repo._baseUrl + "/git/trees/" + obj.sha ),
@@ -167,6 +154,18 @@ GitTree = GithubObject(
),
)
GitCommit = GithubObject(
"GitCommit",
BaseUrl( lambda obj: obj._repo._baseUrl + "/git/commits/" + obj.sha ),
InternalSimpleAttributes(
"sha", "url", "message",
"parents", ### @todo Structure
"author", "committer",
"_repo", ### Ugly hack
),
InternalObjectAttribute( "tree", GitTree ),
)
GitBlob = GithubObject(
"GitBlob",
BaseUrl( lambda obj: obj._repo._baseUrl + "/git/blobs/" + obj.sha ),