github: What to do when unittests fail?
Jonathan M Davis
jmdavisProg at gmx.com
Tue May 24 12:16:25 PDT 2011
On 2011-05-24 11:45, Andrej Mitrovic wrote:
> Hmm I've gotten into some trouble. I've made a pull request for my
> first fix from a new branch:
> https://github.com/D-Programming-Language/phobos/pull/56
>
> Then I wanted to do another fix so I created a new branch, made the
> fix, pushed to my phobos fork on github. Then I did a pull request
> from this new branch, but in the new pull request it also showed two
> commits, the new one and the older one from the previous pull request.
>
> Should I have made multiple commits for each fix and do only a single
> pull request?
If you do each fix on completely separate branches, then you shouldn't have
this problem. It sounds like you didn't start with a clean branch. Each branch
needs to be made off a clean master (as in it has none of your changes in it)
or it'll have all of the changes that differ from the main repository's
master. That's one reason to always keep a clean master and make no changes on
it directly. Any branches that you make from it are going to be clean.
Now, combining related changes into a single pull request (especially if
they're small) is fine. In fact, if the changes are small and at all related,
it would probably be preferrable, since then there's less administration to
deal with. However, remember that each pull request can be accepted or
rejected individually, so if there's any real chance that one set of changes
would be accepted and another rejected (particularly if they're not really all
that related), then they should probably be separate pull requests. But
remember that there's always the possibility that you'll be asked to make
adjustments to your pull request, so it's still possible for parts of your
initial request to be accepted and others rejected. Just use your best
judgement on whether your changes are related enough to be done as a single
pull request or whether they should be done separately.
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list