branch naming

branch naming

ໂດຍ Cathal O'Riordan -
ຈຳນວນການຕອບກັບ: 3
ຮູບພາບຂອງ Core developers
Hi,

Just wondering if someone could provide some guidance on feature or bug fixing branch naming in Moodle? I see that some branches are prefixed with 'wip-' and others take the format 'MDL-12345'. What's the difference? Is there a preferred naming scheme that people contributing patches is expected to follow?

regards,
Cathal.


ການຈັດອັນດັບສະເລ່ຍ: -
ໃນການຕອບກັບຫາ Cathal O'Riordan

Re: branch naming

ໂດຍ Tim Hunt -
ຮູບພາບຂອງ Core developers ຮູບພາບຂອງ Documentation writers ຮູບພາບຂອງ Particularly helpful Moodlers ຮູບພາບຂອງ Peer reviewers ຮູບພາບຂອງ Plugin developers

There are no requirements on branch name, just on commit comments.

Obviously you want a name that is clear, so you obviously need the issue id MDL-12345, and also some indication of which branch it is for.

When you come to submit your branch for peer-review, then you give the branch name.

I suggest you look at the various variations that people use, and choose the one you think looks nicest.

ການຈັດອັນດັບສະເລ່ຍ:Useful (1)
ໃນການຕອບກັບຫາ Cathal O'Riordan

Re: branch naming

ໂດຍ David Mudrák -
ຮູບພາບຂອງ Core developers ຮູບພາບຂອງ Documentation writers ຮູບພາບຂອງ Moodle HQ ຮູບພາບຂອງ Particularly helpful Moodlers ຮູບພາບຂອງ Peer reviewers ຮູບພາບຂອງ Plugin developers ຮູບພາບຂອງ Plugins guardians ຮູບພາບຂອງ Testers ຮູບພາບຂອງ Translators

I personally use the format that the mdk utility uses by default, too: MDL-12345-27-shortdesc (fix for MDL-12345 to be merged to MOODLE_27_STABLE). The short description helps to quickly remind me what the branch is for without the need to open the tracker (in case you have couple of them).

The wip- prefix is sort of relict from early times we started with Git. In Git world, there is one general rule that one should not rebase a branch once it was published (because others might base their own work on such branch). So we thought it would be a good idea that when a branch starts with wip- (work in progress), it gives a clear sign that the developer may want/need to rebase it yet. However, it turned out that no-one really needs such rule as 1) most of our branches are bug fix branches and 2) most branches are being rebased quite often (weekly). So I do not think that wip- plays any significant role any more.

ການຈັດອັນດັບສະເລ່ຍ:Useful (2)