Compare two commits
curl --request GET \
--url https://nemonist.com/api/v1/folders/{id}/compare/{basehead} \
--header 'Authorization: Bearer <token>'import requests
url = "https://nemonist.com/api/v1/folders/{id}/compare/{basehead}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://nemonist.com/api/v1/folders/{id}/compare/{basehead}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"base_commit": {
"id": "<string>",
"at": "<string>",
"message": "<string>",
"authors": [
"<string>"
],
"stats": {
"files": 123,
"additions": 123,
"deletions": 123
},
"paths": [
"<string>"
],
"html_url": "<string>",
"tags": [
"<string>"
],
"session": "<string>",
"started_by": "<string>",
"turn_url": "<string>",
"today": true
},
"head_commit": {
"id": "<string>",
"at": "<string>",
"message": "<string>",
"authors": [
"<string>"
],
"stats": {
"files": 123,
"additions": 123,
"deletions": 123
},
"paths": [
"<string>"
],
"html_url": "<string>",
"tags": [
"<string>"
],
"session": "<string>",
"started_by": "<string>",
"turn_url": "<string>",
"today": true
},
"status": "<string>",
"ahead_by": 123,
"behind_by": 123,
"total_commits": 123,
"commits": [
{
"id": "<string>",
"at": "<string>",
"message": "<string>",
"authors": [
"<string>"
],
"stats": {
"files": 123,
"additions": 123,
"deletions": 123
},
"paths": [
"<string>"
],
"html_url": "<string>",
"tags": [
"<string>"
],
"session": "<string>",
"started_by": "<string>",
"turn_url": "<string>"
}
],
"files": [
{
"path": "<string>",
"status": "<string>",
"uncertain": true,
"additions": 123,
"deletions": 123,
"changes": 123,
"patch": "<string>",
"patch_omitted": "<string>",
"reason": "<string>",
"html_url": "<string>"
}
],
"merge_base_commit": {
"id": "<string>",
"at": "<string>",
"message": "<string>",
"authors": [
"<string>"
],
"stats": {
"files": 123,
"additions": 123,
"deletions": 123
},
"paths": [
"<string>"
],
"html_url": "<string>",
"tags": [
"<string>"
],
"session": "<string>",
"started_by": "<string>",
"turn_url": "<string>",
"today": true
},
"truncated": {
"commits": true,
"files": true
},
"html_url": "<string>"
}{
"error": {
"message": "<string>",
"code": 123,
"type": "<string>"
}
}{
"error": {
"message": "<string>",
"code": 123,
"type": "<string>"
}
}{
"error": {
"message": "<string>",
"code": 123,
"type": "<string>"
}
}{
"error": {
"message": "<string>",
"code": 123,
"type": "<string>"
}
}{
"error": {
"message": "<string>",
"code": 123,
"type": "<string>"
}
}{
"error": {
"message": "<string>",
"code": 123,
"type": "<string>"
}
}Folders
Compare two commits
What changed across the whole folder between two commits, as GitHub's /compare/{base}...{head} and git diff a b. basehead is <base>...<head> or <base>..<head>; each end is a commit id, a tag or a unique prefix of 4 or more characters, and an empty head (or HEAD) means today. History is one line, so status is ahead, behind or identical, never diverged. Three dots diff the merge base (the older end) to head, as GitHub, so a head behind its base lists no files; two dots diff base to head directly. commits are head's commits base lacks, oldest first (at most 250); files are the notes that differ (at most 300). Never guessed: a note the kept history cannot rebuild at either end, or whose existence there is uncertain, is listed with status uncertain, uncertain true and no patch.
GET
/
folders
/
{id}
/
compare
/
{basehead}
Compare two commits
curl --request GET \
--url https://nemonist.com/api/v1/folders/{id}/compare/{basehead} \
--header 'Authorization: Bearer <token>'import requests
url = "https://nemonist.com/api/v1/folders/{id}/compare/{basehead}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://nemonist.com/api/v1/folders/{id}/compare/{basehead}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"base_commit": {
"id": "<string>",
"at": "<string>",
"message": "<string>",
"authors": [
"<string>"
],
"stats": {
"files": 123,
"additions": 123,
"deletions": 123
},
"paths": [
"<string>"
],
"html_url": "<string>",
"tags": [
"<string>"
],
"session": "<string>",
"started_by": "<string>",
"turn_url": "<string>",
"today": true
},
"head_commit": {
"id": "<string>",
"at": "<string>",
"message": "<string>",
"authors": [
"<string>"
],
"stats": {
"files": 123,
"additions": 123,
"deletions": 123
},
"paths": [
"<string>"
],
"html_url": "<string>",
"tags": [
"<string>"
],
"session": "<string>",
"started_by": "<string>",
"turn_url": "<string>",
"today": true
},
"status": "<string>",
"ahead_by": 123,
"behind_by": 123,
"total_commits": 123,
"commits": [
{
"id": "<string>",
"at": "<string>",
"message": "<string>",
"authors": [
"<string>"
],
"stats": {
"files": 123,
"additions": 123,
"deletions": 123
},
"paths": [
"<string>"
],
"html_url": "<string>",
"tags": [
"<string>"
],
"session": "<string>",
"started_by": "<string>",
"turn_url": "<string>"
}
],
"files": [
{
"path": "<string>",
"status": "<string>",
"uncertain": true,
"additions": 123,
"deletions": 123,
"changes": 123,
"patch": "<string>",
"patch_omitted": "<string>",
"reason": "<string>",
"html_url": "<string>"
}
],
"merge_base_commit": {
"id": "<string>",
"at": "<string>",
"message": "<string>",
"authors": [
"<string>"
],
"stats": {
"files": 123,
"additions": 123,
"deletions": 123
},
"paths": [
"<string>"
],
"html_url": "<string>",
"tags": [
"<string>"
],
"session": "<string>",
"started_by": "<string>",
"turn_url": "<string>",
"today": true
},
"truncated": {
"commits": true,
"files": true
},
"html_url": "<string>"
}{
"error": {
"message": "<string>",
"code": 123,
"type": "<string>"
}
}{
"error": {
"message": "<string>",
"code": 123,
"type": "<string>"
}
}{
"error": {
"message": "<string>",
"code": 123,
"type": "<string>"
}
}{
"error": {
"message": "<string>",
"code": 123,
"type": "<string>"
}
}{
"error": {
"message": "<string>",
"code": 123,
"type": "<string>"
}
}{
"error": {
"message": "<string>",
"code": 123,
"type": "<string>"
}
}Authorizations
Path Parameters
Response
The comparison.
A comparison of two commits.