Skip to content

Conversation

@pauljoohyunkim
Copy link

@pauljoohyunkim pauljoohyunkim commented Aug 20, 2023

Changes

  • Rather than code snippet, inflated to a concrete program that can be compiled and demonstrated.
  • Edited the paragraph following accordingly.

Context

For people using libgit2 in C, it may be more useful to have an actual program that one can compile rather than just the code snippets. I think it is neither that many more lines than before, nor any difficult line, so it shouldn't confuse anyone.

Also without the initialization by calling git_libgit2_init(), the error variable holds GIT_ERROR (generic error), so I decided to include it (and subsequently, git_libgit2_shutdown() for freeing the global state.)

- Global initialization added.
- "#include <git2.h>" added
- Comments about how to compile added
Parts of the paragraph referencing lines from code changed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant