]>
Commit | Line | Data |
---|---|---|
486bc366 RB |
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 and well as some larger | |
9 | ideas that no one is actively working on. | |
10 | ||
11 | ## Before You Start | |
12 | ||
a142ed91 RB |
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. | |
486bc366 RB |
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 | |
a142ed91 | 31 | are some specific ideas (though there are many more): |
486bc366 RB |
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 | * Implement the `--log-size` option for `examples/log.c`. I think all | |
40 | the data is available, you would just need to add the code into the | |
41 | `print_commit()` routine (along with a way of passing the option | |
42 | into that function). | |
486bc366 RB |
43 | * As an extension to the matching idea for `examples/log.c`, add the |
44 | `-i` option to use `strcasestr()` for matches. | |
45 | * For `examples/log.c`, implement the `--first-parent` option now that | |
46 | libgit2 supports it in the revwalk API. | |
47 | * Pick a Git command that is not already emulated in `examples/` and write | |
48 | a new example that mirrors the behavior. Examples don't have to be | |
49 | perfect emulations, but should demonstrate how to use the libgit2 APIs | |
50 | to get results that are similar to Git commands. This lets you (and us) | |
d50bf716 | 51 | easily exercise a particular facet of the API and measure compatibility |
486bc366 RB |
52 | and feature parity with core git. |
53 | * Submit a PR to clarify documentation! While we do try to document all of | |
54 | the APIs, your fresh eyes on the documentation will find areas that are | |
55 | confusing much more easily. | |
56 | ||
57 | If none of these appeal to you, take a look at our issues list to see if | |
58 | there are any unresolved issues you'd like to jump in on. | |
59 | ||
60 | ## Larger Projects | |
61 | ||
62 | These are ideas for larger projects mostly taken from our backlog of | |
63 | [Issues](https://github.com/libgit2/libgit2/issues). Please don't dive | |
64 | into one of these as a first project for libgit2 - we'd rather get to | |
65 | know you first by successfully shipping your work on one of the smaller | |
66 | projects above. | |
67 | ||
a142ed91 RB |
68 | Some of these projects are broken down into subprojects and/or have |
69 | some incremental steps listed towards the larger goal. Those steps | |
70 | might make good smaller projects by themselves. | |
71 | ||
486bc366 RB |
72 | * Port part of the Git test suite to run against the command line emulation |
73 | in examples/ | |
a142ed91 RB |
74 | * Pick a Git command that is emulated in our examples/ area |
75 | * Extract the Git tests that exercise that command | |
76 | * Convert the tests to call our emulation | |
77 | * These tests could go in examples/tests/... | |
486bc366 | 78 | * Add hooks API to enumerate and manage hooks (not run them at this point) |
a142ed91 RB |
79 | * Enumeration of available hooks |
80 | * Lookup API to see which hooks have a script and get the script | |
81 | * Read/write API to load a hook script and write a hook script | |
82 | * Eventually, callback API to invoke a hook callback when libgit2 | |
83 | executes the action in question | |
486bc366 RB |
84 | * Isolate logic of ignore evaluation into a standalone API |
85 | * Upgrade internal libxdiff code to latest from core Git | |
a142ed91 | 86 | * Tree builder improvements: |
a142ed91 | 87 | * Extend to allow building a tree hierarchy |
a142ed91 RB |
88 | * Apply-patch API |
89 | * Add a patch editing API to enable "git add -p" type operations | |
90 | * Textconv API to filter binary data before generating diffs (something | |
91 | like the current Filter API, probably). | |
92 | * Performance profiling and improvement | |
a142ed91 RB |
93 | * Support "git replace" ref replacements |
94 | * Include conflicts in diff results and in status | |
95 | * GIT_DELTA_CONFLICT for items in conflict (with multiple files) | |
96 | * Appropriate flags for status | |
97 | * Support sparse checkout (i.e. "core.sparsecheckout" and ".git/info/sparse-checkout") |