Skip to content

Commit 730542a

Browse files
author
Hubot
committed
Sync changes from upstream repository
1 parent 5931fff commit 730542a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

content/v3/repos/commits.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,14 @@ patch formats.
4848

4949
GET /repos/:owner/:repo/compare/:base...:head
5050

51-
Note: Both `:base` and `:head` can be either branch 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:
5252

53-
GET /repos/:owner/:repo/compare/user1:branchname...user2:branchname
53+
GET /repos/:owner/:repo/compare/hubot:branchname...octocat:branchname
5454

5555
### Response
5656

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+
5759
<%= json :commit_comparison %>
5860

5961
Pass the appropriate [media type](/v3/media/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats.

0 commit comments

Comments
 (0)