From 550cf16f98984a22cfb25354e9f37f86bcfe5c13 Mon Sep 17 00:00:00 2001 From: Documentation Generation Date: Thu, 1 Aug 2019 09:36:07 +0000 Subject: generated docs --- ex/v0.23.1/general.html | 84 ++++++++++++++++++++++++------------------------- 1 file changed, 42 insertions(+), 42 deletions(-) (limited to 'ex/v0.23.1/general.html') diff --git a/ex/v0.23.1/general.html b/ex/v0.23.1/general.html index 26ecf31fa..2b6c520ba 100644 --- a/ex/v0.23.1/general.html +++ b/ex/v0.23.1/general.html @@ -190,7 +190,7 @@ and work tree locations, here we assume they are in the normal places.

const char *repo_path = (argc > 1) ? argv[1] : "/opt/libgit2-test/.git"; git_repository *repo; - error = git_repository_open(&repo, repo_path); + error = git_repository_open(&repo, repo_path); check_error(error, "opening repository"); @@ -229,7 +229,7 @@ key we're working with.

  git_oid oid;
-  git_oid_fromstr(&oid, hex);
+ git_oid_fromstr(&oid, hex); @@ -266,7 +266,7 @@ char hex value.

If you have a oid, you can easily get the hex value of the SHA as well.

-
  git_oid_fmt(out, &oid);
+        
  git_oid_fmt(out, &oid);
   printf("SHA hex string: %s\n", out);
@@ -293,7 +293,7 @@ repository.

  git_odb *odb;
-  git_repository_odb(&odb, repo);
+ git_repository_odb(&odb, repo);
@@ -403,7 +403,7 @@ Notice that we have to specify the object type as the git_otype enu generated when the object was written to our database.

-
  git_oid_fmt(out, &oid);
+        
  git_oid_fmt(out, &oid);
   printf("Written Object: %s\n", out);
@@ -455,7 +455,7 @@ data in the commit - the author (name, email, datetime), committer
  printf("\n*Commit Parsing*\n");
 
   git_commit *commit;
-  git_oid_fromstr(&oid, "8496071c1b46c854b31185ea97743be6a8774479");
+  git_oid_fromstr(&oid, "8496071c1b46c854b31185ea97743be6a8774479");
 
   error = git_commit_lookup(&commit, repo, &oid);
   check_error(error, "looking up commit");
@@ -511,7 +511,7 @@ technically have any number, though it's rare to have more than two.

for (p = 0;p < parents;p++) { git_commit *parent; git_commit_parent(&parent, commit, p); - git_oid_fmt(out, git_commit_id(parent)); + git_oid_fmt(out, git_commit_id(parent)); printf("Parent: %s\n", out); git_commit_free(parent); }
@@ -569,9 +569,9 @@ values for the name and email should be found in the user.name and example file to see how to access config values.

