Skip to content

Commit 7befdf0

Browse files
committed
Updates based on docs changes
Also, caught a bunch more methods to doc.
1 parent 58d2300 commit 7befdf0

File tree

63 files changed

+2983
-415
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+2983
-415
lines changed

_sass/_layout.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ header {
249249
position:relative;
250250
top:-2px;
251251
right:-12px;
252+
white-space:nowrap;
252253

253254
span {
254255
padding-top:2px;

_sass/_syntax-highlighting.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@
2020

2121
pre {
2222
margin:0;
23+
24+
code {
25+
border:none;
26+
background:none;
27+
padding:0;
28+
}
2329
}
2430
}
2531
.highlight .hll { background-color: #d6d6d6 }

_sass/_type.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,12 @@ a {
8585
}
8686
}
8787
}
88+
89+
code {
90+
font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;
91+
background:#f8f8f8;
92+
padding:4px;
93+
border:1px solid #ededed;
94+
border-radius:3px;
95+
font-size:13px;
96+
}

api/annotated/index.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
layout: default
3+
menu_item: api
4+
title: Annotated
5+
description: Version 0.3.0
6+
menu_item: api
7+
return_to:
8+
"API Documentation Index": /api/
9+
sections:
10+
"commitFromFetchhead": "#commitFromFetchhead"
11+
"commitFromRef": "#commitFromRef"
12+
"commitId": "#commitId"
13+
"commitLookup": "#commitLookup"
14+
---
15+
16+
## <a name="commitFromFetchhead"></a><span>Annotated.</span>commitFromFetchhead <span class="tags"><span class="async">Async</span><span class="experimental">Experimental</span></span>
17+
18+
```js
19+
Annotated.commitFromFetchhead(repo, branch_name, remote_url, id).then(function(annotatedCommit) {
20+
// Use annotatedCommit
21+
});
22+
```
23+
24+
| Parameters | Type | |
25+
| --- | --- | --- |
26+
| repo | [Repository](/api/repository/) | repository that contains the given commit |
27+
| branch_name | String | name of the (remote) branch |
28+
| remote_url | String | url of the remote |
29+
| id | [Oid](/api/oid/) | |
30+
31+
| Returns | |
32+
| --- | --- |
33+
| [AnnotatedCommit](/api/annotated_commit/) | |
34+
35+
## <a name="commitFromRef"></a><span>Annotated.</span>commitFromRef <span class="tags"><span class="async">Async</span><span class="experimental">Experimental</span></span>
36+
37+
```js
38+
Annotated.commitFromRef(repo, ref).then(function(annotatedCommit) {
39+
// Use annotatedCommit
40+
});
41+
```
42+
43+
| Parameters | Type | |
44+
| --- | --- | --- |
45+
| repo | [Repository](/api/repository/) | repository that contains the given reference |
46+
| ref | [Reference](/api/reference/) | reference to use to lookup the git_annotated_commit |
47+
48+
| Returns | |
49+
| --- | --- |
50+
| [AnnotatedCommit](/api/annotated_commit/) | |
51+
52+
## <a name="commitId"></a><span>Annotated.</span>commitId <span class="tags"><span class="sync">Sync</span><span class="experimental">Experimental</span></span>
53+
54+
```js
55+
var oid = Annotated.commitId(commit);
56+
```
57+
58+
| Parameters | Type | |
59+
| --- | --- | --- |
60+
| commit | [AnnotatedCommit](/api/annotated_commit/) | |
61+
62+
| Returns | |
63+
| --- | --- |
64+
| [Oid](/api/oid/) | commit id |
65+
66+
## <a name="commitLookup"></a><span>Annotated.</span>commitLookup <span class="tags"><span class="async">Async</span><span class="experimental">Experimental</span></span>
67+
68+
```js
69+
Annotated.commitLookup(repo, id).then(function(annotatedCommit) {
70+
// Use annotatedCommit
71+
});
72+
```
73+
74+
| Parameters | Type | |
75+
| --- | --- | --- |
76+
| repo | [Repository](/api/repository/) | repository that contains the given commit |
77+
| id | [Oid](/api/oid/) | the commit object id to lookup |
78+
79+
| Returns | |
80+
| --- | --- |
81+
| [AnnotatedCommit](/api/annotated_commit/) | |
82+

api/attr/index.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,94 @@ menu_item: api
77
return_to:
88
"API Documentation Index": /api/
99
sections:
10+
"addMacro": "#addMacro"
11+
"cacheFlush": "#cacheFlush"
12+
"get": "#get"
13+
"getMany": "#getMany"
14+
"value": "#value"
1015
"STATES": "#STATES"
1116
---
1217

