Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding libgit2 sample. #182

Changes from 1 commit
File filter
Filter by extension
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -514,7 +514,7 @@ <h3 id="java-program-that-uses-libgit2-to-clone-github-repo">Java program that u
<span id="cb27-5"><a href="#cb27-5"></a><span class="kw">import static</span><span class="im"> jdk.incubator.foreign.NativeAllocationScope.*;</span></span>
<span id="cb27-6"><a href="#cb27-6"></a><span class="kw">import static</span><span class="im"> com.github.Cstring.*;</span></span>
<span id="cb27-7"><a href="#cb27-7"></a></span>
<span id="cb27-8"><a href="#cb27-8"></a><span class="kw">public</span> <span class="kw">class</span> GitMain {</span>
<span id="cb27-8"><a href="#cb27-8"></a><span class="kw">public</span> <span class="kw">class</span> GitClone {</span>
<span id="cb27-9"><a href="#cb27-9"></a> <span class="kw">public</span> <span class="dt">static</span> <span class="dt">void</span> <span class="fu">main</span>(<span class="bu">String</span>[] args) {</span>
<span id="cb27-10"><a href="#cb27-10"></a> <span class="kw">if</span> (args.<span class="fu">length</span> != <span class="dv">2</span>) {</span>
<span id="cb27-11"><a href="#cb27-11"></a> <span class="bu">System</span>.<span class="fu">err</span>.<span class="fu">println</span>(<span class="st">&quot;java GitClone &lt;url&gt; &lt;path&gt;&quot;</span>);</span>
@@ -518,7 +518,7 @@ import static jdk.incubator.foreign.MemoryAddress.NULL;
import static jdk.incubator.foreign.NativeAllocationScope.*;
import static com.github.Cstring.*;
public class GitMain {
public class GitClone {
public static void main(String[] args) {
if (args.length != 2) {
System.err.println("java GitClone <url> <path>");