Loading docs/CONTRIBUTE +180 −204 Original line number Diff line number Diff line _ _ ____ _ ___| | | | _ \| | / __| | | | |_) | | | (__| |_| | _ <| |___ \___|\___/|_| \_\_____| When Contributing Source Code This document is intended to offer guidelines that can be useful to keep in mind when you decide to contribute to the project. This concerns new features as well as corrections to existing flaws or bugs. 1. Learning cURL 1.1 Join the Community 1.2 License 1.3 What To Read 2. Write a good patch 2.1 Follow code style 2.2 Non-clobbering All Over 2.3 Write Separate Patches 2.4 Patch Against Recent Sources 2.5 Document 2.6 Test Cases 3. Sharing Your Changes 3.1 How to get your changes into the main sources 3.2 About pull requests 3.3 Making quality patches 3.5 Write good commit messages 3.6 Write Access to git Repository 3.7 How To Make a Patch with git 3.8 How To Make a Patch without git ============================================================================== 1. Learning cURL 1.1 Join the Community Skip over to https://curl.haxx.se/mail/ and join the appropriate mailing list(s). Read up on details before you post questions. Read this file before you start sending patches! We prefer patches and discussions being held on the mailing list(s), not sent to individuals. Before posting to one of the curl mailing lists, please read up on the mailing list etiquette: https://curl.haxx.se/mail/etiquette.html # Contributing to the curl project This document is intended to offer guidelines on how to best contribute to the curl project. This concerns new features as well as corrections to existing flaws or bugs. ## Learning cURL ### Join the Community Skip over to [https://curl.haxx.se/mail/](https://curl.haxx.se/mail/) and join the appropriate mailing list(s). Read up on details before you post questions. Read this file before you start sending patches! We prefer questions sent to and discussions being held on the mailing list(s), not sent to individuals. Before posting to one of the curl mailing lists, please read up on the [mailing list etiquette](https://curl.haxx.se/mail/etiquette.html). We also hang out on IRC in #curl on irc.freenode.net If you're at all interested in the code side of things, consider clicking 'watch' on the curl repo at github to get notified on pull requests and new issues posted there. 'watch' on the [curl repo on github](https://github.com/curl/curl) to get notified on pull requests and new issues posted there. 1.2. License ### License and copyright When contributing with code, you agree to put your changes and new code under the same license curl and libcurl is already using unless stated and agreed Loading @@ -66,9 +37,8 @@ properly in GPL licensed environments). When changing existing source code, you do not alter the copyright of the original file(s). The copyright will still be owned by the original creator(s) or those who have been assigned copyright by the original author(s). original file(s). The copyright will still be owned by the original creator(s) or those who have been assigned copyright by the original author(s). By submitting a patch to the curl project, you are assumed to have the right to the code and to be allowed by your employer or whatever to hand over that Loading @@ -76,24 +46,29 @@ give credit but also to keep a trace back to who made what changes. Please always provide us with your full real name when contributing! 1.3 What To Read ### What To Read Source code, the man pages, the INTERNALS document, TODO, KNOWN_BUGS and the most recent changes in the git log. Just lurking on the curl-library mailing list is gonna give you a lot of insights on what's going on right now. Asking there is a good idea too. Source code, the man pages, the [INTERNALS document](https://curl.haxx.se/dev/internals.html), [TODO](https://curl.haxx.se/docs/todo.html), [KNOWN_BUGS](https://curl.haxx.se/docs/knownbugs.html) and the [most recent changes](https://curl.haxx.se/dev/sourceactivity.html) in git. Just lurking on the [curl-library mailing list](https://curl.haxx.se/mail/list.cgi?list=curl-library) will give you a lot of insights on what's going on right now. Asking there is a good idea too. 2. Write a good patch ## Write a good patch 2.1 Follow code style ### Follow code style When writing C code, follow the CODE_STYLE already established in the project. Consistent style makes code easier to read and mistakes less likely to happen. Run 'make checksrc' before you submit anything, to make sure you follow the basic style. That script doesn't verify everything, but if it When writing C code, follow the [CODE_STYLE](https://curl.haxx.se/dev/code-style.html) already established in the project. Consistent style makes code easier to read and mistakes less likely to happen. Run `make checksrc` before you submit anything, to make sure you follow the basic style. That script doesn't verify everything, but if it complains you know you have work to do. 2.2 Non-clobbering All Over ### Non-clobbering All Over When you write new functionality or fix bugs, it is important that you don't fiddle all over the source files and functions. Remember that it is likely Loading @@ -102,28 +77,30 @@ functionality, try writing it in a new source file. If you fix bugs, try to fix one bug at a time and send them as separate patches. 2.3 Write Separate Patches ### Write Separate Changes It is annoying when you get a huge patch from someone that is said to fix 511 odd problems, but discussions and opinions don't agree with 510 of them - or 509 of them were already fixed in a different way. Then the patcher needs to extract the single interesting patch from somewhere within the huge pile of source, and that gives a lot of extra work. Preferably, all fixes that correct different problems should be in their own patch with an attached description exactly what they correct so that all patches can be selectively applied by the maintainer or other interested parties. 509 of them were already fixed in a different way. Then the person merging this change needs to extract the single interesting patch from somewhere within the huge pile of source, and that gives a lot of extra work. Also, separate patches enable bisecting much better when we track problems in the future. Preferably, each fix that correct a problem should be in its own patch/commit with its own description/commit message stating exactly what they correct so that all changes can be selectively applied by the maintainer or other interested parties. 2.4 Patch Against Recent Sources Also, separate changes enable bisecting much better when we track problems and regression in the future. Please try to get the latest available sources to make your patches against. It makes the life of the developers so much easier. The very best is if you get the most up-to-date sources from the git repository, but the latest release archive is quite OK as well! ### Patch Against Recent Sources 2.5 Document Please try to get the latest available sources to make your patches against. It makes the lives of the developers so much easier. The very best is if you get the most up-to-date sources from the git repository, but the latest release archive is quite OK as well! ### Documentation Writing docs is dead boring and one of the big problems with many open source projects. Someone's gotta do it. It makes it a lot easier if you submit a Loading @@ -134,7 +111,7 @@ ASCII files. All HTML files on the web site and in the release archives are generated from the nroff/ASCII versions. 2.6 Test Cases ### Test Cases Since the introduction of the test suite, we can quickly verify that the main features are working as they're supposed to. To maintain this situation and Loading @@ -147,12 +124,14 @@ hard to write tests for, do explain exactly how you have otherwise tested and verified your changes. 3. Sharing Your Changes ## Sharing Your Changes 3.1 How to get your changes into the main sources ### How to get your changes into the main sources Ideally you file a pull request on github, but you can also send your plain patch to the curl-library mailing list. Ideally you file a [pull request on github](https://github.com/curl/curl/pulls), but you can also send your plain patch to [the curl-library mailing list](https://curl.haxx.se/mail/list.cgi?list=curl-library). Either way, your change will be reviewed and discussed there and you will be expected to correct flaws pointed out and update accordingly, or the change Loading @@ -164,20 +143,20 @@ sign that you're not very anxious to get your patch accepted and we tend to simply drop such changes. 3.2 About pull requests ### About pull requests With github it is easy to send a pull request to the curl project to have changes merged this way instead of mailing patches to the curl-library mailing list. See https://github.com/curl/curl/pulls With github it is easy to send a [pull request](https://github.com/curl/curl/pulls) to the curl project to have changes merged. We prefer pull requests as it makes it a proper git commit that is easy to merge and they are easy to track and not that easy to loose in a flood of many emails, like they sometimes do on the mailing lists. We prefer pull requests to mailed patches, as it makes it a proper git commit that is easy to merge and they are easy to track and not that easy to loose in a flood of many emails, like they sometimes do on the mailing lists. When you ajust your pull requests after review, consider squashing the commits so that we can review the full updated version more easily. 3.3 Making quality patches ### Making quality patches Make the patch against as recent sources as possible. Loading @@ -185,20 +164,18 @@ incorporated or responded to after some weeks, consider resubmitting it to the list or better yet: change it to a pull request. 3.5 Write good commit messages ### Write good commit messages A short guide to how to do fine commit messages in the curl project. A short guide to how to write commit messages in the curl project. ---- start ---- [area]: [short line describing the main effect] [separate the above single line from the rest with an empty line] -- empty line -- [full description, no wider than 72 columns that describe as much as possible as to why this change is made, and possibly what things it fixes and everything else that is related] [Bug: link to source of the report or more related discussion] -- empty line -- [Bug: URL to source of the report or more related discussion] [Reported-by: John Doe - credit the reporter] [whatever-else-by: credit all helpers, finders, doers] ---- stop ---- Loading @@ -207,7 +184,7 @@ and make sure that you have your own user and email setup correctly in git before you commit 3.6 Write Access to git Repository ### Write Access to git Repository If you are a very frequent contributor, you may be given push access to the git repository and then you'll be able to push your changes straight into the Loading @@ -216,7 +193,7 @@ Just ask if this is what you'd want. You will be required to have posted several high quality patches first, before you can be granted push access. 3.7 How To Make a Patch with git ### How To Make a Patch with git You need to first checkout the repository: Loading @@ -228,8 +205,7 @@ git commit [file] As usual, group your commits so that you commit all changes that at once that constitutes a logical change. See also section "3.5 Write good commit messages". constitutes a logical change. Once you have done all your commits and you're happy with what you see, you can make patches out of your changes that are suitable for mailing: Loading @@ -242,7 +218,7 @@ Now send those patches off to the curl-library list. You can of course opt to do that with the 'git send-email' command. 3.8 How To Make a Patch without git ### How To Make a Patch without git Keep a copy of the unmodified curl sources. Make your changes in a separate source tree. When you think you have something that you want to offer the Loading @@ -262,10 +238,10 @@ For unix-like operating systems: https://savannah.gnu.org/projects/patch/ https://www.gnu.org/software/diffutils/ - [https://savannah.gnu.org/projects/patch/](https://savannah.gnu.org/projects/patch/) - [https://www.gnu.org/software/diffutils/](https://www.gnu.org/software/diffutils/) For Windows: http://gnuwin32.sourceforge.net/packages/patch.htm http://gnuwin32.sourceforge.net/packages/diffutils.htm - [http://gnuwin32.sourceforge.net/packages/patch.htm](http://gnuwin32.sourceforge.net/packages/patch.htm) - [http://gnuwin32.sourceforge.net/packages/diffutils.htm](http://gnuwin32.sourceforge.net/packages/diffutils.htm) Loading
docs/CONTRIBUTE +180 −204 Original line number Diff line number Diff line _ _ ____ _ ___| | | | _ \| | / __| | | | |_) | | | (__| |_| | _ <| |___ \___|\___/|_| \_\_____| When Contributing Source Code This document is intended to offer guidelines that can be useful to keep in mind when you decide to contribute to the project. This concerns new features as well as corrections to existing flaws or bugs. 1. Learning cURL 1.1 Join the Community 1.2 License 1.3 What To Read 2. Write a good patch 2.1 Follow code style 2.2 Non-clobbering All Over 2.3 Write Separate Patches 2.4 Patch Against Recent Sources 2.5 Document 2.6 Test Cases 3. Sharing Your Changes 3.1 How to get your changes into the main sources 3.2 About pull requests 3.3 Making quality patches 3.5 Write good commit messages 3.6 Write Access to git Repository 3.7 How To Make a Patch with git 3.8 How To Make a Patch without git ============================================================================== 1. Learning cURL 1.1 Join the Community Skip over to https://curl.haxx.se/mail/ and join the appropriate mailing list(s). Read up on details before you post questions. Read this file before you start sending patches! We prefer patches and discussions being held on the mailing list(s), not sent to individuals. Before posting to one of the curl mailing lists, please read up on the mailing list etiquette: https://curl.haxx.se/mail/etiquette.html # Contributing to the curl project This document is intended to offer guidelines on how to best contribute to the curl project. This concerns new features as well as corrections to existing flaws or bugs. ## Learning cURL ### Join the Community Skip over to [https://curl.haxx.se/mail/](https://curl.haxx.se/mail/) and join the appropriate mailing list(s). Read up on details before you post questions. Read this file before you start sending patches! We prefer questions sent to and discussions being held on the mailing list(s), not sent to individuals. Before posting to one of the curl mailing lists, please read up on the [mailing list etiquette](https://curl.haxx.se/mail/etiquette.html). We also hang out on IRC in #curl on irc.freenode.net If you're at all interested in the code side of things, consider clicking 'watch' on the curl repo at github to get notified on pull requests and new issues posted there. 'watch' on the [curl repo on github](https://github.com/curl/curl) to get notified on pull requests and new issues posted there. 1.2. License ### License and copyright When contributing with code, you agree to put your changes and new code under the same license curl and libcurl is already using unless stated and agreed Loading @@ -66,9 +37,8 @@ properly in GPL licensed environments). When changing existing source code, you do not alter the copyright of the original file(s). The copyright will still be owned by the original creator(s) or those who have been assigned copyright by the original author(s). original file(s). The copyright will still be owned by the original creator(s) or those who have been assigned copyright by the original author(s). By submitting a patch to the curl project, you are assumed to have the right to the code and to be allowed by your employer or whatever to hand over that Loading @@ -76,24 +46,29 @@ give credit but also to keep a trace back to who made what changes. Please always provide us with your full real name when contributing! 1.3 What To Read ### What To Read Source code, the man pages, the INTERNALS document, TODO, KNOWN_BUGS and the most recent changes in the git log. Just lurking on the curl-library mailing list is gonna give you a lot of insights on what's going on right now. Asking there is a good idea too. Source code, the man pages, the [INTERNALS document](https://curl.haxx.se/dev/internals.html), [TODO](https://curl.haxx.se/docs/todo.html), [KNOWN_BUGS](https://curl.haxx.se/docs/knownbugs.html) and the [most recent changes](https://curl.haxx.se/dev/sourceactivity.html) in git. Just lurking on the [curl-library mailing list](https://curl.haxx.se/mail/list.cgi?list=curl-library) will give you a lot of insights on what's going on right now. Asking there is a good idea too. 2. Write a good patch ## Write a good patch 2.1 Follow code style ### Follow code style When writing C code, follow the CODE_STYLE already established in the project. Consistent style makes code easier to read and mistakes less likely to happen. Run 'make checksrc' before you submit anything, to make sure you follow the basic style. That script doesn't verify everything, but if it When writing C code, follow the [CODE_STYLE](https://curl.haxx.se/dev/code-style.html) already established in the project. Consistent style makes code easier to read and mistakes less likely to happen. Run `make checksrc` before you submit anything, to make sure you follow the basic style. That script doesn't verify everything, but if it complains you know you have work to do. 2.2 Non-clobbering All Over ### Non-clobbering All Over When you write new functionality or fix bugs, it is important that you don't fiddle all over the source files and functions. Remember that it is likely Loading @@ -102,28 +77,30 @@ functionality, try writing it in a new source file. If you fix bugs, try to fix one bug at a time and send them as separate patches. 2.3 Write Separate Patches ### Write Separate Changes It is annoying when you get a huge patch from someone that is said to fix 511 odd problems, but discussions and opinions don't agree with 510 of them - or 509 of them were already fixed in a different way. Then the patcher needs to extract the single interesting patch from somewhere within the huge pile of source, and that gives a lot of extra work. Preferably, all fixes that correct different problems should be in their own patch with an attached description exactly what they correct so that all patches can be selectively applied by the maintainer or other interested parties. 509 of them were already fixed in a different way. Then the person merging this change needs to extract the single interesting patch from somewhere within the huge pile of source, and that gives a lot of extra work. Also, separate patches enable bisecting much better when we track problems in the future. Preferably, each fix that correct a problem should be in its own patch/commit with its own description/commit message stating exactly what they correct so that all changes can be selectively applied by the maintainer or other interested parties. 2.4 Patch Against Recent Sources Also, separate changes enable bisecting much better when we track problems and regression in the future. Please try to get the latest available sources to make your patches against. It makes the life of the developers so much easier. The very best is if you get the most up-to-date sources from the git repository, but the latest release archive is quite OK as well! ### Patch Against Recent Sources 2.5 Document Please try to get the latest available sources to make your patches against. It makes the lives of the developers so much easier. The very best is if you get the most up-to-date sources from the git repository, but the latest release archive is quite OK as well! ### Documentation Writing docs is dead boring and one of the big problems with many open source projects. Someone's gotta do it. It makes it a lot easier if you submit a Loading @@ -134,7 +111,7 @@ ASCII files. All HTML files on the web site and in the release archives are generated from the nroff/ASCII versions. 2.6 Test Cases ### Test Cases Since the introduction of the test suite, we can quickly verify that the main features are working as they're supposed to. To maintain this situation and Loading @@ -147,12 +124,14 @@ hard to write tests for, do explain exactly how you have otherwise tested and verified your changes. 3. Sharing Your Changes ## Sharing Your Changes 3.1 How to get your changes into the main sources ### How to get your changes into the main sources Ideally you file a pull request on github, but you can also send your plain patch to the curl-library mailing list. Ideally you file a [pull request on github](https://github.com/curl/curl/pulls), but you can also send your plain patch to [the curl-library mailing list](https://curl.haxx.se/mail/list.cgi?list=curl-library). Either way, your change will be reviewed and discussed there and you will be expected to correct flaws pointed out and update accordingly, or the change Loading @@ -164,20 +143,20 @@ sign that you're not very anxious to get your patch accepted and we tend to simply drop such changes. 3.2 About pull requests ### About pull requests With github it is easy to send a pull request to the curl project to have changes merged this way instead of mailing patches to the curl-library mailing list. See https://github.com/curl/curl/pulls With github it is easy to send a [pull request](https://github.com/curl/curl/pulls) to the curl project to have changes merged. We prefer pull requests as it makes it a proper git commit that is easy to merge and they are easy to track and not that easy to loose in a flood of many emails, like they sometimes do on the mailing lists. We prefer pull requests to mailed patches, as it makes it a proper git commit that is easy to merge and they are easy to track and not that easy to loose in a flood of many emails, like they sometimes do on the mailing lists. When you ajust your pull requests after review, consider squashing the commits so that we can review the full updated version more easily. 3.3 Making quality patches ### Making quality patches Make the patch against as recent sources as possible. Loading @@ -185,20 +164,18 @@ incorporated or responded to after some weeks, consider resubmitting it to the list or better yet: change it to a pull request. 3.5 Write good commit messages ### Write good commit messages A short guide to how to do fine commit messages in the curl project. A short guide to how to write commit messages in the curl project. ---- start ---- [area]: [short line describing the main effect] [separate the above single line from the rest with an empty line] -- empty line -- [full description, no wider than 72 columns that describe as much as possible as to why this change is made, and possibly what things it fixes and everything else that is related] [Bug: link to source of the report or more related discussion] -- empty line -- [Bug: URL to source of the report or more related discussion] [Reported-by: John Doe - credit the reporter] [whatever-else-by: credit all helpers, finders, doers] ---- stop ---- Loading @@ -207,7 +184,7 @@ and make sure that you have your own user and email setup correctly in git before you commit 3.6 Write Access to git Repository ### Write Access to git Repository If you are a very frequent contributor, you may be given push access to the git repository and then you'll be able to push your changes straight into the Loading @@ -216,7 +193,7 @@ Just ask if this is what you'd want. You will be required to have posted several high quality patches first, before you can be granted push access. 3.7 How To Make a Patch with git ### How To Make a Patch with git You need to first checkout the repository: Loading @@ -228,8 +205,7 @@ git commit [file] As usual, group your commits so that you commit all changes that at once that constitutes a logical change. See also section "3.5 Write good commit messages". constitutes a logical change. Once you have done all your commits and you're happy with what you see, you can make patches out of your changes that are suitable for mailing: Loading @@ -242,7 +218,7 @@ Now send those patches off to the curl-library list. You can of course opt to do that with the 'git send-email' command. 3.8 How To Make a Patch without git ### How To Make a Patch without git Keep a copy of the unmodified curl sources. Make your changes in a separate source tree. When you think you have something that you want to offer the Loading @@ -262,10 +238,10 @@ For unix-like operating systems: https://savannah.gnu.org/projects/patch/ https://www.gnu.org/software/diffutils/ - [https://savannah.gnu.org/projects/patch/](https://savannah.gnu.org/projects/patch/) - [https://www.gnu.org/software/diffutils/](https://www.gnu.org/software/diffutils/) For Windows: http://gnuwin32.sourceforge.net/packages/patch.htm http://gnuwin32.sourceforge.net/packages/diffutils.htm - [http://gnuwin32.sourceforge.net/packages/patch.htm](http://gnuwin32.sourceforge.net/packages/patch.htm) - [http://gnuwin32.sourceforge.net/packages/diffutils.htm](http://gnuwin32.sourceforge.net/packages/diffutils.htm)