Skip to content

Commit 2e6d8ec

Browse files
committed
fix the example urls
1 parent 388f37b commit 2e6d8ec

File tree

2 files changed

+15
-17
lines changed

2 files changed

+15
-17
lines changed

api.docurium

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"input": "include/git2",
55
"prefix": "git_",
66
"output": "docs",
7-
"branch": "gh-pages",
7+
"xbranch": "gh-pages",
88
"examples": "examples",
99
"legacy": {
1010
"input": {"src/git": ["v0.1.0"],

examples/libgit.c

+14-16
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
// to write native speed custom Git applications in any language which
44
// supports C bindings.
55
//
6-
// [This file][ex] is an example of using that API in a real, compilable C file.
7-
// Before published, this file is compiled and run to make sure it actually
8-
// runs. As the API is updated, this file will be updated to demonstrate the
9-
// new functionality. This project is [on GitHub][ex].
6+
// This file is an example of using that API in a real, compilable C file.
7+
// As the API is updated, this file will be updated to demonstrate the
8+
// new functionality.
109
//
1110
// If you're trying to write something in C using [libgit2][lg], you will also want
1211
// to check out the generated [API documentation][ap] and the [Usage Guide][ug]. We've
@@ -17,10 +16,9 @@
1716
// to work with Git at this level, check out [Chapter 9][pg] of the Pro Git book.
1817
//
1918
// [lg]: http://libgit2.github.com
20-
// [ap]: http://libgit2.github.com/libgit2/modules.html
19+
// [ap]: http://libgit2.github.com/libgit2
2120
// [ug]: http://libgit2.github.com/api.html
2221
// [pg]: http://progit.org/book/ch9-0.html
23-
// [ex]: http://github.com/schacon/libgit2-examples
2422

2523
// ### Includes
2624

@@ -38,7 +36,7 @@ int main (int argc, char** argv)
3836
// There are also [methods][me] for specifying the index file and work tree locations, here
3937
// we are assuming they are in the normal places.
4038
//
41-
// [me]: http://libgit2.github.com/libgit2/group__git__repository.html
39+
// [me]: http://libgit2.github.com/libgit2/#HEAD/group/repository
4240
git_repository *repo;
4341
git_repository_open(&repo, "/opt/libgit2-test/.git");
4442

@@ -70,7 +68,7 @@ int main (int argc, char** argv)
7068
// The object database is where the actual objects are stored in Git. For
7169
// working with raw objects, we'll need to get this structure from the
7270
// repository.
73-
// [odb]: http://libgit2.github.com/libgit2/group__git__odb.html
71+
// [odb]: http://libgit2.github.com/libgit2/#HEAD/group/odb
7472
git_odb *odb;
7573
odb = git_repository_database(repo);
7674

@@ -130,7 +128,7 @@ int main (int argc, char** argv)
130128
// #### Commit Parsing
131129
// [Parsing commit objects][pco] is simple and gives you access to all the data in the commit
132130
// - the // author (name, email, datetime), committer (same), tree, message, encoding and parent(s).
133-
// [pco]: http://libgit2.github.com/libgit2/group__git__commit.html
131+
// [pco]: http://libgit2.github.com/libgit2/#HEAD/group/commit
134132

135133
printf("\n*Commit Parsing*\n");
136134

@@ -178,7 +176,7 @@ int main (int argc, char** argv)
178176
// libgit2 provides a couple of methods to create commit objects easily as well. There are four
179177
// different create signatures, we'll just show one of them here. You can read about the other
180178
// ones in the [commit API docs][cd].
181-
// [cd]: http://libgit2.github.com/libgit2/group__git__commit.html
179+
// [cd]: http://libgit2.github.com/libgit2/#HEAD/group/commit
182180

183181
printf("\n*Commit Writing*\n");
184182
git_oid tree_id, parent_id, commit_id;
@@ -216,7 +214,7 @@ int main (int argc, char** argv)
216214
// #### Tag Parsing
217215
// You can parse and create tags with the [tag management API][tm], which functions very similarly
218216
// to the commit lookup, parsing and creation methods, since the objects themselves are very similar.
219-
// [tm]: http://libgit2.github.com/libgit2/group__git__tag.html
217+
// [tm]: http://libgit2.github.com/libgit2/#HEAD/group/tag
220218
printf("\n*Tag Parsing*\n");
221219
git_tag *tag;
222220
const char *tmessage, *tname;
@@ -244,7 +242,7 @@ int main (int argc, char** argv)
244242
// tree entry. This is not an actual object type in Git, but a useful structure for parsing and
245243
// traversing tree entries.
246244
//
247-
// [tp]: http://libgit2.github.com/libgit2/group__git__tree.html
245+
// [tp]: http://libgit2.github.com/libgit2/#HEAD/group/tree
248246
printf("\n*Tree Parsing*\n");
249247

250248
git_tree *tree;
@@ -281,7 +279,7 @@ int main (int argc, char** argv)
281279
// of the content. There is also a helper for reading a file from disk and writing it to the db and
282280
// getting the oid back so you don't have to do all those steps yourself.
283281
//
284-
// [ba]: http://libgit2.github.com/libgit2/group__git__blob.html
282+
// [ba]: http://libgit2.github.com/libgit2/#HEAD/group/blob
285283

286284
printf("\n*Blob Parsing*\n");
287285
git_blob *blob;
@@ -304,7 +302,7 @@ int main (int argc, char** argv)
304302
// were ancestors of (reachable from) a given starting point. This can allow you to create `git log`
305303
// type functionality.
306304
//
307-
// [rw]: http://libgit2.github.com/libgit2/group__git__revwalk.html
305+
// [rw]: http://libgit2.github.com/libgit2/#HEAD/group/revwalk
308306

309307
printf("\n*Revwalking*\n");
310308
git_revwalk *walk;
@@ -348,7 +346,7 @@ int main (int argc, char** argv)
348346
// The [index file API][gi] allows you to read, traverse, update and write the Git index file
349347
// (sometimes thought of as the staging area).
350348
//
351-
// [gi]: http://libgit2.github.com/libgit2/group__git__index.html
349+
// [gi]: http://libgit2.github.com/libgit2/#HEAD/group/index
352350

353351
printf("\n*Index Walking*\n");
354352

@@ -380,7 +378,7 @@ int main (int argc, char** argv)
380378
// The [reference API][ref] allows you to list, resolve, create and update references such as
381379
// branches, tags and remote references (everything in the .git/refs directory).
382380
//
383-
// [ref]: http://libgit2.github.com/libgit2/refs_8h.html
381+
// [ref]: http://libgit2.github.com/libgit2/#HEAD/group/reference
384382

385383
printf("\n*Reference Listing*\n");
386384

0 commit comments

Comments
 (0)