Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
09846fd1
Commit
09846fd1
authored
Oct 24, 2014
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add instructions on running the tests
parent
ac63149c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
9 deletions
+33
-9
CONTRIBUTING.md
+33
-9
No files found.
CONTRIBUTING.md
View file @
09846fd1
...
@@ -54,11 +54,13 @@ out a way to help you.
...
@@ -54,11 +54,13 @@ out a way to help you.
## Pull Requests
## Pull Requests
Our work flow is a
[
typical GitHub flow
](
https://guides.github.com/introduction/flow/index.html
)
,
Our work flow is a
[
typical GitHub
where contributors fork the
[
libgit2 repository
](
https://github.com/libgit2/libgit2
)
,
flow](https://guides.github.com/introduction/flow/index.html), where
contributors fork the
[
libgit2 repository
](
https://github.com/libgit2/libgit2
)
,
make their changes on branch, and submit a
make their changes on branch, and submit a
[
Pull Request
](
https://help.github.com/articles/using-pull-requests
)
(
a.k.a.
"PR"
)
.
[
Pull Request
](
https://help.github.com/articles/using-pull-requests
)
Pull requests should usually be targeted at the
`master`
branch.
(a.k.a. "PR"). Pull requests should usually be targeted at the
`master`
branch.
Life will be a lot easier for you (and us) if you follow this pattern
Life will be a lot easier for you (and us) if you follow this pattern
(i.e. fork, named branch, submit PR). If you use your fork's
`master`
(i.e. fork, named branch, submit PR). If you use your fork's
`master`
...
@@ -77,11 +79,32 @@ also let others know that you are currently working on something.
...
@@ -77,11 +79,32 @@ also let others know that you are currently working on something.
Before wrapping up a PR, you should be sure to:
Before wrapping up a PR, you should be sure to:
*
Write tests to cover any functional changes (ideally tests that would
*
Write tests to cover any functional changes
have failed before the PR and now pass)
*
Update documentation for any changed public APIs
*
Update documentation for any changed public APIs
*
Add to the
[
`CHANGELOG.md`
](
CHANGELOG.md
)
file describing any major changes
*
Add to the
[
`CHANGELOG.md`
](
CHANGELOG.md
)
file describing any major changes
## Unit Tests
We believe that our unit tests allow us to keep the quality of libgit2
high: any new changes must not cause unit test failures, and new changes
should include unit tests that cover the bug fixes or new features.
For bug fixes, we prefer unit tests that illustrate the failure before
the change, but pass with your changes.
In addition to new tests, please ensure that your changes do not cause
any other test failures. Running the entire test suite is helpful
before you submit a pull request. When you build libgit2, the test
suite will also be built. You can run all tests by simply running
the resultant
`libgit2_clar`
binary. If you want to run a specific
unit test, you can name it with the
`-s`
option. For example:
libgit2_clar -sstatus::worktree::long_filenames
Or you can run an entire class of tests. For example, to run all the
worktree status tests:
libgit2_clar -sstatus::worktree
## Porting Code From Other Open-Source Projects
## Porting Code From Other Open-Source Projects
`libgit2`
is licensed under the terms of the GPL v2 with a linking
`libgit2`
is licensed under the terms of the GPL v2 with a linking
...
@@ -114,9 +137,10 @@ function and type naming, code formatting, and testing.
...
@@ -114,9 +137,10 @@ function and type naming, code formatting, and testing.
We like to keep the source code consistent and easy to read. Maintaining
We like to keep the source code consistent and easy to read. Maintaining
this takes some discipline, but it's been more than worth it. Take a look
this takes some discipline, but it's been more than worth it. Take a look
at the
at the
[
conventions
[
conventions
file
](
https://github.com/libgit2/libgit2/blob/development/CONVENTIONS.md
)
.
file](https://github.com/libgit2/libgit2/blob/development/CONVENTIONS.md).
## Starter Projects
## Starter Projects
See our
[
projects list
](
https://github.com/libgit2/libgit2/blob/development/PROJECTS.md
)
.
See our
[
projects
list](https://github.com/libgit2/libgit2/blob/development/PROJECTS.md).
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment