]> git.proxmox.com Git - libgit2.git/blob - docs/projects.md
install as examples
[libgit2.git] / docs / projects.md
1 Projects For LibGit2
2 ====================
3
4 So, you want to start helping out with `libgit2`? That's fantastic! We
5 welcome contributions and we promise we'll try to be nice.
6
7 This is a list of libgit2 related projects that new contributors can take
8 on. It includes a number of good starter projects as well as some larger
9 ideas that no one is actively working on.
10
11 ## Before You Start
12
13 Please start by reading the [README.md](../README.md),
14 [contributing.md](contributing.md), and [conventions.md](conventions.md)
15 files before diving into one of these projects. Those explain our work
16 flow and coding conventions to help ensure that your work will be easily
17 integrated into libgit2.
18
19 Next, work through the build instructions and make sure you can clone the
20 repository, compile it, and run the tests successfully. That will make
21 sure that your development environment is set up correctly and you are
22 ready to start on libgit2 development.
23
24 ## Starter Projects
25
26 These are good small projects to get started with libgit2.
27
28 * Look at the `examples/` programs, find an existing one that mirrors a
29 core Git command and add a missing command-line option. There are many
30 gaps right now and this helps demonstrate how to use the library. Here
31 are some specific ideas (though there are many more):
32 * Fix the `examples/diff.c` implementation of the `-B`
33 (a.k.a. `--break-rewrites`) command line option to actually look for
34 the optional `[<n>][/<m>]` configuration values. There is an
35 existing comment that reads `/* TODO: parse thresholds */`. The
36 trick to this one will be doing it in a manner that is clean and
37 simple, but still handles the various cases correctly (e.g. `-B/70%`
38 is apparently a legal setting).
39 * As an extension to the matching idea for `examples/log.c`, add the
40 `-i` option to use `strcasestr()` for matches.
41 * For `examples/log.c`, implement the `--first-parent` option now that
42 libgit2 supports it in the revwalk API.
43 * Pick a Git command that is not already emulated in `examples/` and write
44 a new example that mirrors the behavior. Examples don't have to be
45 perfect emulations, but should demonstrate how to use the libgit2 APIs
46 to get results that are similar to Git commands. This lets you (and us)
47 easily exercise a particular facet of the API and measure compatibility
48 and feature parity with core git.
49 * Submit a PR to clarify documentation! While we do try to document all of
50 the APIs, your fresh eyes on the documentation will find areas that are
51 confusing much more easily.
52
53 If none of these appeal to you, take a look at our issues list to see if
54 there are any unresolved issues you'd like to jump in on.
55
56 ## Larger Projects
57
58 These are ideas for larger projects mostly taken from our backlog of
59 [Issues](https://github.com/libgit2/libgit2/issues). Please don't dive
60 into one of these as a first project for libgit2 - we'd rather get to
61 know you first by successfully shipping your work on one of the smaller
62 projects above.
63
64 Some of these projects are broken down into subprojects and/or have
65 some incremental steps listed towards the larger goal. Those steps
66 might make good smaller projects by themselves.
67
68 * Port part of the Git test suite to run against the command line emulation
69 in `examples/`
70 * Pick a Git command that is emulated in our `examples/` area
71 * Extract the Git tests that exercise that command
72 * Convert the tests to call our emulation
73 * These tests could go in `examples/tests/`...
74 * Add hooks API to enumerate and manage hooks (not run them at this point)
75 * Enumeration of available hooks
76 * Lookup API to see which hooks have a script and get the script
77 * Read/write API to load a hook script and write a hook script
78 * Eventually, callback API to invoke a hook callback when libgit2
79 executes the action in question
80 * Isolate logic of ignore evaluation into a standalone API
81 * Upgrade internal libxdiff code to latest from core Git
82 * Tree builder improvements:
83 * Extend to allow building a tree hierarchy
84 * Apply-patch API
85 * Add a patch editing API to enable "git add -p" type operations
86 * Textconv API to filter binary data before generating diffs (something
87 like the current Filter API, probably).
88 * Performance profiling and improvement
89 * Support "git replace" ref replacements
90 * Include conflicts in diff results and in status
91 * GIT_DELTA_CONFLICT for items in conflict (with multiple files)
92 * Appropriate flags for status
93 * Support sparse checkout (i.e. "core.sparsecheckout" and ".git/info/sparse-checkout")