Skip to content

Commit 3893edc

Browse files
committed
Update diff and patch media type docs
1 parent 8217081 commit 3893edc

File tree

8 files changed

+381
-22
lines changed

8 files changed

+381
-22
lines changed

changes.atom

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,47 @@
22
<feed xmlns="http://www.w3.org/2005/Atom">
33
<id>http://developer.github.com/</id>
44
<title>GitHub API Changes</title>
5-
<updated>2012-12-09T06:00:00Z</updated>
5+
<updated>2012-12-10T06:00:00Z</updated>
66
<link rel="alternate" href="http://developer.github.com/" />
77
<link rel="self" href="http://developer.github.com/changes.atom" />
88
<author>
99
<name>technoweenie</name>
1010
<uri>https://github.com/technoweenie</uri>
1111
</author>
12+
<entry>
13+
<id>tag:developer.github.com,2012-12-10:/changes/2012-12-10-Diff-and-patch-media-types/</id>
14+
<title type="html">Diff and patch media types</title>
15+
<published>2012-12-10T06:00:00Z</published>
16+
<updated>2012-12-10T06:00:00Z</updated>
17+
<author>
18+
<name>pengwynn</name>
19+
<uri>https://github.com/technoweenie</uri>
20+
</author>
21+
<link rel="alternate" href="http://developer.github.com/changes/2012-12-10-Diff-and-patch-media-types/" />
22+
<content type="html">&lt;p&gt;Starting today, you can get &lt;code&gt;.diff&lt;/code&gt; and &lt;code&gt;.patch&lt;/code&gt; content directly from the API for the following resources:&lt;/p&gt;
23+
24+
&lt;ul&gt;
25+
&lt;li&gt;&lt;a href="/v3/repos/commits/#get-a-single-commit"&gt;Commits&lt;/a&gt;&lt;/li&gt;
26+
&lt;li&gt;&lt;a href="/v3/repos/commits/#compare-two-commits"&gt;Commit comparisons&lt;/a&gt;&lt;/li&gt;
27+
&lt;li&gt;&lt;a href="/v3/pulls/#get-a-single-pull-request"&gt;Pull request&lt;/a&gt;&lt;/li&gt;
28+
&lt;/ul&gt;&lt;p&gt;Simply use the same resource URL and send either &lt;code&gt;application/vnd.github.diff&lt;/code&gt; or &lt;code&gt;application/vnd.github.patch&lt;/code&gt; in the &lt;code&gt;Accept&lt;/code&gt; header:&lt;/p&gt;
29+
30+
&lt;pre&gt;&lt;code&gt;curl -H "Accept: application/vnd.github.diff" https://api.github.com/repos/pengwynn/dotfiles/commits/aee60a4cd56fb4c6a50e60f17096fc40c0d4d72c
31+
32+
diff --git a/tmux/tmux.conf.symlink b/tmux/tmux.conf.symlink
33+
index 1f599cb..abaf625 100755
34+
--- a/tmux/tmux.conf.symlink
35+
+++ b/tmux/tmux.conf.symlink
36+
@@ -111,6 +111,7 @@ set-option -g base-index 1
37+
## enable mouse
38+
set-option -g mouse-select-pane on
39+
set-option -g mouse-select-window on
40+
+set-option -g mouse-resize-pane on
41+
set-window-option -g mode-keys vi
42+
set-window-option -g mode-mouse on
43+
# set-window-option -g monitor-activity off
44+
&lt;/code&gt;&lt;/pre&gt;</content>
45+
</entry>
1246
<entry>
1347
<id>tag:developer.github.com,2012-12-09:/changes/2012-12-09-organization-repositories-results-now-paginate/</id>
1448
<title type="html">Pagination for Organization Repository lists now paginates properly</title>
Lines changed: 261 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,261 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5+
<meta http-equiv="Content-Language" content="en-us" />
6+
<meta http-equiv="imagetoolbar" content="false" />
7+
<meta name="MSSmartTagsPreventParsing" content="true" />
8+
<title>Diff and patch media types</title>
9+
<link rel="alternate" type="application/atom+xml" title="API Changes" href="/changes.atom" />
10+
<link href="/css/reset.css" rel="stylesheet" type="text/css" />
11+
<link href="/css/960.css" rel="stylesheet" type="text/css" />
12+
<link href="/css/uv_active4d.css" rel="stylesheet" type="text/css" />
13+
<link href="/shared/css/documentation.css" media="screen" rel="stylesheet" type="text/css">
14+
<link href="/shared/css/pygments.css" media="screen" rel="stylesheet" type="text/css">
15+
<script src="/shared/js/jquery.js" type="text/javascript"></script>
16+
<script src="/shared/js/documentation.js" type="text/javascript"></script>
17+
</head>
18+
<body class="api">
19+
<div id="header-wrapper">
20+
<div id="header">
21+
<div>
22+
<a class="logo" href="/"><img src="/images/logo_developer.png" width="255" height="45" alt="GitHub:Developer" /></a>
23+
<ul class="nav">
24+
<li><a href="/v3/">API v3</a></li>
25+
<li><a href="/changes/">Changes</a></li>
26+
<li><a
27+
href="https://github.com/contact">Support</a></li>
28+
<li><a href="/changes.atom">
29+
<img src="/images/feed-icon-28x28.png" width="16" height="16" alt="GitHub API Changes Feed" />
30+
</a></li>
31+
</ul>
32+
</div>
33+
</div><!-- #header -->
34+
</div><!-- #header-wrapper -->
35+
36+
<div id="wrapper">
37+
<div class="content">
38+
<div class="change" id="/changes/2012-12-10-Diff-and-patch-media-types/">
39+
<h2 class="title">
40+
<a href="/changes/2012-12-10-Diff-and-patch-media-types/">Diff and patch media types</a>
41+
</h2>
42+
43+
<div class="meta">
44+
<div class="who_when">
45+
<img height="16" width="16" src="https://secure.gravatar.com/avatar/7e19cd5486b5d6dc1ef90e671ba52ae0?s=20&d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png" />
46+
<span class="author vcard fn">
47+
<a href="https://github.com/pengwynn">pengwynn</a>
48+
</span>
49+
<span class="published">
50+
December 10, 2012
51+
52+
</span>
53+
</div>
54+
</div>
55+
56+
57+
<p>Starting today, you can get <code>.diff</code> and <code>.patch</code> content directly from the API for the following resources:</p>
58+
59+
<ul>
60+
<li><a href="/v3/repos/commits/#get-a-single-commit">Commits</a></li>
61+
<li><a href="/v3/repos/commits/#compare-two-commits">Commit comparisons</a></li>
62+
<li><a href="/v3/pulls/#get-a-single-pull-request">Pull request</a></li>
63+
</ul><p>Simply use the same resource URL and send either <code>application/vnd.github.diff</code> or <code>application/vnd.github.patch</code> in the <code>Accept</code> header:</p>
64+
65+
<pre><code>curl -H "Accept: application/vnd.github.diff" https://api.github.com/repos/pengwynn/dotfiles/commits/aee60a4cd56fb4c6a50e60f17096fc40c0d4d72c
66+
67+
diff --git a/tmux/tmux.conf.symlink b/tmux/tmux.conf.symlink
68+
index 1f599cb..abaf625 100755
69+
--- a/tmux/tmux.conf.symlink
70+
+++ b/tmux/tmux.conf.symlink
71+
@@ -111,6 +111,7 @@ set-option -g base-index 1
72+
## enable mouse
73+
set-option -g mouse-select-pane on
74+
set-option -g mouse-select-window on
75+
+set-option -g mouse-resize-pane on
76+
set-window-option -g mode-keys vi
77+
set-window-option -g mode-mouse on
78+
# set-window-option -g monitor-activity off
79+
</code></pre>
80+
</div>
81+
82+
</div>
83+
84+
<div id="js-sidebar" class="sidebar-shell">
85+
<div class="js-toggle-list sidebar-module expandable">
86+
<ul>
87+
<li class="js-topic">
88+
<h3><a href="#" class="js-expand-btn collapsed">&nbsp;</a><a href="/v3/">Overview</a></h3>
89+
<ul class="js-guides">
90+
<li><a href="/v3/oauth/">OAuth</a></li>
91+
<li><a href="/v3/media/">Media Types</a></li>
92+
<li><a href="/v3/libraries/">Libraries</a></li>
93+
</ul>
94+
</li>
95+
<li class="js-topic">
96+
<h3><a href="#" class="js-expand-btn collapsed">&nbsp;</a><a href="/v3/activity/">Activity</a></h3>
97+
<ul class="js-guides">
98+
<li><a href="/v3/activity/events/">Events</a></li>
99+
<li><a href="/v3/activity/events/types/">Event Types</a></li>
100+
<li><a href="/v3/activity/notifications/">Notifications</a></li>
101+
<li><a href="/v3/activity/starring/">Starring</a></li>
102+
<li><a href="/v3/activity/watching/">Watching</a></li>
103+
</ul>
104+
</li>
105+
<li class="js-topic">
106+
<h3><a href="#" class="js-expand-btn collapsed">&nbsp;</a><a href="/v3/gists/">Gists</a></h3>
107+
<ul class="js-guides">
108+
<li><a href="/v3/gists/comments/">Comments</a></li>
109+
</ul>
110+
</li>
111+
<li class="js-topic">
112+
<h3><a href="#" class="js-expand-btn collapsed">&nbsp;</a><a href="/v3/git/">Git Data</a></h3>
113+
<ul class="js-guides">
114+
<li><a href="/v3/git/blobs/">Blobs</a></li>
115+
<li><a href="/v3/git/commits/">Commits</a></li>
116+
<li><a href="/v3/git/refs/">References</a></li>
117+
<li><a href="/v3/git/tags/">Tags</a></li>
118+
<li><a href="/v3/git/trees/">Trees</a></li>
119+
</ul>
120+
</li>
121+
<li class="js-topic">
122+
<h3><a href="#" class="js-expand-btn collapsed">&nbsp;</a><a href="/v3/issues/">Issues</a></h3>
123+
<ul class="js-guides">
124+
<li><a href="/v3/issues/assignees/">Assignees</a></li>
125+
<li><a href="/v3/issues/comments/">Comments</a></li>
126+
<li><a href="/v3/issues/events/">Events</a></li>
127+
<li><a href="/v3/issues/labels/">Labels</a></li>
128+
<li><a href="/v3/issues/milestones/">Milestones</a></li>
129+
</ul>
130+
</li>
131+
<li class="js-topic">
132+
<h3><a href="#" class="js-expand-btn collapsed">&nbsp;</a><a href="/v3/orgs/">Orgs</a></h3>
133+
<ul class="js-guides">
134+
<li><a href="/v3/orgs/members/">Members</a></li>
135+
<li><a href="/v3/orgs/teams/">Teams</a></li>
136+
</ul>
137+
</li>
138+
<li class="js-topic">
139+
<h3><a href="#" class="js-expand-btn collapsed">&nbsp;</a><a href="/v3/pulls/">Pull Requests</a></h3>
140+
<ul class="js-guides">
141+
<li><a href="/v3/pulls/comments/">Review Comments</a></li>
142+
</ul>
143+
</li>
144+
<li class="js-topic">
145+
<h3><a href="#" class="js-expand-btn collapsed">&nbsp;</a><a href="/v3/repos/">Repositories</a></h3>
146+
<ul class="js-guides">
147+
<li><a href="/v3/repos/collaborators/">Collaborators</a></li>
148+
<li><a href="/v3/repos/comments/">Comments</a></li>
149+
<li><a href="/v3/repos/commits/">Commits</a></li>
150+
<li><a href="/v3/repos/contents/">Contents</a></li>
151+
<li><a href="/v3/repos/downloads/">Downloads</a></li>
152+
<li><a href="/v3/repos/forks/">Forks</a></li>
153+
<li><a href="/v3/repos/keys/">Keys</a></li>
154+
<li><a href="/v3/repos/hooks/">Hooks</a></li>
155+
<li><a href="/v3/repos/merging/">Merging</a></li>
156+
<li><a href="/v3/repos/statuses/">Statuses</a></li>
157+
</ul>
158+
</li>
159+
<li class="js-topic">
160+
<h3><a href="#" class="js-expand-btn collapsed">&nbsp;</a><a href="/v3/users/">Users</a></h3>
161+
<ul class="js-guides">
162+
<li><a href="/v3/users/emails/">Emails</a></li>
163+
<li><a href="/v3/users/followers/">Followers</a></li>
164+
<li><a href="/v3/users/keys/">Keys</a></li>
165+
</ul>
166+
</li>
167+
<li class="js-topic">
168+
<h3><a href="#" class="js-expand-btn collapsed">&nbsp;</a><a href="/v3/search/">Search</a></h3>
169+
<ul class="js-guides">
170+
<li><a href="/v3/search/#search-issues">Issues</a></li>
171+
<li><a href="/v3/search/#search-repositories">Repositories</a></li>
172+
<li><a href="/v3/search/#search-users">Users</a></li>
173+
<li><a href="/v3/search/#email-search">Email</a></li>
174+
</ul>
175+
</li>
176+
<li class="js-guides"><h3><a href="/v3/gitignore/">Gitignore</a></h3></li>
177+
<li class="js-guides"><h3><a href="/v3/markdown/">Markdown</a></h3></li>
178+
</ul>
179+
</div> <!-- /sidebar-module -->
180+
<div class="sidebar-module">
181+
<p>This website is a <a href="https://github.com/github/developer.github.com" target="_blank">public GitHub repository</a>. Please help us by forking the project and adding to it.</p>
182+
</div>
183+
</div><!-- /sidebar-shell -->
184+
185+
</div><!-- #wrapper -->
186+
187+
<div id="footer" >
188+
<div class="upper_footer">
189+
<div class="footer_inner clearfix">
190+
191+
<!--[if IE]><h4 id="blacktocat_ie">GitHub Links</h4><![endif]-->
192+
<![if !IE]><h4 id="blacktocat">GitHub Links</h4><![endif]>
193+
194+
<ul class="footer_nav">
195+
<h4>GitHub</h4>
196+
<li><a href="https://github.com/about">About</a></li>
197+
<li><a href="https://github.com/blog">Blog</a></li>
198+
<li><a href="https://github.com/features">Features</a></li>
199+
<li><a href="https://github.com/contact">Contact &amp; Support</a></li>
200+
<li><a href="https://github.com/training">Training</a></li>
201+
<li><a href="http://status.github.com/">Site Status</a></li>
202+
</ul>
203+
204+
<ul class="footer_nav">
205+
<h4>Tools</h4>
206+
<li><a href="http://mac.github.com/">GitHub for Mac</a></li>
207+
<li><a href="http://mobile.github.com/">Issues for iPhone</a></li>
208+
<li><a href="https://gist.github.com">Gist: Code Snippets</a></li>
209+
<li><a href="http://enterprise.github.com/">GitHub Enterprise</a></li>
210+
<li><a href="http://jobs.github.com/">Job Board</a></li>
211+
</ul>
212+
213+
<ul class="footer_nav">
214+
<h4>Extras</h4>
215+
<li><a href="http://shop.github.com/">GitHub Shop</a></li>
216+
<li><a href="http://octodex.github.com/">The Octodex</a></li>
217+
</ul>
218+
219+
<ul class="footer_nav">
220+
<h4>Documentation</h4>
221+
<li><a href="http://help.github.com/">GitHub Help</a></li>
222+
<li><a href="http://developer.github.com/">Developer API</a></li>
223+
<li><a href="http://github.github.com/github-flavored-markdown/">GitHub Flavored Markdown</a></li>
224+
<li><a href="http://pages.github.com/">GitHub Pages</a></li>
225+
</ul>
226+
227+
</div><!-- /.site -->
228+
</div><!-- /.upper_footer -->
229+
230+
<div class="lower_footer">
231+
<div class="footer_inner clearfix">
232+
<div id="legal">
233+
<!--[if IE]><a class="home_ie" href="http://github.com">Home</a><![endif]-->
234+
<![if !IE]><a class="home" href="http://github.com">Home</a><![endif]>
235+
236+
<ul id="legal_links">
237+
<li><a href="http://help.github.com/terms-of-service/">Terms of Service</a></li>
238+
<li><a href="http://help.github.com/privacy-policy/">Privacy</a></li>
239+
<li><a href="http://help.github.com/security/">Security</a></li>
240+
</ul>
241+
242+
<p>&copy; <span id="year">year</span> GitHub Inc. All rights reserved.</p>
243+
</div><!-- /#legal or /#legal_ie-->
244+
</div><!-- /.site -->
245+
</div><!-- /.lower_footer -->
246+
</div><!-- /#footer -->
247+
<script type="text/javascript">
248+
var _gauges = _gauges || [];
249+
(function() {
250+
var t = document.createElement('script');
251+
t.type = 'text/javascript';
252+
t.async = true;
253+
t.id = 'gauges-tracker';
254+
t.setAttribute('data-site-id', '4f2038e0cb25bc1b55000003');
255+
t.src = '//secure.gaug.es/track.js';
256+
var s = document.getElementsByTagName('script')[0];
257+
s.parentNode.insertBefore(t, s);
258+
})();
259+
</script>
260+
</body>
261+
</html>

changes/index.html

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,49 @@
3737
<div class="content">
3838
<h1 id="api-changes">API Changes</h1>
3939

40+
<div class="change" id="/changes/2012-12-10-Diff-and-patch-media-types/">
41+
<h2 class="title">
42+
<a href="/changes/2012-12-10-Diff-and-patch-media-types/">Diff and patch media types</a>
43+
</h2>
44+
45+
<div class="meta">
46+
<div class="who_when">
47+
<img height="16" width="16" src="https://secure.gravatar.com/avatar/7e19cd5486b5d6dc1ef90e671ba52ae0?s=20&amp;d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png"><span class="author vcard fn">
48+
<a href="https://github.com/pengwynn">pengwynn</a>
49+
</span>
50+
<span class="published">
51+
December 10, 2012
52+
53+
</span>
54+
</div>
55+
</div>
56+
57+
<p>Starting today, you can get <code>.diff</code> and <code>.patch</code> content directly from the API for the following resources:</p>
58+
59+
<ul>
60+
<li><a href="/v3/repos/commits/#get-a-single-commit">Commits</a></li>
61+
<li><a href="/v3/repos/commits/#compare-two-commits">Commit comparisons</a></li>
62+
<li><a href="/v3/pulls/#get-a-single-pull-request">Pull request</a></li>
63+
</ul>
64+
<p>Simply use the same resource URL and send either <code>application/vnd.github.diff</code> or <code>application/vnd.github.patch</code> in the <code>Accept</code> header:</p>
65+
66+
<pre><code>curl -H "Accept: application/vnd.github.diff" https://api.github.com/repos/pengwynn/dotfiles/commits/aee60a4cd56fb4c6a50e60f17096fc40c0d4d72c
67+
68+
diff --git a/tmux/tmux.conf.symlink b/tmux/tmux.conf.symlink
69+
index 1f599cb..abaf625 100755
70+
--- a/tmux/tmux.conf.symlink
71+
+++ b/tmux/tmux.conf.symlink
72+
@@ -111,6 +111,7 @@ set-option -g base-index 1
73+
## enable mouse
74+
set-option -g mouse-select-pane on
75+
set-option -g mouse-select-window on
76+
+set-option -g mouse-resize-pane on
77+
set-window-option -g mode-keys vi
78+
set-window-option -g mode-mouse on
79+
# set-window-option -g monitor-activity off
80+
</code></pre>
81+
</div>
82+
4083
<div class="change" id="/changes/2012-12-09-organization-repositories-results-now-paginate/">
4184
<h2 class="title">
4285
<a href="/changes/2012-12-09-organization-repositories-results-now-paginate/">Pagination for Organization Repository lists now paginates properly</a>

0 commit comments

Comments
 (0)