|
Packit Service |
20376f |
Projects For LibGit2
|
|
Packit Service |
20376f |
====================
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
So, you want to start helping out with `libgit2`? That's fantastic! We
|
|
Packit Service |
20376f |
welcome contributions and we promise we'll try to be nice.
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
This is a list of libgit2 related projects that new contributors can take
|
|
Packit Service |
20376f |
on. It includes a number of good starter projects as well as some larger
|
|
Packit Service |
20376f |
ideas that no one is actively working on.
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
## Before You Start
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
Please start by reading the [README.md](README.md),
|
|
Packit Service |
20376f |
[CONTRIBUTING.md](CONTRIBUTING.md), and [CONVENTIONS.md](CONVENTIONS.md)
|
|
Packit Service |
20376f |
files before diving into one of these projects. Those explain our work
|
|
Packit Service |
20376f |
flow and coding conventions to help ensure that your work will be easily
|
|
Packit Service |
20376f |
integrated into libgit2.
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
Next, work through the build instructions and make sure you can clone the
|
|
Packit Service |
20376f |
repository, compile it, and run the tests successfully. That will make
|
|
Packit Service |
20376f |
sure that your development environment is set up correctly and you are
|
|
Packit Service |
20376f |
ready to start on libgit2 development.
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
## Starter Projects
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
These are good small projects to get started with libgit2.
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
* Look at the `examples/` programs, find an existing one that mirrors a
|
|
Packit Service |
20376f |
core Git command and add a missing command-line option. There are many
|
|
Packit Service |
20376f |
gaps right now and this helps demonstrate how to use the library. Here
|
|
Packit Service |
20376f |
are some specific ideas (though there are many more):
|
|
Packit Service |
20376f |
* Fix the `examples/diff.c` implementation of the `-B`
|
|
Packit Service |
20376f |
(a.k.a. `--break-rewrites`) command line option to actually look for
|
|
Packit Service |
20376f |
the optional `[<n>][/<m>]` configuration values. There is an
|
|
Packit Service |
20376f |
existing comment that reads `/* TODO: parse thresholds */`. The
|
|
Packit Service |
20376f |
trick to this one will be doing it in a manner that is clean and
|
|
Packit Service |
20376f |
simple, but still handles the various cases correctly (e.g. `-B/70%`
|
|
Packit Service |
20376f |
is apparently a legal setting).
|
|
Packit Service |
20376f |
* Implement the `--log-size` option for `examples/log.c`. I think all
|
|
Packit Service |
20376f |
the data is available, you would just need to add the code into the
|
|
Packit Service |
20376f |
`print_commit()` routine (along with a way of passing the option
|
|
Packit Service |
20376f |
into that function).
|
|
Packit Service |
20376f |
* As an extension to the matching idea for `examples/log.c`, add the
|
|
Packit Service |
20376f |
`-i` option to use `strcasestr()` for matches.
|
|
Packit Service |
20376f |
* For `examples/log.c`, implement the `--first-parent` option now that
|
|
Packit Service |
20376f |
libgit2 supports it in the revwalk API.
|
|
Packit Service |
20376f |
* Pick a Git command that is not already emulated in `examples/` and write
|
|
Packit Service |
20376f |
a new example that mirrors the behavior. Examples don't have to be
|
|
Packit Service |
20376f |
perfect emulations, but should demonstrate how to use the libgit2 APIs
|
|
Packit Service |
20376f |
to get results that are similar to Git commands. This lets you (and us)
|
|
Packit Service |
20376f |
easily exercise a particular facet of the API and measure compatibility
|
|
Packit Service |
20376f |
and feature parity with core git.
|
|
Packit Service |
20376f |
* Submit a PR to clarify documentation! While we do try to document all of
|
|
Packit Service |
20376f |
the APIs, your fresh eyes on the documentation will find areas that are
|
|
Packit Service |
20376f |
confusing much more easily.
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
If none of these appeal to you, take a look at our issues list to see if
|
|
Packit Service |
20376f |
there are any unresolved issues you'd like to jump in on.
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
## Larger Projects
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
These are ideas for larger projects mostly taken from our backlog of
|
|
Packit Service |
20376f |
[Issues](https://github.com/libgit2/libgit2/issues). Please don't dive
|
|
Packit Service |
20376f |
into one of these as a first project for libgit2 - we'd rather get to
|
|
Packit Service |
20376f |
know you first by successfully shipping your work on one of the smaller
|
|
Packit Service |
20376f |
projects above.
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
Some of these projects are broken down into subprojects and/or have
|
|
Packit Service |
20376f |
some incremental steps listed towards the larger goal. Those steps
|
|
Packit Service |
20376f |
might make good smaller projects by themselves.
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
* Port part of the Git test suite to run against the command line emulation
|
|
Packit Service |
20376f |
in `examples/`
|
|
Packit Service |
20376f |
* Pick a Git command that is emulated in our `examples/` area
|
|
Packit Service |
20376f |
* Extract the Git tests that exercise that command
|
|
Packit Service |
20376f |
* Convert the tests to call our emulation
|
|
Packit Service |
20376f |
* These tests could go in `examples/tests/`...
|
|
Packit Service |
20376f |
* Add hooks API to enumerate and manage hooks (not run them at this point)
|
|
Packit Service |
20376f |
* Enumeration of available hooks
|
|
Packit Service |
20376f |
* Lookup API to see which hooks have a script and get the script
|
|
Packit Service |
20376f |
* Read/write API to load a hook script and write a hook script
|
|
Packit Service |
20376f |
* Eventually, callback API to invoke a hook callback when libgit2
|
|
Packit Service |
20376f |
executes the action in question
|
|
Packit Service |
20376f |
* Isolate logic of ignore evaluation into a standalone API
|
|
Packit Service |
20376f |
* Upgrade internal libxdiff code to latest from core Git
|
|
Packit Service |
20376f |
* Tree builder improvements:
|
|
Packit Service |
20376f |
* Extend to allow building a tree hierarchy
|
|
Packit Service |
20376f |
* Apply-patch API
|
|
Packit Service |
20376f |
* Add a patch editing API to enable "git add -p" type operations
|
|
Packit Service |
20376f |
* Textconv API to filter binary data before generating diffs (something
|
|
Packit Service |
20376f |
like the current Filter API, probably).
|
|
Packit Service |
20376f |
* Performance profiling and improvement
|
|
Packit Service |
20376f |
* Support "git replace" ref replacements
|
|
Packit Service |
20376f |
* Include conflicts in diff results and in status
|
|
Packit Service |
20376f |
* GIT_DELTA_CONFLICT for items in conflict (with multiple files)
|
|
Packit Service |
20376f |
* Appropriate flags for status
|
|
Packit Service |
20376f |
* Support sparse checkout (i.e. "core.sparsecheckout" and ".git/info/sparse-checkout")
|