You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/v3/repos/commits.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,12 +48,14 @@ patch formats.
48
48
49
49
GET /repos/:owner/:repo/compare/:base...:head
50
50
51
-
Note:Both`:base` and`:head`can beeitherbranch names in`:repo` or branch names in other repositories in the same network as`:repo`. For the latter case, use the format`user:branch`:
51
+
Both`:base` and`:head`must be branch names in`:repo`. To compare branches across other repositories in the same network as`:repo`, use the format`<USERNAME>:branch`. For example:
52
52
53
-
GET /repos/:owner/:repo/compare/user1:branchname...user2:branchname
53
+
GET /repos/:owner/:repo/compare/hubot:branchname...octocat:branchname
54
54
55
55
###Response
56
56
57
+
The response from the API is equivalent to running the`git log base..head` command; however, commits are returned in reverse chronological order.
58
+
57
59
<%= json:commit_comparison %>
58
60
59
61
Pass the appropriate[media type](/v3/media/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats.