diff options
author | Documentation Generation <libgit2@users.noreply.github.com> | 2023-02-15 10:10:51 +0000 |
---|---|---|
committer | Documentation Generation <libgit2@users.noreply.github.com> | 2023-02-15 10:10:51 +0000 |
commit | 3a1ed52cd4eb99224de2231fdf0e7d256479cd3d (patch) | |
tree | 7da320843da12c8f51d8c0c6afc6511e8546c67b /ex | |
parent | 859a68b56869ec981e1bcdbbb41afda3b60cc18e (diff) | |
download | libgit2-3a1ed52cd4eb99224de2231fdf0e7d256479cd3d.tar.gz |
generated docs
Diffstat (limited to 'ex')
-rw-r--r-- | ex/HEAD/cat-file.html | 10 | ||||
-rw-r--r-- | ex/HEAD/fetch.html | 6 | ||||
-rw-r--r-- | ex/HEAD/general.html | 141 | ||||
-rw-r--r-- | ex/HEAD/log.html | 2 | ||||
-rw-r--r-- | ex/HEAD/ls-remote.html | 2 | ||||
-rw-r--r-- | ex/HEAD/rev-parse.html | 2 |
6 files changed, 67 insertions, 96 deletions
diff --git a/ex/HEAD/cat-file.html b/ex/HEAD/cat-file.html index 69dab68bc..53b7a14cf 100644 --- a/ex/HEAD/cat-file.html +++ b/ex/HEAD/cat-file.html @@ -132,7 +132,7 @@ <div class='highlight'><pre><span class="k">static</span> <span class="kt">void</span> <span class="nf">show_tree</span><span class="p">(</span><span class="k">const</span> <span class="n">git_tree</span> <span class="o">*</span><span class="n">tree</span><span class="p">)</span> <span class="p">{</span> <span class="kt">size_t</span> <span class="n">i</span><span class="p">,</span> <span class="n">max_i</span> <span class="o">=</span> <span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="n"><a name="git_tree_entrycount-37" class="fnlink" href="../../#HEAD/group/tree/git_tree_entrycount">git_tree_entrycount</a></span><span class="p">(</span><span class="n">tree</span><span class="p">);</span> - <span class="kt">char</span> <span class="n">oidstr</span><span class="p">[</span><span class="n">GIT_OID_SHA1_HEXSIZE</span> <span class="o">+</span> <span class="mi">1</span><span class="p">];</span> + <span class="kt">char</span> <span class="n">oidstr</span><span class="p">[</span><span class="n">GIT_OID_HEXSZ</span> <span class="o">+</span> <span class="mi">1</span><span class="p">];</span> <span class="k">const</span> <span class="n">git_tree_entry</span> <span class="o">*</span><span class="n">te</span><span class="p">;</span> <span class="k">for</span> <span class="p">(</span><span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span> <span class="n">i</span> <span class="o"><</span> <span class="n">max_i</span><span class="p">;</span> <span class="o">++</span><span class="n">i</span><span class="p">)</span> <span class="p">{</span> @@ -159,7 +159,7 @@ <div class='highlight'><pre><span class="k">static</span> <span class="kt">void</span> <span class="nf">show_commit</span><span class="p">(</span><span class="k">const</span> <span class="n">git_commit</span> <span class="o">*</span><span class="n">commit</span><span class="p">)</span> <span class="p">{</span> <span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">i</span><span class="p">,</span> <span class="n">max_i</span><span class="p">;</span> - <span class="kt">char</span> <span class="n">oidstr</span><span class="p">[</span><span class="n">GIT_OID_SHA1_HEXSIZE</span> <span class="o">+</span> <span class="mi">1</span><span class="p">];</span> + <span class="kt">char</span> <span class="n">oidstr</span><span class="p">[</span><span class="n">GIT_OID_HEXSZ</span> <span class="o">+</span> <span class="mi">1</span><span class="p">];</span> <span class="n"><a name="git_oid_tostr-25" class="fnlink" href="../../#HEAD/group/oid/git_oid_tostr">git_oid_tostr</a></span><span class="p">(</span><span class="n">oidstr</span><span class="p">,</span> <span class="k">sizeof</span><span class="p">(</span><span class="n">oidstr</span><span class="p">),</span> <span class="n"><a name="git_commit_tree_id-7" class="fnlink" href="../../#HEAD/group/commit/git_commit_tree_id">git_commit_tree_id</a></span><span class="p">(</span><span class="n">commit</span><span class="p">));</span> <span class="n">printf</span><span class="p">(</span><span class="s">"tree %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">oidstr</span><span class="p">);</span> @@ -179,7 +179,7 @@ <span class="k">static</span> <span class="kt">void</span> <span class="nf">show_tag</span><span class="p">(</span><span class="k">const</span> <span class="n">git_tag</span> <span class="o">*</span><span class="n">tag</span><span class="p">)</span> <span class="p">{</span> - <span class="kt">char</span> <span class="n">oidstr</span><span class="p">[</span><span class="n">GIT_OID_SHA1_HEXSIZE</span> <span class="o">+</span> <span class="mi">1</span><span class="p">];</span> + <span class="kt">char</span> <span class="n">oidstr</span><span class="p">[</span><span class="n">GIT_OID_HEXSZ</span> <span class="o">+</span> <span class="mi">1</span><span class="p">];</span> <span class="n"><a name="git_oid_tostr-27" class="fnlink" href="../../#HEAD/group/oid/git_oid_tostr">git_oid_tostr</a></span><span class="p">(</span><span class="n">oidstr</span><span class="p">,</span> <span class="k">sizeof</span><span class="p">(</span><span class="n">oidstr</span><span class="p">),</span> <span class="n"><a name="git_tag_target_id-31" class="fnlink" href="../../#HEAD/group/tag/git_tag_target_id">git_tag_target_id</a></span><span class="p">(</span><span class="n">tag</span><span class="p">));;</span> <span class="n">printf</span><span class="p">(</span><span class="s">"object %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">oidstr</span><span class="p">);</span> @@ -221,7 +221,7 @@ <span class="p">{</span> <span class="k">struct</span> <span class="n">catfile_options</span> <span class="n">o</span> <span class="o">=</span> <span class="p">{</span> <span class="s">"."</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span> <span class="p">};</span> <span class="n">git_object</span> <span class="o">*</span><span class="n">obj</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span> - <span class="kt">char</span> <span class="n">oidstr</span><span class="p">[</span><span class="n">GIT_OID_SHA1_HEXSIZE</span> <span class="o">+</span> <span class="mi">1</span><span class="p">];</span> + <span class="kt">char</span> <span class="n">oidstr</span><span class="p">[</span><span class="n">GIT_OID_HEXSZ</span> <span class="o">+</span> <span class="mi">1</span><span class="p">];</span> <span class="n">parse_opts</span><span class="p">(</span><span class="o">&</span><span class="n">o</span><span class="p">,</span> <span class="n">argc</span><span class="p">,</span> <span class="n">argv</span><span class="p">);</span> @@ -229,7 +229,7 @@ <span class="s">"Could not resolve"</span><span class="p">,</span> <span class="n">o</span><span class="p">.</span><span class="n">rev</span><span class="p">);</span> <span class="k">if</span> <span class="p">(</span><span class="n">o</span><span class="p">.</span><span class="n">verbose</span><span class="p">)</span> <span class="p">{</span> - <span class="kt">char</span> <span class="n">oidstr</span><span class="p">[</span><span class="n">GIT_OID_SHA1_HEXSIZE</span> <span class="o">+</span> <span class="mi">1</span><span class="p">];</span> + <span class="kt">char</span> <span class="n">oidstr</span><span class="p">[</span><span class="n">GIT_OID_HEXSZ</span> <span class="o">+</span> <span class="mi">1</span><span class="p">];</span> <span class="n"><a name="git_oid_tostr-28" class="fnlink" href="../../#HEAD/group/oid/git_oid_tostr">git_oid_tostr</a></span><span class="p">(</span><span class="n">oidstr</span><span class="p">,</span> <span class="k">sizeof</span><span class="p">(</span><span class="n">oidstr</span><span class="p">),</span> <span class="n"><a name="git_object_id-10" class="fnlink" href="../../#HEAD/group/object/git_object_id">git_object_id</a></span><span class="p">(</span><span class="n">obj</span><span class="p">));</span> <span class="n">printf</span><span class="p">(</span><span class="s">"%s %s</span><span class="se">\n</span><span class="s">--</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> diff --git a/ex/HEAD/fetch.html b/ex/HEAD/fetch.html index cac3a48cc..25e40dab4 100644 --- a/ex/HEAD/fetch.html +++ b/ex/HEAD/fetch.html @@ -88,17 +88,17 @@ an update.</p> <td class=code> <div class='highlight'><pre><span class="k">static</span> <span class="kt">int</span> <span class="nf">update_cb</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">refname</span><span class="p">,</span> <span class="k">const</span> <span class="n">git_oid</span> <span class="o">*</span><span class="n">a</span><span class="p">,</span> <span class="k">const</span> <span class="n">git_oid</span> <span class="o">*</span><span class="n">b</span><span class="p">,</span> <span class="kt">void</span> <span class="o">*</span><span class="n">data</span><span class="p">)</span> <span class="p">{</span> - <span class="kt">char</span> <span class="n">a_str</span><span class="p">[</span><span class="n">GIT_OID_SHA1_HEXSIZE</span><span class="o">+</span><span class="mi">1</span><span class="p">],</span> <span class="n">b_str</span><span class="p">[</span><span class="n">GIT_OID_SHA1_HEXSIZE</span><span class="o">+</span><span class="mi">1</span><span class="p">];</span> + <span class="kt">char</span> <span class="n">a_str</span><span class="p">[</span><span class="n">GIT_OID_HEXSZ</span><span class="o">+</span><span class="mi">1</span><span class="p">],</span> <span class="n">b_str</span><span class="p">[</span><span class="n">GIT_OID_HEXSZ</span><span class="o">+</span><span class="mi">1</span><span class="p">];</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="n">data</span><span class="p">;</span> <span class="n"><a name="git_oid_fmt-1" class="fnlink" href="../../#HEAD/group/oid/git_oid_fmt">git_oid_fmt</a></span><span class="p">(</span><span class="n">b_str</span><span class="p">,</span> <span class="n">b</span><span class="p">);</span> - <span class="n">b_str</span><span class="p">[</span><span class="n">GIT_OID_SHA1_HEXSIZE</span><span class="p">]</span> <span class="o">=</span> <span class="sc">'\0'</span><span class="p">;</span> + <span class="n">b_str</span><span class="p">[</span><span class="n">GIT_OID_HEXSZ</span><span class="p">]</span> <span class="o">=</span> <span class="sc">'\0'</span><span class="p">;</span> <span class="k">if</span> <span class="p">(</span><span class="n"><a name="git_oid_is_zero-3" class="fnlink" href="../../#HEAD/group/oid/git_oid_is_zero">git_oid_is_zero</a></span><span class="p">(</span><span class="n">a</span><span class="p">))</span> <span class="p">{</span> <span class="n">printf</span><span class="p">(</span><span class="s">"[new] %.20s %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">b_str</span><span class="p">,</span> <span class="n">refname</span><span class="p">);</span> <span class="p">}</span> <span class="k">else</span> <span class="p">{</span> <span class="n"><a name="git_oid_fmt-2" class="fnlink" href="../../#HEAD/group/oid/git_oid_fmt">git_oid_fmt</a></span><span class="p">(</span><span class="n">a_str</span><span class="p">,</span> <span class="n">a</span><span class="p">);</span> - <span class="n">a_str</span><span class="p">[</span><span class="n">GIT_OID_SHA1_HEXSIZE</span><span class="p">]</span> <span class="o">=</span> <span class="sc">'\0'</span><span class="p">;</span> + <span class="n">a_str</span><span class="p">[</span><span class="n">GIT_OID_HEXSZ</span><span class="p">]</span> <span class="o">=</span> <span class="sc">'\0'</span><span class="p">;</span> <span class="n">printf</span><span class="p">(</span><span class="s">"[updated] %.10s..%.10s %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">a_str</span><span class="p">,</span> <span class="n">b_str</span><span class="p">,</span> <span class="n">refname</span><span class="p">);</span> <span class="p">}</span> diff --git a/ex/HEAD/general.html b/ex/HEAD/general.html index d3f07ef89..c9e37c0cc 100644 --- a/ex/HEAD/general.html +++ b/ex/HEAD/general.html @@ -191,7 +191,7 @@ and work tree locations, here we assume they are in the normal places.</p> <td class=code> <div class='highlight'><pre> <span class="n">repo_path</span> <span class="o">=</span> <span class="p">(</span><span class="n">argc</span> <span class="o">></span> <span class="mi">1</span><span class="p">)</span> <span class="o">?</span> <span class="n">argv</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">:</span> <span class="s">"/opt/libgit2-test/.git"</span><span class="p">;</span> - <span class="n">error</span> <span class="o">=</span> <span class="n"><a name="git_repository_open-59" class="fnlink" href="../../#HEAD/group/repository/git_repository_open">git_repository_open</a></span><span class="p">(</span><span class="o">&</span><span class="n">repo</span><span class="p">,</span> <span class="n">repo_path</span><span class="p">);</span> + <span class="n">error</span> <span class="o">=</span> <span class="n"><a name="git_repository_open-67" class="fnlink" href="../../#HEAD/group/repository/git_repository_open">git_repository_open</a></span><span class="p">(</span><span class="o">&</span><span class="n">repo</span><span class="p">,</span> <span class="n">repo_path</span><span class="p">);</span> <span class="n">check_error</span><span class="p">(</span><span class="n">error</span><span class="p">,</span> <span class="s">"opening repository"</span><span class="p">);</span> <span class="n">oid_parsing</span><span class="p">(</span><span class="o">&</span><span class="n">oid</span><span class="p">);</span> @@ -215,7 +215,7 @@ and work tree locations, here we assume they are in the normal places.</p> <p>Finally, when you're done with the repository, you can free it as well.</p> </td> <td class=code> - <div class='highlight'><pre> <span class="n"><a name="git_repository_free-60" class="fnlink" href="../../#HEAD/group/repository/git_repository_free">git_repository_free</a></span><span class="p">(</span><span class="n">repo</span><span class="p">);</span> + <div class='highlight'><pre> <span class="n"><a name="git_repository_free-68" class="fnlink" href="../../#HEAD/group/repository/git_repository_free">git_repository_free</a></span><span class="p">(</span><span class="n">repo</span><span class="p">);</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span></pre></div> @@ -231,7 +231,7 @@ and work tree locations, here we assume they are in the normal places.</p> <td class=code> <div class='highlight'><pre><span class="k">static</span> <span class="kt">void</span> <span class="nf">oid_parsing</span><span class="p">(</span><span class="n">git_oid</span> <span class="o">*</span><span class="n">oid</span><span class="p">)</span> <span class="p">{</span> - <span class="kt">char</span> <span class="n">out</span><span class="p">[</span><span class="n">GIT_OID_SHA1_HEXSIZE</span><span class="o">+</span><span class="mi">1</span><span class="p">];</span> + <span class="kt">char</span> <span class="n">out</span><span class="p">[</span><span class="n">GIT_OID_HEXSZ</span><span class="o">+</span><span class="mi">1</span><span class="p">];</span> <span class="kt">char</span> <span class="n">hex</span><span class="p">[]</span> <span class="o">=</span> <span class="s">"4a202b346bb0fb0db7eff3cffeb3c70babbd2045"</span><span class="p">;</span> <span class="n">printf</span><span class="p">(</span><span class="s">"*Hex to Raw*</span><span class="se">\n</span><span class="s">"</span><span class="p">);</span></pre></div> @@ -250,11 +250,7 @@ this throughout the example for storing the value of the current SHA key we're working with.</p> </td> <td class=code> - <div class='highlight'><pre><span class="cp">#ifdef GIT_EXPERIMENTAL_SHA256</span> - <span class="n">git_oid_fromstr</span><span class="p">(</span><span class="n">oid</span><span class="p">,</span> <span class="n">hex</span><span class="p">,</span> <span class="n">GIT_OID_SHA1</span><span class="p">);</span> -<span class="cp">#else</span> - <span class="n">git_oid_fromstr</span><span class="p">(</span><span class="n">oid</span><span class="p">,</span> <span class="n">hex</span><span class="p">);</span> -<span class="cp">#endif</span> + <div class='highlight'><pre> <span class="n"><a name="git_oid_fromstr-48" class="fnlink" href="../../#HEAD/group/oid/git_oid_fromstr">git_oid_fromstr</a></span><span class="p">(</span><span class="n">oid</span><span class="p">,</span> <span class="n">hex</span><span class="p">);</span> <span class="cm">/*</span> <span class="cm"> * Once we've converted the string into the oid value, we can get the raw</span> @@ -264,7 +260,7 @@ key we're working with.</p> <span class="cm"> * char hex value.</span> <span class="cm"> */</span> <span class="n">printf</span><span class="p">(</span><span class="s">"</span><span class="se">\n</span><span class="s">*Raw to Hex*</span><span class="se">\n</span><span class="s">"</span><span class="p">);</span> - <span class="n">out</span><span class="p">[</span><span class="n">GIT_OID_SHA1_HEXSIZE</span><span class="p">]</span> <span class="o">=</span> <span class="sc">'\0'</span><span class="p">;</span></pre></div> + <span class="n">out</span><span class="p">[</span><span class="n">GIT_OID_HEXSZ</span><span class="p">]</span> <span class="o">=</span> <span class="sc">'\0'</span><span class="p">;</span></pre></div> </td> </tr> <tr id='section-10'> @@ -275,7 +271,7 @@ key we're working with.</p> <p>If you have a oid, you can easily get the hex value of the SHA as well.</p> </td> <td class=code> - <div class='highlight'><pre> <span class="n"><a name="git_oid_fmt-48" class="fnlink" href="../../#HEAD/group/oid/git_oid_fmt">git_oid_fmt</a></span><span class="p">(</span><span class="n">out</span><span class="p">,</span> <span class="n">oid</span><span class="p">);</span> + <div class='highlight'><pre> <span class="n"><a name="git_oid_fmt-56" class="fnlink" href="../../#HEAD/group/oid/git_oid_fmt">git_oid_fmt</a></span><span class="p">(</span><span class="n">out</span><span class="p">,</span> <span class="n">oid</span><span class="p">);</span> <span class="n">printf</span><span class="p">(</span><span class="s">"SHA hex string: %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">out</span><span class="p">);</span> <span class="p">}</span></pre></div> </td> @@ -295,7 +291,7 @@ repository.</p> <td class=code> <div class='highlight'><pre><span class="k">static</span> <span class="kt">void</span> <span class="nf">object_database</span><span class="p">(</span><span class="n">git_repository</span> <span class="o">*</span><span class="n">repo</span><span class="p">,</span> <span class="n">git_oid</span> <span class="o">*</span><span class="n">oid</span><span class="p">)</span> <span class="p">{</span> - <span class="kt">char</span> <span class="n">oid_hex</span><span class="p">[</span><span class="n">GIT_OID_SHA1_HEXSIZE</span><span class="o">+</span><span class="mi">1</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="mi">0</span> <span class="p">};</span> + <span class="kt">char</span> <span class="n">oid_hex</span><span class="p">[</span><span class="n">GIT_OID_HEXSZ</span><span class="o">+</span><span class="mi">1</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="mi">0</span> <span class="p">};</span> <span class="k">const</span> <span class="kt">unsigned</span> <span class="kt">char</span> <span class="o">*</span><span class="n">data</span><span class="p">;</span> <span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">str_type</span><span class="p">;</span> <span class="kt">int</span> <span class="n">error</span><span class="p">;</span> @@ -303,7 +299,7 @@ repository.</p> <span class="n">git_odb</span> <span class="o">*</span><span class="n">odb</span><span class="p">;</span> <span class="n">git_object_t</span> <span class="n">otype</span><span class="p">;</span> - <span class="n"><a name="git_repository_odb-63" class="fnlink" href="../../#HEAD/group/repository/git_repository_odb">git_repository_odb</a></span><span class="p">(</span><span class="o">&</span><span class="n">odb</span><span class="p">,</span> <span class="n">repo</span><span class="p">);</span></pre></div> + <span class="n"><a name="git_repository_odb-71" class="fnlink" href="../../#HEAD/group/repository/git_repository_odb">git_repository_odb</a></span><span class="p">(</span><span class="o">&</span><span class="n">odb</span><span class="p">,</span> <span class="n">repo</span><span class="p">);</span></pre></div> </td> </tr> <tr id='section-Raw_Object_Reading'> @@ -409,7 +405,7 @@ Notice that we have to specify the object type as the <code>git_otype</code> enu generated when the object was written to our database.</p> </td> <td class=code> - <div class='highlight'><pre> <span class="n"><a name="git_oid_fmt-49" class="fnlink" href="../../#HEAD/group/oid/git_oid_fmt">git_oid_fmt</a></span><span class="p">(</span><span class="n">oid_hex</span><span class="p">,</span> <span class="n">oid</span><span class="p">);</span> + <div class='highlight'><pre> <span class="n"><a name="git_oid_fmt-57" class="fnlink" href="../../#HEAD/group/oid/git_oid_fmt">git_oid_fmt</a></span><span class="p">(</span><span class="n">oid_hex</span><span class="p">,</span> <span class="n">oid</span><span class="p">);</span> <span class="n">printf</span><span class="p">(</span><span class="s">"Written Object: %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">oid_hex</span><span class="p">);</span></pre></div> </td> </tr> @@ -444,7 +440,7 @@ docs</a>.</p> <span class="n">git_tree</span> <span class="o">*</span><span class="n">tree</span><span class="p">;</span> <span class="n">git_commit</span> <span class="o">*</span><span class="n">parent</span><span class="p">;</span> <span class="n">git_signature</span> <span class="o">*</span><span class="n">author</span><span class="p">,</span> <span class="o">*</span><span class="n">committer</span><span class="p">;</span> - <span class="kt">char</span> <span class="n">oid_hex</span><span class="p">[</span><span class="n">GIT_OID_SHA1_HEXSIZE</span><span class="o">+</span><span class="mi">1</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="mi">0</span> <span class="p">};</span> + <span class="kt">char</span> <span class="n">oid_hex</span><span class="p">[</span><span class="n">GIT_OID_HEXSZ</span><span class="o">+</span><span class="mi">1</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> <span class="mi">0</span> <span class="p">};</span> <span class="n">printf</span><span class="p">(</span><span class="s">"</span><span class="se">\n</span><span class="s">*Commit Writing*</span><span class="se">\n</span><span class="s">"</span><span class="p">);</span></pre></div> </td> @@ -461,9 +457,9 @@ values for the name and email should be found in the <code>user.name</code> and example file to see how to access config values.</p> </td> <td class=code> - <div class='highlight'><pre> <span class="n"><a name="git_signature_new-70" class="fnlink" href="../../#HEAD/group/signature/git_signature_new">git_signature_new</a></span><span class="p">(</span><span class="o">&</span><span class="n">author</span><span class="p">,</span> + <div class='highlight'><pre> <span class="n"><a name="git_signature_new-78" class="fnlink" href="../../#HEAD/group/signature/git_signature_new">git_signature_new</a></span><span class="p">(</span><span class="o">&</span><span class="n">author</span><span class="p">,</span> <span class="s">"Scott Chacon"</span><span class="p">,</span> <span class="s">"schacon@gmail.com"</span><span class="p">,</span> <span class="mi">123456789</span><span class="p">,</span> <span class="mi">60</span><span class="p">);</span> - <span class="n"><a name="git_signature_new-71" class="fnlink" href="../../#HEAD/group/signature/git_signature_new">git_signature_new</a></span><span class="p">(</span><span class="o">&</span><span class="n">committer</span><span class="p">,</span> + <span class="n"><a name="git_signature_new-79" class="fnlink" href="../../#HEAD/group/signature/git_signature_new">git_signature_new</a></span><span class="p">(</span><span class="o">&</span><span class="n">committer</span><span class="p">,</span> <span class="s">"Scott A Chacon"</span><span class="p">,</span> <span class="s">"scott@github.com"</span><span class="p">,</span> <span class="mi">987654321</span><span class="p">,</span> <span class="mi">90</span><span class="p">);</span></pre></div> </td> </tr> @@ -477,14 +473,9 @@ parents. Here we're creating oid objects to create the commit with, but you can also use</p> </td> <td class=code> - <div class='highlight'><pre><span class="cp">#ifdef GIT_EXPERIMENTAL_SHA256</span> - <span class="n">git_oid_fromstr</span><span class="p">(</span><span class="o">&</span><span class="n">tree_id</span><span class="p">,</span> <span class="s">"f60079018b664e4e79329a7ef9559c8d9e0378d1"</span><span class="p">,</span> <span class="n">GIT_OID_SHA1</span><span class="p">);</span> - <span class="n">git_oid_fromstr</span><span class="p">(</span><span class="o">&</span><span class="n">parent_id</span><span class="p">,</span> <span class="s">"5b5b025afb0b4c913b4c338a42934a3863bf3644"</span><span class="p">,</span> <span class="n">GIT_OID_SHA1</span><span class="p">);</span> -<span class="cp">#else</span> - <span class="n">git_oid_fromstr</span><span class="p">(</span><span class="o">&</span><span class="n">tree_id</span><span class="p">,</span> <span class="s">"f60079018b664e4e79329a7ef9559c8d9e0378d1"</span><span class="p">);</span> - <span class="n">git_oid_fromstr</span><span class="p">(</span><span class="o">&</span><span class="n">parent_id</span><span class="p">,</span> <span class="s">"5b5b025afb0b4c913b4c338a42934a3863bf3644"</span><span class="p">);</span> -<span class="cp">#endif</span> - <span class="n"><a name="git_tree_lookup-81" class="fnlink" href="../../#HEAD/group/tree/git_tree_lookup">git_tree_lookup</a></span><span class="p">(</span><span class="o">&</span><span class="n">tree</span><span class="p">,</span> <span class="n">repo</span><span class="p">,</span> <span class="o">&</span><span class="n">tree_id</span><span class="p">);</span> + <div class='highlight'><pre> <span class="n"><a name="git_oid_fromstr-49" class="fnlink" href="../../#HEAD/group/oid/git_oid_fromstr">git_oid_fromstr</a></span><span class="p">(</span><span class="o">&</span><span class="n">tree_id</span><span class="p">,</span> <span class="s">"f60079018b664e4e79329a7ef9559c8d9e0378d1"</span><span class="p">);</span> + <span class="n"><a name="git_tree_lookup-89" class="fnlink" href="../../#HEAD/group/tree/git_tree_lookup">git_tree_lookup</a></span><span class="p">(</span><span class="o">&</span><span class="n">tree</span><span class="p">,</span> <span class="n">repo</span><span class="p">,</span> <span class="o">&</span><span class="n">tree_id</span><span class="p">);</span> + <span class="n"><a name="git_oid_fromstr-50" class="fnlink" href="../../#HEAD/group/oid/git_oid_fromstr">git_oid_fromstr</a></span><span class="p">(</span><span class="o">&</span><span class="n">parent_id</span><span class="p">,</span> <span class="s">"5b5b025afb0b4c913b4c338a42934a3863bf3644"</span><span class="p">);</span> <span class="n"><a name="git_commit_lookup-6" class="fnlink" href="../../#HEAD/group/commit/git_commit_lookup">git_commit_lookup</a></span><span class="p">(</span><span class="o">&</span><span class="n">parent</span><span class="p">,</span> <span class="n">repo</span><span class="p">,</span> <span class="o">&</span><span class="n">parent_id</span><span class="p">);</span></pre></div> </td> </tr> @@ -518,7 +509,7 @@ the values we need to create the commit. The SHA key is written to the <p>Now we can take a look at the commit SHA we've generated.</p> </td> <td class=code> - <div class='highlight'><pre> <span class="n"><a name="git_oid_fmt-50" class="fnlink" href="../../#HEAD/group/oid/git_oid_fmt">git_oid_fmt</a></span><span class="p">(</span><span class="n">oid_hex</span><span class="p">,</span> <span class="o">&</span><span class="n">commit_id</span><span class="p">);</span> + <div class='highlight'><pre> <span class="n"><a name="git_oid_fmt-58" class="fnlink" href="../../#HEAD/group/oid/git_oid_fmt">git_oid_fmt</a></span><span class="p">(</span><span class="n">oid_hex</span><span class="p">,</span> <span class="o">&</span><span class="n">commit_id</span><span class="p">);</span> <span class="n">printf</span><span class="p">(</span><span class="s">"New Commit: %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">oid_hex</span><span class="p">);</span></pre></div> </td> </tr> @@ -530,10 +521,10 @@ the values we need to create the commit. The SHA key is written to the <p>Free all objects used in the meanwhile.</p> </td> <td class=code> - <div class='highlight'><pre> <span class="n"><a name="git_tree_free-83" class="fnlink" href="../../#HEAD/group/tree/git_tree_free">git_tree_free</a></span><span class="p">(</span><span class="n">tree</span><span class="p">);</span> + <div class='highlight'><pre> <span class="n"><a name="git_tree_free-91" class="fnlink" href="../../#HEAD/group/tree/git_tree_free">git_tree_free</a></span><span class="p">(</span><span class="n">tree</span><span class="p">);</span> <span class="n"><a name="git_commit_free-9" class="fnlink" href="../../#HEAD/group/commit/git_commit_free">git_commit_free</a></span><span class="p">(</span><span class="n">parent</span><span class="p">);</span> - <span class="n"><a name="git_signature_free-72" class="fnlink" href="../../#HEAD/group/signature/git_signature_free">git_signature_free</a></span><span class="p">(</span><span class="n">author</span><span class="p">);</span> - <span class="n"><a name="git_signature_free-73" class="fnlink" href="../../#HEAD/group/signature/git_signature_free">git_signature_free</a></span><span class="p">(</span><span class="n">committer</span><span class="p">);</span> + <span class="n"><a name="git_signature_free-80" class="fnlink" href="../../#HEAD/group/signature/git_signature_free">git_signature_free</a></span><span class="p">(</span><span class="n">author</span><span class="p">);</span> + <span class="n"><a name="git_signature_free-81" class="fnlink" href="../../#HEAD/group/signature/git_signature_free">git_signature_free</a></span><span class="p">(</span><span class="n">committer</span><span class="p">);</span> <span class="p">}</span></pre></div> </td> </tr> @@ -569,7 +560,7 @@ data in the commit - the author (name, email, datetime), committer <span class="k">const</span> <span class="n">git_signature</span> <span class="o">*</span><span class="n">author</span><span class="p">,</span> <span class="o">*</span><span class="n">cmtter</span><span class="p">;</span> <span class="n">git_commit</span> <span class="o">*</span><span class="n">commit</span><span class="p">,</span> <span class="o">*</span><span class="n">parent</span><span class="p">;</span> <span class="n">git_oid</span> <span class="n">oid</span><span class="p">;</span> - <span class="kt">char</span> <span class="n">oid_hex</span><span class="p">[</span><span class="n">GIT_OID_SHA1_HEXSIZE</span><span class="o">+</span><span class="mi">1</span><span class="p">];</span> + <span class="kt">char</span> <span class="n">oid_hex</span><span class="p">[</span><span class="n">GIT_OID_HEXSZ</span><span class="o">+</span><span class="mi">1</span><span class="p">];</span> <span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">message</span><span class="p">;</span> <span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">parents</span><span class="p">,</span> <span class="n">p</span><span class="p">;</span> <span class="kt">int</span> <span class="n">error</span><span class="p">;</span> @@ -577,11 +568,7 @@ data in the commit - the author (name, email, datetime), committer <span class="n">printf</span><span class="p">(</span><span class="s">"</span><span class="se">\n</span><span class="s">*Commit Parsing*</span><span class="se">\n</span><span class="s">"</span><span class="p">);</span> -<span class="cp">#ifdef GIT_EXPERIMENTAL_SHA256</span> - <span class="n">git_oid_fromstr</span><span class="p">(</span><span class="o">&</span><span class="n">oid</span><span class="p">,</span> <span class="s">"8496071c1b46c854b31185ea97743be6a8774479"</span><span class="p">,</span> <span class="n">GIT_OID_SHA1</span><span class="p">);</span> -<span class="cp">#else</span> - <span class="n">git_oid_fromstr</span><span class="p">(</span><span class="o">&</span><span class="n">oid</span><span class="p">,</span> <span class="s">"8496071c1b46c854b31185ea97743be6a8774479"</span><span class="p">);</span> -<span class="cp">#endif</span> + <span class="n"><a name="git_oid_fromstr-51" class="fnlink" href="../../#HEAD/group/oid/git_oid_fromstr">git_oid_fromstr</a></span><span class="p">(</span><span class="o">&</span><span class="n">oid</span><span class="p">,</span> <span class="s">"8496071c1b46c854b31185ea97743be6a8774479"</span><span class="p">);</span> <span class="n">error</span> <span class="o">=</span> <span class="n"><a name="git_commit_lookup-7" class="fnlink" href="../../#HEAD/group/commit/git_commit_lookup">git_commit_lookup</a></span><span class="p">(</span><span class="o">&</span><span class="n">commit</span><span class="p">,</span> <span class="n">repo</span><span class="p">,</span> <span class="o">&</span><span class="n">oid</span><span class="p">);</span> <span class="n">check_error</span><span class="p">(</span><span class="n">error</span><span class="p">,</span> <span class="s">"looking up commit"</span><span class="p">);</span></pre></div> @@ -636,7 +623,7 @@ technically have any number, though it's rare to have more than two.</p> <span class="n">memset</span><span class="p">(</span><span class="n">oid_hex</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="k">sizeof</span><span class="p">(</span><span class="n">oid_hex</span><span class="p">));</span> <span class="n"><a name="git_commit_parent-24" class="fnlink" href="../../#HEAD/group/commit/git_commit_parent">git_commit_parent</a></span><span class="p">(</span><span class="o">&</span><span class="n">parent</span><span class="p">,</span> <span class="n">commit</span><span class="p">,</span> <span class="n">p</span><span class="p">);</span> - <span class="n"><a name="git_oid_fmt-51" class="fnlink" href="../../#HEAD/group/oid/git_oid_fmt">git_oid_fmt</a></span><span class="p">(</span><span class="n">oid_hex</span><span class="p">,</span> <span class="n"><a name="git_commit_id-14" class="fnlink" href="../../#HEAD/group/commit/git_commit_id">git_commit_id</a></span><span class="p">(</span><span class="n">parent</span><span class="p">));</span> + <span class="n"><a name="git_oid_fmt-59" class="fnlink" href="../../#HEAD/group/oid/git_oid_fmt">git_oid_fmt</a></span><span class="p">(</span><span class="n">oid_hex</span><span class="p">,</span> <span class="n"><a name="git_commit_id-14" class="fnlink" href="../../#HEAD/group/commit/git_commit_id">git_commit_id</a></span><span class="p">(</span><span class="n">parent</span><span class="p">));</span> <span class="n">printf</span><span class="p">(</span><span class="s">"Parent: %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">oid_hex</span><span class="p">);</span> <span class="n"><a name="git_commit_free-10" class="fnlink" href="../../#HEAD/group/commit/git_commit_free">git_commit_free</a></span><span class="p">(</span><span class="n">parent</span><span class="p">);</span> <span class="p">}</span> @@ -678,13 +665,9 @@ methods, since the objects themselves are very similar.</p> the same way that we would a commit (or any other object).</p> </td> <td class=code> - <div class='highlight'><pre><span class="cp">#ifdef GIT_EXPERIMENTAL_SHA256</span> - <span class="n">git_oid_fromstr</span><span class="p">(</span><span class="o">&</span><span class="n">oid</span><span class="p">,</span> <span class="s">"b25fa35b38051e4ae45d4222e795f9df2e43f1d1"</span><span class="p">,</span> <span class="n">GIT_OID_SHA1</span><span class="p">);</span> -<span class="cp">#else</span> - <span class="n">git_oid_fromstr</span><span class="p">(</span><span class="o">&</span><span class="n">oid</span><span class="p">,</span> <span class="s">"b25fa35b38051e4ae45d4222e795f9df2e43f1d1"</span><span class="p">);</span> -<span class="cp">#endif</span> + <div class='highlight'><pre> <span class="n"><a name="git_oid_fromstr-52" class="fnlink" href="../../#HEAD/group/oid/git_oid_fromstr">git_oid_fromstr</a></span><span class="p">(</span><span class="o">&</span><span class="n">oid</span><span class="p">,</span> <span class="s">"b25fa35b38051e4ae45d4222e795f9df2e43f1d1"</span><span class="p">);</span> - <span class="n">error</span> <span class="o">=</span> <span class="n"><a name="git_tag_lookup-75" class="fnlink" href="../../#HEAD/group/tag/git_tag_lookup">git_tag_lookup</a></span><span class="p">(</span><span class="o">&</span><span class="n">tag</span><span class="p">,</span> <span class="n">repo</span><span class="p">,</span> <span class="o">&</span><span class="n">oid</span><span class="p">);</span> + <span class="n">error</span> <span class="o">=</span> <span class="n"><a name="git_tag_lookup-83" class="fnlink" href="../../#HEAD/group/tag/git_tag_lookup">git_tag_lookup</a></span><span class="p">(</span><span class="o">&</span><span class="n">tag</span><span class="p">,</span> <span class="n">repo</span><span class="p">,</span> <span class="o">&</span><span class="n">oid</span><span class="p">);</span> <span class="n">check_error</span><span class="p">(</span><span class="n">error</span><span class="p">,</span> <span class="s">"looking up tag"</span><span class="p">);</span></pre></div> </td> </tr> @@ -699,10 +682,10 @@ the target object (usually 'commit'), the name ('v1.0'), the tag git_signature - name, email, timestamp), and the tag message.</p> </td> <td class=code> - <div class='highlight'><pre> <span class="n"><a name="git_tag_target-77" class="fnlink" href="../../#HEAD/group/tag/git_tag_target">git_tag_target</a></span><span class="p">((</span><span class="n">git_object</span> <span class="o">**</span><span class="p">)</span><span class="o">&</span><span class="n">commit</span><span class="p">,</span> <span class="n">tag</span><span class="p">);</span> - <span class="n">name</span> <span class="o">=</span> <span class="n"><a name="git_tag_name-79" class="fnlink" href="../../#HEAD/group/tag/git_tag_name">git_tag_name</a></span><span class="p">(</span><span class="n">tag</span><span class="p">);</span> <span class="cm">/* "test" */</span> - <span class="n">type</span> <span class="o">=</span> <span class="n"><a name="git_tag_target_type-78" class="fnlink" href="../../#HEAD/group/tag/git_tag_target_type">git_tag_target_type</a></span><span class="p">(</span><span class="n">tag</span><span class="p">);</span> <span class="cm">/* GIT_OBJECT_COMMIT (object_t enum) */</span> - <span class="n">message</span> <span class="o">=</span> <span class="n"><a name="git_tag_message-80" class="fnlink" href="../../#HEAD/group/tag/git_tag_message">git_tag_message</a></span><span class="p">(</span><span class="n">tag</span><span class="p">);</span> <span class="cm">/* "tag message\n" */</span> + <div class='highlight'><pre> <span class="n"><a name="git_tag_target-85" class="fnlink" href="../../#HEAD/group/tag/git_tag_target">git_tag_target</a></span><span class="p">((</span><span class="n">git_object</span> <span class="o">**</span><span class="p">)</span><span class="o">&</span><span class="n">commit</span><span class="p">,</span> <span class="n">tag</span><span class="p">);</span> + <span class="n">name</span> <span class="o">=</span> <span class="n"><a name="git_tag_name-87" class="fnlink" href="../../#HEAD/group/tag/git_tag_name">git_tag_name</a></span><span class="p">(</span><span class="n">tag</span><span class="p">);</span> <span class="cm">/* "test" */</span> + <span class="n">type</span> <span class="o">=</span> <span class="n"><a name="git_tag_target_type-86" class="fnlink" href="../../#HEAD/group/tag/git_tag_target_type">git_tag_target_type</a></span><span class="p">(</span><span class="n">tag</span><span class="p">);</span> <span class="cm">/* GIT_OBJECT_COMMIT (object_t enum) */</span> + <span class="n">message</span> <span class="o">=</span> <span class="n"><a name="git_tag_message-88" class="fnlink" href="../../#HEAD/group/tag/git_tag_message">git_tag_message</a></span><span class="p">(</span><span class="n">tag</span><span class="p">);</span> <span class="cm">/* "tag message\n" */</span> <span class="n">printf</span><span class="p">(</span><span class="s">"Tag Name: %s</span><span class="se">\n</span><span class="s">Tag Type: %s</span><span class="se">\n</span><span class="s">Tag Message: %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n"><a name="git_object_type2string-40" class="fnlink" href="../../#HEAD/group/object/git_object_type2string">git_object_type2string</a></span><span class="p">(</span><span class="n">type</span><span class="p">),</span> <span class="n">message</span><span class="p">);</span></pre></div> </td> @@ -716,7 +699,7 @@ git_signature - name, email, timestamp), and the tag message.</p> </td> <td class=code> <div class='highlight'><pre> <span class="n"><a name="git_commit_free-12" class="fnlink" href="../../#HEAD/group/commit/git_commit_free">git_commit_free</a></span><span class="p">(</span><span class="n">commit</span><span class="p">);</span> - <span class="n"><a name="git_tag_free-76" class="fnlink" href="../../#HEAD/group/tag/git_tag_free">git_tag_free</a></span><span class="p">(</span><span class="n">tag</span><span class="p">);</span> + <span class="n"><a name="git_tag_free-84" class="fnlink" href="../../#HEAD/group/tag/git_tag_free">git_tag_free</a></span><span class="p">(</span><span class="n">tag</span><span class="p">);</span> <span class="p">}</span></pre></div> </td> </tr> @@ -752,12 +735,8 @@ tree entries.</p> <p>Create the oid and lookup the tree object just like the other objects.</p> </td> <td class=code> - <div class='highlight'><pre><span class="cp">#ifdef GIT_EXPERIMENTAL_SHA256</span> - <span class="n">git_oid_fromstr</span><span class="p">(</span><span class="o">&</span><span class="n">oid</span><span class="p">,</span> <span class="s">"f60079018b664e4e79329a7ef9559c8d9e0378d1"</span><span class="p">,</span> <span class="n">GIT_OID_SHA1</span><span class="p">);</span> -<span class="cp">#else</span> - <span class="n">git_oid_fromstr</span><span class="p">(</span><span class="o">&</span><span class="n">oid</span><span class="p">,</span> <span class="s">"f60079018b664e4e79329a7ef9559c8d9e0378d1"</span><span class="p">);</span> -<span class="cp">#endif</span> - <span class="n"><a name="git_tree_lookup-82" class="fnlink" href="../../#HEAD/group/tree/git_tree_lookup">git_tree_lookup</a></span><span class="p">(</span><span class="o">&</span><span class="n">tree</span><span class="p">,</span> <span class="n">repo</span><span class="p">,</span> <span class="o">&</span><span class="n">oid</span><span class="p">);</span></pre></div> + <div class='highlight'><pre> <span class="n"><a name="git_oid_fromstr-53" class="fnlink" href="../../#HEAD/group/oid/git_oid_fromstr">git_oid_fromstr</a></span><span class="p">(</span><span class="o">&</span><span class="n">oid</span><span class="p">,</span> <span class="s">"f60079018b664e4e79329a7ef9559c8d9e0378d1"</span><span class="p">);</span> + <span class="n"><a name="git_tree_lookup-90" class="fnlink" href="../../#HEAD/group/tree/git_tree_lookup">git_tree_lookup</a></span><span class="p">(</span><span class="o">&</span><span class="n">tree</span><span class="p">,</span> <span class="n">repo</span><span class="p">,</span> <span class="o">&</span><span class="n">oid</span><span class="p">);</span></pre></div> </td> </tr> <tr id='section-38'> @@ -769,11 +748,11 @@ tree entries.</p> if you want to.</p> </td> <td class=code> - <div class='highlight'><pre> <span class="n">cnt</span> <span class="o">=</span> <span class="n"><a name="git_tree_entrycount-85" class="fnlink" href="../../#HEAD/group/tree/git_tree_entrycount">git_tree_entrycount</a></span><span class="p">(</span><span class="n">tree</span><span class="p">);</span> <span class="cm">/* 2 */</span> + <div class='highlight'><pre> <span class="n">cnt</span> <span class="o">=</span> <span class="n"><a name="git_tree_entrycount-93" class="fnlink" href="../../#HEAD/group/tree/git_tree_entrycount">git_tree_entrycount</a></span><span class="p">(</span><span class="n">tree</span><span class="p">);</span> <span class="cm">/* 2 */</span> <span class="n">printf</span><span class="p">(</span><span class="s">"tree entries: %d</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="p">(</span><span class="kt">int</span><span class="p">)</span> <span class="n">cnt</span><span class="p">);</span> - <span class="n">entry</span> <span class="o">=</span> <span class="n"><a name="git_tree_entry_byindex-87" class="fnlink" href="../../#HEAD/group/tree/git_tree_entry_byindex">git_tree_entry_byindex</a></span><span class="p">(</span><span class="n">tree</span><span class="p">,</span> <span class="mi">0</span><span class="p">);</span> - <span class="n">printf</span><span class="p">(</span><span class="s">"Entry name: %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n"><a name="git_tree_entry_name-88" class="fnlink" href="../../#HEAD/group/tree/git_tree_entry_name">git_tree_entry_name</a></span><span class="p">(</span><span class="n">entry</span><span class="p">));</span> <span class="cm">/* "README" */</span></pre></div> + <span class="n">entry</span> <span class="o">=</span> <span class="n"><a name="git_tree_entry_byindex-95" class="fnlink" href="../../#HEAD/group/tree/git_tree_entry_byindex">git_tree_entry_byindex</a></span><span class="p">(</span><span class="n">tree</span><span class="p">,</span> <span class="mi">0</span><span class="p">);</span> + <span class="n">printf</span><span class="p">(</span><span class="s">"Entry name: %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n"><a name="git_tree_entry_name-96" class="fnlink" href="../../#HEAD/group/tree/git_tree_entry_name">git_tree_entry_name</a></span><span class="p">(</span><span class="n">entry</span><span class="p">));</span> <span class="cm">/* "README" */</span></pre></div> </td> </tr> <tr id='section-39'> @@ -785,8 +764,8 @@ if you want to.</p> entry you're looking for.</p> </td> <td class=code> - <div class='highlight'><pre> <span class="n">entry</span> <span class="o">=</span> <span class="n"><a name="git_tree_entry_byname-86" class="fnlink" href="../../#HEAD/group/tree/git_tree_entry_byname">git_tree_entry_byname</a></span><span class="p">(</span><span class="n">tree</span><span class="p">,</span> <span class="s">"README"</span><span class="p">);</span> - <span class="n"><a name="git_tree_entry_name-89" class="fnlink" href="../../#HEAD/group/tree/git_tree_entry_name">git_tree_entry_name</a></span><span class="p">(</span><span class="n">entry</span><span class="p">);</span> <span class="cm">/* "README" */</span></pre></div> + <div class='highlight'><pre> <span class="n">entry</span> <span class="o">=</span> <span class="n"><a name="git_tree_entry_byname-94" class="fnlink" href="../../#HEAD/group/tree/git_tree_entry_byname">git_tree_entry_byname</a></span><span class="p">(</span><span class="n">tree</span><span class="p">,</span> <span class="s">"README"</span><span class="p">);</span> + <span class="n"><a name="git_tree_entry_name-97" class="fnlink" href="../../#HEAD/group/tree/git_tree_entry_name">git_tree_entry_name</a></span><span class="p">(</span><span class="n">entry</span><span class="p">);</span> <span class="cm">/* "README" */</span></pre></div> </td> </tr> <tr id='section-40'> @@ -799,7 +778,7 @@ entry you're looking for.</p> get the mode if you want.</p> </td> <td class=code> - <div class='highlight'><pre> <span class="n"><a name="git_tree_entry_to_object-90" class="fnlink" href="../../#HEAD/group/tree/git_tree_entry_to_object">git_tree_entry_to_object</a></span><span class="p">(</span><span class="o">&</span><span class="n">obj</span><span class="p">,</span> <span class="n">repo</span><span class="p">,</span> <span class="n">entry</span><span class="p">);</span> <span class="cm">/* blob */</span></pre></div> + <div class='highlight'><pre> <span class="n"><a name="git_tree_entry_to_object-98" class="fnlink" href="../../#HEAD/group/tree/git_tree_entry_to_object">git_tree_entry_to_object</a></span><span class="p">(</span><span class="o">&</span><span class="n">obj</span><span class="p">,</span> <span class="n">repo</span><span class="p">,</span> <span class="n">entry</span><span class="p">);</span> <span class="cm">/* blob */</span></pre></div> </td> </tr> <tr id='section-41'> @@ -811,7 +790,7 @@ get the mode if you want.</p> </td> <td class=code> <div class='highlight'><pre> <span class="n"><a name="git_object_free-38" class="fnlink" href="../../#HEAD/group/object/git_object_free">git_object_free</a></span><span class="p">(</span><span class="n">obj</span><span class="p">);</span> - <span class="n"><a name="git_tree_free-84" class="fnlink" href="../../#HEAD/group/tree/git_tree_free">git_tree_free</a></span><span class="p">(</span><span class="n">tree</span><span class="p">);</span> + <span class="n"><a name="git_tree_free-92" class="fnlink" href="../../#HEAD/group/tree/git_tree_free">git_tree_free</a></span><span class="p">(</span><span class="n">tree</span><span class="p">);</span> <span class="p">}</span></pre></div> </td> </tr> @@ -838,11 +817,7 @@ don't have to do all those steps yourself.</p> <span class="n">printf</span><span class="p">(</span><span class="s">"</span><span class="se">\n</span><span class="s">*Blob Parsing*</span><span class="se">\n</span><span class="s">"</span><span class="p">);</span> -<span class="cp">#ifdef GIT_EXPERIMENTAL_SHA256</span> - <span class="n">git_oid_fromstr</span><span class="p">(</span><span class="o">&</span><span class="n">oid</span><span class="p">,</span> <span class="s">"1385f264afb75a56a5bec74243be9b367ba4ca08"</span><span class="p">,</span> <span class="n">GIT_OID_SHA1</span><span class="p">);</span> -<span class="cp">#else</span> - <span class="n">git_oid_fromstr</span><span class="p">(</span><span class="o">&</span><span class="n">oid</span><span class="p">,</span> <span class="s">"1385f264afb75a56a5bec74243be9b367ba4ca08"</span><span class="p">);</span> -<span class="cp">#endif</span> + <span class="n"><a name="git_oid_fromstr-54" class="fnlink" href="../../#HEAD/group/oid/git_oid_fromstr">git_oid_fromstr</a></span><span class="p">(</span><span class="o">&</span><span class="n">oid</span><span class="p">,</span> <span class="s">"1385f264afb75a56a5bec74243be9b367ba4ca08"</span><span class="p">);</span> <span class="n"><a name="git_blob_lookup-1" class="fnlink" href="../../#HEAD/group/blob/git_blob_lookup">git_blob_lookup</a></span><span class="p">(</span><span class="o">&</span><span class="n">blob</span><span class="p">,</span> <span class="n">repo</span><span class="p">,</span> <span class="o">&</span><span class="n">oid</span><span class="p">);</span></pre></div> </td> </tr> @@ -900,11 +875,7 @@ can allow you to create <code>git log</code> type functionality.</p> <span class="n">printf</span><span class="p">(</span><span class="s">"</span><span class="se">\n</span><span class="s">*Revwalking*</span><span class="se">\n</span><span class="s">"</span><span class="p">);</span> -<span class="cp">#ifdef GIT_EXPERIMENTAL_SHA256</span> - <span class="n">git_oid_fromstr</span><span class="p">(</span><span class="o">&</span><span class="n">oid</span><span class="p">,</span> <span class="s">"5b5b025afb0b4c913b4c338a42934a3863bf3644"</span><span class="p">,</span> <span class="n">GIT_OID_SHA1</span><span class="p">);</span> -<span class="cp">#else</span> - <span class="n">git_oid_fromstr</span><span class="p">(</span><span class="o">&</span><span class="n">oid</span><span class="p">,</span> <span class="s">"5b5b025afb0b4c913b4c338a42934a3863bf3644"</span><span class="p">);</span> -<span class="cp">#endif</span></pre></div> + <span class="n"><a name="git_oid_fromstr-55" class="fnlink" href="../../#HEAD/group/oid/git_oid_fromstr">git_oid_fromstr</a></span><span class="p">(</span><span class="o">&</span><span class="n">oid</span><span class="p">,</span> <span class="s">"5b5b025afb0b4c913b4c338a42934a3863bf3644"</span><span class="p">);</span></pre></div> </td> </tr> <tr id='section-46'> @@ -922,9 +893,9 @@ branch1..branch2</code>, you would push the oid of <code>branch2</code> and hide of <code>branch1</code>.</p> </td> <td class=code> - <div class='highlight'><pre> <span class="n"><a name="git_revwalk_new-65" class="fnlink" href="../../#HEAD/group/revwalk/git_revwalk_new">git_revwalk_new</a></span><span class="p">(</span><span class="o">&</span><span class="n">walk</span><span class="p">,</span> <span class="n">repo</span><span class="p">);</span> - <span class="n"><a name="git_revwalk_sorting-68" class="fnlink" href="../../#HEAD/group/revwalk/git_revwalk_sorting">git_revwalk_sorting</a></span><span class="p">(</span><span class="n">walk</span><span class="p">,</span> <span class="n">GIT_SORT_TOPOLOGICAL</span> <span class="o">|</span> <span class="n">GIT_SORT_REVERSE</span><span class="p">);</span> - <span class="n"><a name="git_revwalk_push-66" class="fnlink" href="../../#HEAD/group/revwalk/git_revwalk_push">git_revwalk_push</a></span><span class="p">(</span><span class="n">walk</span><span class="p">,</span> <span class="o">&</span><span class="n">oid</span><span class="p">);</span></pre></div> + <div class='highlight'><pre> <span class="n"><a name="git_revwalk_new-73" class="fnlink" href="../../#HEAD/group/revwalk/git_revwalk_new">git_revwalk_new</a></span><span class="p">(</span><span class="o">&</span><span class="n">walk</span><span class="p">,</span> <span class="n">repo</span><span class="p">);</span> + <span class="n"><a name="git_revwalk_sorting-76" class="fnlink" href="../../#HEAD/group/revwalk/git_revwalk_sorting">git_revwalk_sorting</a></span><span class="p">(</span><span class="n">walk</span><span class="p">,</span> <span class="n">GIT_SORT_TOPOLOGICAL</span> <span class="o">|</span> <span class="n">GIT_SORT_REVERSE</span><span class="p">);</span> + <span class="n"><a name="git_revwalk_push-74" class="fnlink" href="../../#HEAD/group/revwalk/git_revwalk_push">git_revwalk_push</a></span><span class="p">(</span><span class="n">walk</span><span class="p">,</span> <span class="o">&</span><span class="n">oid</span><span class="p">);</span></pre></div> </td> </tr> <tr id='section-47'> @@ -939,7 +910,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</p> </td> <td class=code> - <div class='highlight'><pre> <span class="k">while</span> <span class="p">((</span><span class="n"><a name="git_revwalk_next-67" class="fnlink" href="../../#HEAD/group/revwalk/git_revwalk_next">git_revwalk_next</a></span><span class="p">(</span><span class="o">&</span><span class="n">oid</span><span class="p">,</span> <span class="n">walk</span><span class="p">))</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span> + <div class='highlight'><pre> <span class="k">while</span> <span class="p">((</span><span class="n"><a name="git_revwalk_next-75" class="fnlink" href="../../#HEAD/group/revwalk/git_revwalk_next">git_revwalk_next</a></span><span class="p">(</span><span class="o">&</span><span class="n">oid</span><span class="p">,</span> <span class="n">walk</span><span class="p">))</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span> <span class="n">error</span> <span class="o">=</span> <span class="n"><a name="git_commit_lookup-8" class="fnlink" href="../../#HEAD/group/commit/git_commit_lookup">git_commit_lookup</a></span><span class="p">(</span><span class="o">&</span><span class="n">wcommit</span><span class="p">,</span> <span class="n">repo</span><span class="p">,</span> <span class="o">&</span><span class="n">oid</span><span class="p">);</span> <span class="n">check_error</span><span class="p">(</span><span class="n">error</span><span class="p">,</span> <span class="s">"looking up commit during revwalk"</span><span class="p">);</span> @@ -962,7 +933,7 @@ walked it not deallocated while the walk is in progress, or it will result in undefined behavior</p> </td> <td class=code> - <div class='highlight'><pre> <span class="n"><a name="git_revwalk_free-69" class="fnlink" href="../../#HEAD/group/revwalk/git_revwalk_free">git_revwalk_free</a></span><span class="p">(</span><span class="n">walk</span><span class="p">);</span> + <div class='highlight'><pre> <span class="n"><a name="git_revwalk_free-77" class="fnlink" href="../../#HEAD/group/revwalk/git_revwalk_free">git_revwalk_free</a></span><span class="p">(</span><span class="n">walk</span><span class="p">);</span> <span class="p">}</span></pre></div> </td> </tr> @@ -996,7 +967,7 @@ index file with <code>git_index_open_bare()</code>. The index for the repository will be located and loaded from disk.</p> </td> <td class=code> - <div class='highlight'><pre> <span class="n"><a name="git_repository_index-64" class="fnlink" href="../../#HEAD/group/repository/git_repository_index">git_repository_index</a></span><span class="p">(</span><span class="o">&</span><span class="n">index</span><span class="p">,</span> <span class="n">repo</span><span class="p">);</span></pre></div> + <div class='highlight'><pre> <span class="n"><a name="git_repository_index-72" class="fnlink" href="../../#HEAD/group/repository/git_repository_index">git_repository_index</a></span><span class="p">(</span><span class="o">&</span><span class="n">index</span><span class="p">,</span> <span class="n">repo</span><span class="p">);</span></pre></div> </td> </tr> <tr id='section-51'> @@ -1057,34 +1028,34 @@ out all available references and the object SHA they resolve to.</p> one at a time and resolve them to the SHA, then print both values out.</p> </td> <td class=code> - <div class='highlight'><pre> <span class="n"><a name="git_reference_list-57" class="fnlink" href="../../#HEAD/group/reference/git_reference_list">git_reference_list</a></span><span class="p">(</span><span class="o">&</span><span class="n">ref_list</span><span class="p">,</span> <span class="n">repo</span><span class="p">);</span> + <div class='highlight'><pre> <span class="n"><a name="git_reference_list-65" class="fnlink" href="../../#HEAD/group/reference/git_reference_list">git_reference_list</a></span><span class="p">(</span><span class="o">&</span><span class="n">ref_list</span><span class="p">,</span> <span class="n">repo</span><span class="p">);</span> <span class="k">for</span> <span class="p">(</span><span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span> <span class="n">i</span> <span class="o"><</span> <span class="n">ref_list</span><span class="p">.</span><span class="n">count</span><span class="p">;</span> <span class="o">++</span><span class="n">i</span><span class="p">)</span> <span class="p">{</span> <span class="n">git_reference</span> <span class="o">*</span><span class="n">ref</span><span class="p">;</span> - <span class="kt">char</span> <span class="n">oid_hex</span><span class="p">[</span><span class="n">GIT_OID_SHA1_HEXSIZE</span><span class="o">+</span><span class="mi">1</span><span class="p">]</span> <span class="o">=</span> <span class="n">GIT_OID_SHA1_HEXZERO</span><span class="p">;</span> + <span class="kt">char</span> <span class="n">oid_hex</span><span class="p">[</span><span class="n">GIT_OID_HEXSZ</span><span class="o">+</span><span class="mi">1</span><span class="p">]</span> <span class="o">=</span> <span class="n">GIT_OID_HEX_ZERO</span><span class="p">;</span> <span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">refname</span><span class="p">;</span> <span class="n">refname</span> <span class="o">=</span> <span class="n">ref_list</span><span class="p">.</span><span class="n">strings</span><span class="p">[</span><span class="n">i</span><span class="p">];</span> - <span class="n"><a name="git_reference_lookup-53" class="fnlink" href="../../#HEAD/group/reference/git_reference_lookup">git_reference_lookup</a></span><span class="p">(</span><span class="o">&</span><span class="n">ref</span><span class="p">,</span> <span class="n">repo</span><span class="p">,</span> <span class="n">refname</span><span class="p">);</span> + <span class="n"><a name="git_reference_lookup-61" class="fnlink" href="../../#HEAD/group/reference/git_reference_lookup">git_reference_lookup</a></span><span class="p">(</span><span class="o">&</span><span class="n">ref</span><span class="p">,</span> <span class="n">repo</span><span class="p">,</span> <span class="n">refname</span><span class="p">);</span> - <span class="k">switch</span> <span class="p">(</span><span class="n"><a name="git_reference_type-56" class="fnlink" href="../../#HEAD/group/reference/git_reference_type">git_reference_type</a></span><span class="p">(</span><span class="n">ref</span><span class="p">))</span> <span class="p">{</span> + <span class="k">switch</span> <span class="p">(</span><span class="n"><a name="git_reference_type-64" class="fnlink" href="../../#HEAD/group/reference/git_reference_type">git_reference_type</a></span><span class="p">(</span><span class="n">ref</span><span class="p">))</span> <span class="p">{</span> <span class="k">case</span> <span class="nl">GIT_REFERENCE_DIRECT</span><span class="p">:</span> - <span class="n"><a name="git_oid_fmt-52" class="fnlink" href="../../#HEAD/group/oid/git_oid_fmt">git_oid_fmt</a></span><span class="p">(</span><span class="n">oid_hex</span><span class="p">,</span> <span class="n"><a name="git_reference_target-54" class="fnlink" href="../../#HEAD/group/reference/git_reference_target">git_reference_target</a></span><span class="p">(</span><span class="n">ref</span><span class="p">));</span> + <span class="n"><a name="git_oid_fmt-60" class="fnlink" href="../../#HEAD/group/oid/git_oid_fmt">git_oid_fmt</a></span><span class="p">(</span><span class="n">oid_hex</span><span class="p">,</span> <span class="n"><a name="git_reference_target-62" class="fnlink" href="../../#HEAD/group/reference/git_reference_target">git_reference_target</a></span><span class="p">(</span><span class="n">ref</span><span class="p">));</span> <span class="n">printf</span><span class="p">(</span><span class="s">"%s [%s]</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">refname</span><span class="p">,</span> <span class="n">oid_hex</span><span class="p">);</span> <span class="k">break</span><span class="p">;</span> <span class="k">case</span> <span class="nl">GIT_REFERENCE_SYMBOLIC</span><span class="p">:</span> - <span class="n">printf</span><span class="p">(</span><span class="s">"%s => %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">refname</span><span class="p">,</span> <span class="n"><a name="git_reference_symbolic_target-55" class="fnlink" href="../../#HEAD/group/reference/git_reference_symbolic_target">git_reference_symbolic_target</a></span><span class="p">(</span><span class="n">ref</span><span class="p">));</span> + <span class="n">printf</span><span class="p">(</span><span class="s">"%s => %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">refname</span><span class="p">,</span> <span class="n"><a name="git_reference_symbolic_target-63" class="fnlink" href="../../#HEAD/group/reference/git_reference_symbolic_target">git_reference_symbolic_target</a></span><span class="p">(</span><span class="n">ref</span><span class="p">));</span> <span class="k">break</span><span class="p">;</span> <span class="k">default</span><span class="o">:</span> <span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"Unexpected reference type</span><span class="se">\n</span><span class="s">"</span><span class="p">);</span> <span class="n">exit</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span> <span class="p">}</span> - <span class="n"><a name="git_reference_free-58" class="fnlink" href="../../#HEAD/group/reference/git_reference_free">git_reference_free</a></span><span class="p">(</span><span class="n">ref</span><span class="p">);</span> + <span class="n"><a name="git_reference_free-66" class="fnlink" href="../../#HEAD/group/reference/git_reference_free">git_reference_free</a></span><span class="p">(</span><span class="n">ref</span><span class="p">);</span> <span class="p">}</span> - <span class="n"><a name="git_strarray_dispose-74" class="fnlink" href="../../#HEAD/group/strarray/git_strarray_dispose">git_strarray_dispose</a></span><span class="p">(</span><span class="o">&</span><span class="n">ref_list</span><span class="p">);</span> + <span class="n"><a name="git_strarray_dispose-82" class="fnlink" href="../../#HEAD/group/strarray/git_strarray_dispose">git_strarray_dispose</a></span><span class="p">(</span><span class="o">&</span><span class="n">ref_list</span><span class="p">);</span> <span class="p">}</span></pre></div> </td> </tr> @@ -1126,7 +1097,7 @@ in any of the accessible config file locations (system, global, local).</p> <span class="k">if</span> <span class="p">(</span><span class="n"><a name="git_config_get_int32-29" class="fnlink" href="../../#HEAD/group/config/git_config_get_int32">git_config_get_int32</a></span><span class="p">(</span><span class="o">&</span><span class="n">autocorrect</span><span class="p">,</span> <span class="n">cfg</span><span class="p">,</span> <span class="s">"help.autocorrect"</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="n">printf</span><span class="p">(</span><span class="s">"Autocorrect: %d</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">autocorrect</span><span class="p">);</span> - <span class="n">check_error</span><span class="p">(</span><span class="n"><a name="git_repository_config_snapshot-61" class="fnlink" href="../../#HEAD/group/repository/git_repository_config_snapshot">git_repository_config_snapshot</a></span><span class="p">(</span><span class="o">&</span><span class="n">snap_cfg</span><span class="p">,</span> <span class="n">repo</span><span class="p">),</span> <span class="s">"config snapshot"</span><span class="p">);</span> + <span class="n">check_error</span><span class="p">(</span><span class="n"><a name="git_repository_config_snapshot-69" class="fnlink" href="../../#HEAD/group/repository/git_repository_config_snapshot">git_repository_config_snapshot</a></span><span class="p">(</span><span class="o">&</span><span class="n">snap_cfg</span><span class="p">,</span> <span class="n">repo</span><span class="p">),</span> <span class="s">"config snapshot"</span><span class="p">);</span> <span class="n"><a name="git_config_get_string-31" class="fnlink" href="../../#HEAD/group/config/git_config_get_string">git_config_get_string</a></span><span class="p">(</span><span class="o">&</span><span class="n">email</span><span class="p">,</span> <span class="n">snap_cfg</span><span class="p">,</span> <span class="s">"user.email"</span><span class="p">);</span> <span class="n">printf</span><span class="p">(</span><span class="s">"Email: %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">email</span><span class="p">);</span> @@ -1144,7 +1115,7 @@ in any of the accessible config file locations (system, global, local).</p> <span class="p">}</span> <span class="n"><a name="git_config_free-27" class="fnlink" href="../../#HEAD/group/config/git_config_free">git_config_free</a></span><span class="p">(</span><span class="n">cfg</span><span class="p">);</span> - <span class="n">check_error</span><span class="p">(</span><span class="n"><a name="git_repository_config_snapshot-62" class="fnlink" href="../../#HEAD/group/repository/git_repository_config_snapshot">git_repository_config_snapshot</a></span><span class="p">(</span><span class="o">&</span><span class="n">snap_cfg</span><span class="p">,</span> <span class="n">repo</span><span class="p">),</span> <span class="s">"config snapshot"</span><span class="p">);</span> + <span class="n">check_error</span><span class="p">(</span><span class="n"><a name="git_repository_config_snapshot-70" class="fnlink" href="../../#HEAD/group/repository/git_repository_config_snapshot">git_repository_config_snapshot</a></span><span class="p">(</span><span class="o">&</span><span class="n">snap_cfg</span><span class="p">,</span> <span class="n">repo</span><span class="p">),</span> <span class="s">"config snapshot"</span><span class="p">);</span> <span class="n">error_code</span> <span class="o">=</span> <span class="n"><a name="git_config_get_string-32" class="fnlink" href="../../#HEAD/group/config/git_config_get_string">git_config_get_string</a></span><span class="p">(</span><span class="o">&</span><span class="n">email</span><span class="p">,</span> <span class="n">snap_cfg</span><span class="p">,</span> <span class="s">"user.email"</span><span class="p">);</span> <span class="k">switch</span> <span class="p">(</span><span class="n">error_code</span><span class="p">)</span> <span class="p">{</span> diff --git a/ex/HEAD/log.html b/ex/HEAD/log.html index ec6f82464..be803a9f1 100644 --- a/ex/HEAD/log.html +++ b/ex/HEAD/log.html @@ -535,7 +535,7 @@ revwalker configuration calls</li> <td class=code> <div class='highlight'><pre><span class="k">static</span> <span class="kt">void</span> <span class="nf">print_commit</span><span class="p">(</span><span class="n">git_commit</span> <span class="o">*</span><span class="n">commit</span><span class="p">,</span> <span class="k">struct</span> <span class="n">log_options</span> <span class="o">*</span><span class="n">opts</span><span class="p">)</span> <span class="p">{</span> - <span class="kt">char</span> <span class="n">buf</span><span class="p">[</span><span class="n">GIT_OID_SHA1_HEXSIZE</span> <span class="o">+</span> <span class="mi">1</span><span class="p">];</span> + <span class="kt">char</span> <span class="n">buf</span><span class="p">[</span><span class="n">GIT_OID_HEXSZ</span> <span class="o">+</span> <span class="mi">1</span><span class="p">];</span> <span class="kt">int</span> <span class="n">i</span><span class="p">,</span> <span class="n">count</span><span class="p">;</span> <span class="k">const</span> <span class="n">git_signature</span> <span class="o">*</span><span class="n">sig</span><span class="p">;</span> <span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">scan</span><span class="p">,</span> <span class="o">*</span><span class="n">eol</span><span class="p">;</span> diff --git a/ex/HEAD/ls-remote.html b/ex/HEAD/ls-remote.html index 3a8955f95..dc0f10539 100644 --- a/ex/HEAD/ls-remote.html +++ b/ex/HEAD/ls-remote.html @@ -113,7 +113,7 @@ their name next to what they point to.</p> <span class="k">goto</span> <span class="n">cleanup</span><span class="p">;</span> <span class="k">for</span> <span class="p">(</span><span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span> <span class="n">i</span> <span class="o"><</span> <span class="n">refs_len</span><span class="p">;</span> <span class="n">i</span><span class="o">++</span><span class="p">)</span> <span class="p">{</span> - <span class="kt">char</span> <span class="n">oid</span><span class="p">[</span><span class="n">GIT_OID_SHA1_HEXSIZE</span> <span class="o">+</span> <span class="mi">1</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span><span class="mi">0</span><span class="p">};</span> + <span class="kt">char</span> <span class="n">oid</span><span class="p">[</span><span class="n">GIT_OID_HEXSZ</span> <span class="o">+</span> <span class="mi">1</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span><span class="mi">0</span><span class="p">};</span> <span class="n"><a name="git_oid_fmt-1" class="fnlink" href="../../#HEAD/group/oid/git_oid_fmt">git_oid_fmt</a></span><span class="p">(</span><span class="n">oid</span><span class="p">,</span> <span class="o">&</span><span class="n">refs</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">-></span><span class="n">oid</span><span class="p">);</span> <span class="n">printf</span><span class="p">(</span><span class="s">"%s</span><span class="se">\t</span><span class="s">%s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">oid</span><span class="p">,</span> <span class="n">refs</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">-></span><span class="n">name</span><span class="p">);</span> <span class="p">}</span> diff --git a/ex/HEAD/rev-parse.html b/ex/HEAD/rev-parse.html index 4b2f384e7..65ebe89e9 100644 --- a/ex/HEAD/rev-parse.html +++ b/ex/HEAD/rev-parse.html @@ -141,7 +141,7 @@ <span class="k">static</span> <span class="kt">int</span> <span class="nf">parse_revision</span><span class="p">(</span><span class="n">git_repository</span> <span class="o">*</span><span class="n">repo</span><span class="p">,</span> <span class="k">struct</span> <span class="n">parse_state</span> <span class="o">*</span><span class="n">ps</span><span class="p">)</span> <span class="p">{</span> <span class="n">git_revspec</span> <span class="n">rs</span><span class="p">;</span> - <span class="kt">char</span> <span class="n">str</span><span class="p">[</span><span class="n">GIT_OID_SHA1_HEXSIZE</span> <span class="o">+</span> <span class="mi">1</span><span class="p">];</span> + <span class="kt">char</span> <span class="n">str</span><span class="p">[</span><span class="n">GIT_OID_HEXSZ</span> <span class="o">+</span> <span class="mi">1</span><span class="p">];</span> <span class="n">check_lg2</span><span class="p">(</span><span class="n"><a name="git_revparse-14" class="fnlink" href="../../#HEAD/group/revparse/git_revparse">git_revparse</a></span><span class="p">(</span><span class="o">&</span><span class="n">rs</span><span class="p">,</span> <span class="n">repo</span><span class="p">,</span> <span class="n">ps</span><span class="o">-></span><span class="n">spec</span><span class="p">),</span> <span class="s">"Could not parse"</span><span class="p">,</span> <span class="n">ps</span><span class="o">-></span><span class="n">spec</span><span class="p">);</span> |