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

Libgit2 example more concrete #1897

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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.

None yet

1 participant