3

I've made a 4-line bug fix to a minor issue in a library on github. The project is actively maintained with changes every few days.

What is the ideal way to submit a fix that small? Is it to fork, fix and submit a pull request; file an issue and a pull request; or just file the issue with my fix copy-pasted? (Or something else?)

2 Answers 2

3

See if the project has guidelines about this.

Traditionally, you'd file a bug report, with a diff for your intended fix; the maintainer would then look at the diff and decide whether it's worth including.

Recently, the rise of distributed SCMs such as git, has spawned a different attitude where you're encouraged to just fork the project and post a link (or pull request); since forking and pulling are now cheap, the effort for the maintainer is often smaller in this scenario.

Of course, you can always do both: fork the project, apply your changes, dump a diff, and send a bug report containing both the diff and a URI to pull from.

2

I went ahead and made a pull request. That was apparently okay to the library maintainer even for a tiny patch, though I needed to make some modifications. (Fantastic, I messed up a 4-line patch.) Also, a pull request automatically adds an issue associated with the pull request, so another issue would be redundant. This seems to be the best solution for smaller projects; larger projects might have different policies.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.