Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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?)

share|improve this question

2 Answers 2

up vote 2 down vote accepted

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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