-
  git_signature_new((git_signature **)&author,
+        
  git_signature_new((git_signature **)&author,
       "Scott Chacon", "schacon@gmail.com", 123456789, 60);
-  git_signature_new((git_signature **)&cmtter,
+  git_signature_new((git_signature **)&cmtter,
       "Scott A Chacon", "scott@github.com", 987654321, 90);
@@ -585,9 +585,9 @@ parents. Here we're creating oid objects to create the commit with, but you can also use

-
  git_oid_fromstr(&tree_id, "f60079018b664e4e79329a7ef9559c8d9e0378d1");
-  git_tree_lookup(&tree, repo, &tree_id);
-  git_oid_fromstr(&parent_id, "5b5b025afb0b4c913b4c338a42934a3863bf3644");
+        
  git_oid_fromstr(&tree_id, "f60079018b664e4e79329a7ef9559c8d9e0378d1");
+  git_tree_lookup(&tree, repo, &tree_id);
+  git_oid_fromstr(&parent_id, "5b5b025afb0b4c913b4c338a42934a3863bf3644");
   git_commit_lookup(&parent, repo, &parent_id);
@@ -621,7 +621,7 @@ the values we need to create the commit. The SHA key is written to the

Now we can take a look at the commit SHA we've generated.

-
  git_oid_fmt(out, &commit_id);
+        
  git_oid_fmt(out, &commit_id);
   printf("New Commit: %s\n", out);
@@ -661,9 +661,9 @@ methods, since the objects themselves are very similar.

the same way that we would a commit (or any other object).

-
  git_oid_fromstr(&oid, "b25fa35b38051e4ae45d4222e795f9df2e43f1d1");
+        
  git_oid_fromstr(&oid, "b25fa35b38051e4ae45d4222e795f9df2e43f1d1");
 
-  error = git_tag_lookup(&tag, repo, &oid);
+  error = git_tag_lookup(&tag, repo, &oid);
   check_error(error, "looking up tag");
@@ -678,10 +678,10 @@ the target object (usually 'commit'), the name ('v1.0'), the tag git_signature - name, email, timestamp), and the tag message.

-
  git_tag_target((git_object **)&commit, tag);
-  tname = git_tag_name(tag);		// "test"
-  ttype = git_tag_target_type(tag);	// GIT_OBJ_COMMIT (otype enum)
-  tmessage = git_tag_message(tag);	// "tag message\n"
+        
  git_tag_target((git_object **)&commit, tag);
+  tname = git_tag_name(tag);		// "test"
+  ttype = git_tag_target_type(tag);	// GIT_OBJ_COMMIT (otype enum)
+  tmessage = git_tag_message(tag);	// "tag message\n"
   printf("Tag Message: %s\n", tmessage);
 
   git_commit_free(commit);
@@ -723,8 +723,8 @@ tree entries.

Create the oid and lookup the tree object just like the other objects.

-
  git_oid_fromstr(&oid, "2a741c18ac5ff082a7caaec6e74db3075a1906b5");
-  git_tree_lookup(&tree, repo, &oid);
+
  git_oid_fromstr(&oid, "2a741c18ac5ff082a7caaec6e74db3075a1906b5");
+  git_tree_lookup(&tree, repo, &oid);
@@ -736,11 +736,11 @@ tree entries.

if you want to.

-
  size_t cnt = git_tree_entrycount(tree); // 3
+        
  size_t cnt = git_tree_entrycount(tree); // 3
   printf("tree entries: %d\n", (int)cnt);
 
-  entry = git_tree_entry_byindex(tree, 0);
-  printf("Entry name: %s\n", git_tree_entry_name(entry)); // "hello.c"
+ entry = git_tree_entry_byindex(tree, 0); + printf("Entry name: %s\n", git_tree_entry_name(entry)); // "hello.c"
@@ -752,8 +752,8 @@ if you want to.

entry you're looking for.

-
  entry = git_tree_entry_byname(tree, "README");
-  git_tree_entry_name(entry); // "hello.c"
+
  entry = git_tree_entry_byname(tree, "README");
+  git_tree_entry_name(entry); // "hello.c"
@@ -766,7 +766,7 @@ entry you're looking for.

get the mode if you want.

-
  git_tree_entry_to_object(&objt, repo, entry); // blob
+
  git_tree_entry_to_object(&objt, repo, entry); // blob
@@ -808,7 +808,7 @@ don't have to do all those steps yourself.

  printf("\n*Blob Parsing*\n");
   git_blob *blob;
 
-  git_oid_fromstr(&oid, "1385f264afb75a56a5bec74243be9b367ba4ca08");
+  git_oid_fromstr(&oid, "1385f264afb75a56a5bec74243be9b367ba4ca08");
   git_blob_lookup(&blob, repo, &oid);
@@ -856,7 +856,7 @@ can allow you to create git log type functionality.

git_revwalk *walk; git_commit *wcommit; - git_oid_fromstr(&oid, "5b5b025afb0b4c913b4c338a42934a3863bf3644");
+ git_oid_fromstr(&oid, "5b5b025afb0b4c913b4c338a42934a3863bf3644");
@@ -874,9 +874,9 @@ branch1..branch2, you would push the oid of branch2 and hide of branch1.

-
  git_revwalk_new(&walk, repo);
-  git_revwalk_sorting(walk, GIT_SORT_TOPOLOGICAL | GIT_SORT_REVERSE);
-  git_revwalk_push(walk, &oid);
+        
  git_revwalk_new(&walk, repo);
+  git_revwalk_sorting(walk, GIT_SORT_TOPOLOGICAL | GIT_SORT_REVERSE);
+  git_revwalk_push(walk, &oid);
 
   const git_signature *cauth;
   const char *cmsg;
@@ -894,7 +894,7 @@ at by the returned OID; note that this operation is specially fast since the raw contents of the commit object will be cached in memory

-
  while ((git_revwalk_next(&oid, walk)) == 0) {
+        
  while ((git_revwalk_next(&oid, walk)) == 0) {
     error = git_commit_lookup(&wcommit, repo, &oid);
   check_error(error, "looking up commit during revwalk");
 
@@ -917,7 +917,7 @@ walked it not deallocated while the walk is in progress, or it will
 result in undefined behavior

- + @@ -957,7 +957,7 @@ index file with git_index_open_bare(). The index for the repository will be located and loaded from disk.

-
  git_repository_index(&index, repo);
+
  git_repository_index(&index, repo);
@@ -1019,7 +1019,7 @@ out all available references and the object SHA they resolve to.

  git_strarray ref_list;
-  git_reference_list(&ref_list, repo);
+  git_reference_list(&ref_list, repo);
 
   const char *refname;
   git_reference *ref;
@@ -1036,16 +1036,16 @@ one at a time and resolve them to the SHA, then print both values out.

  for (i = 0; i < ref_list.count; ++i) {
     refname = ref_list.strings[i];
-    git_reference_lookup(&ref, repo, refname);
+    git_reference_lookup(&ref, repo, refname);
 
-    switch (git_reference_type(ref)) {
+    switch (git_reference_type(ref)) {
     case GIT_REF_OID:
-      git_oid_fmt(out, git_reference_target(ref));
+      git_oid_fmt(out, git_reference_target(ref));
       printf("%s [%s]\n", refname, out);
       break;
 
     case GIT_REF_SYMBOLIC:
-      printf("%s => %s\n", refname, git_reference_symbolic_target(ref));
+      printf("%s => %s\n", refname, git_reference_symbolic_target(ref));
       break;
     default:
       fprintf(stderr, "Unexpected reference type\n");
@@ -1053,7 +1053,7 @@ one at a time and resolve them to the SHA, then print both values out.

} } - git_strarray_free(&ref_list);
+ git_strarray_free(&ref_list);
@@ -1112,7 +1112,7 @@ in any of the accessible config file locations (system, global, local).

-
  git_repository_free(repo);
+        
  git_repository_free(repo);
 
   return 0;
 }
-- cgit v1.2.1