18+
## <a name="addMacro"></a><span>Attr.</span>addMacro <span class="tags"><span class="sync">Sync</span></span>
19+
20+
```js
21+
var result = Attr.addMacro(repo, name, values);
22+
```
23+
24+
| Parameters | Type | |
25+
| --- | --- | --- |
26+
| repo | [Repository](/api/repository/) | |
27+
| name | String | |
28+
| values | String | |
29+
30+
| Returns | |
31+
| --- | --- |
32+
| Number | |
33+
34+
## <a name="cacheFlush"></a><span>Attr.</span>cacheFlush <span class="tags"><span class="sync">Sync</span></span>
35+
36+
```js
37+
Attr.cacheFlush(repo);
38+
```
39+
40+
| Parameters | Type | |
41+
| --- | --- | --- |
42+
| repo | [Repository](/api/repository/) | |
43+
44+
## <a name="get"></a><span>Attr.</span>get <span class="tags"><span class="async">Async</span></span>
45+
46+
```js
47+
Attr.get(repo, flags, path, name).then(function(string) {
48+
// Use string
49+
});
50+
```
51+
52+
| Parameters | Type | |
53+
| --- | --- | --- |
54+
| repo | [Repository](/api/repository/) | The repository containing the path. |
55+
| flags | Number | A combination of GIT_ATTR_CHECK... flags. |
56+
| path | String | The path to check for attributes. Relative paths are interpreted relative to the repo root. The file does not have to exist, but if it does not, then it will be treated as a plain file (not a directory). |
57+
| name | String | The name of the attribute to look up. |
58+
59+
| Returns | |
60+
| --- | --- |
61+
| String | Output of the value of the attribute. Use the GIT_ATTR_...
62+
macros to test for TRUE, FALSE, UNSPECIFIED, etc. or just
63+
use the string value for attributes set to a value. You
64+
should NOT modify or free this value. |
65+
66+
## <a name="getMany"></a><span>Attr.</span>getMany <span class="tags"><span class="sync">Sync</span></span>
67+
68+
```js
69+
var array = Attr.getMany(repo, flags, path, num_attr, names);
70+
```
71+
72+
| Parameters | Type | |
73+
| --- | --- | --- |
74+
| repo | [Repository](/api/repository/) | The repository containing the path. |
75+
| flags | Number | A combination of GIT_ATTR_CHECK... flags. |
76+
| path | String | The path inside the repo to check attributes. This does not have to exist, but if it does not, then it will be treated as a plain file (i.e. not a directory). |
77+
| num_attr | Number | The number of attributes being looked up |
78+
| names | String | An array of num_attr strings containing attribute names. |
79+
80+
| Returns | |
81+
| --- | --- |
82+
| Array | |
83+
84+
## <a name="value"></a><span>Attr.</span>value <span class="tags"><span class="sync">Sync</span></span>
85+
86+
```js
87+
var result = Attr.value(attr);
88+
```
89+
90+
| Parameters | Type | |
91+
| --- | --- | --- |
92+
| attr | String | The attribute |
93+
94+
| Returns | |
95+
| --- | --- |
96+
| Number | the value type for the attribute |
97+
1398
## <a name="STATES"></a><span>Attr.</span>STATES <span class="tags"><span class="enum">ENUM</span></span>
1499

15100
| Flag | Value |

api/blame/index.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ return_to:
88
"API Documentation Index": /api/
99
sections:
1010
"file": "#file"
11+
"initOptions": "#initOptions"
1112
"#buffer": "#buffer"
1213
"#getHunkByIndex": "#getHunkByIndex"
1314
"#getHunkByLine": "#getHunkByLine"
@@ -31,7 +32,22 @@ Blame.file(repo, path, options).then(function(blame) {
3132

3233
| Returns | |
3334
| --- | --- |
34-
| [Blame](/api/blame/) | pointer that will receive the blame object |
35+
| [Blame](/api/blame/) | |
36+
37+
## <a name="initOptions"></a><span>Blame.</span>initOptions <span class="tags"><span class="sync">Sync</span><span class="experimental">Experimental</span></span>
38+
39+
```js
40+
var result = Blame.initOptions(opts, version);
41+
```
42+
43+
| Parameters | Type | |
44+
| --- | --- | --- |
45+
| opts | [BlameOptions](/api/blame_options/) | The `git_blame_options` struct to initialize |
46+
| version | Number | Version of struct; pass `GIT_BLAME_OPTIONS_VERSION` |
47+
48+
| Returns | |
49+
| --- | --- |
50+
| Number | Zero on success; -1 on failure. |
3551

3652
## <a name="buffer"></a><span>Blame#</span>buffer <span class="tags"><span class="async">Async</span><span class="experimental">Experimental</span></span>
3753

@@ -48,7 +64,7 @@ blame.buffer(buffer, buffer_len).then(function(blame) {
4864

4965
| Returns | |
5066
| --- | --- |
51-
| [Blame](/api/blame/) | pointer that will receive the resulting blame data |
67+
| [Blame](/api/blame/) | |
5268

5369
## <a name="getHunkByIndex"></a><span>Blame#</span>getHunkByIndex <span class="tags"><span class="sync">Sync</span><span class="experimental">Experimental</span></span>
5470

@@ -84,7 +100,6 @@ var blameHunk = blame.getHunkByLine(lineno);
84100
var result = blame.getHunkCount();
85101
```
86102

87-
88103
| Returns | |
89104
| --- | --- |
90105
| Number | |

0 commit comments

Comments
 (0)