Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is the second step to solve #1074960: Let maintainers set a default branch on git repositories. Once #1291308: Add setDefaultBranch() and getDefaultBranch() method to VersioncontrolGitRepository is comitted and VersioncontrolGitRepository has getters and setters for the default branch, the attached patch can go into Project Git Instructions.
Please review.
Comment | File | Size | Author |
---|---|---|---|
#1 | use-default-branch.patch | 689 bytes | Niklas Fiekas |
Comments
Comment #1
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedComment #2
helmo CreditAttribution: helmo commentedThis next bit might go in an elseif,
And we could add a comment line like "// Get default branch name if no version was selected"
But looks ok otherwise.
Comment #3
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedThank you for reviewing. I wouldn't use elseif because getDefaultBranch() could be emtpy, too.
Comment #4
helmo CreditAttribution: helmo commentedI've committed this as http://drupalcode.org/project/project_git_instructions.git/commit/ddbfa44
Hopefully that make's it easier to test the integration...
Comment #5
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedThanks helmo. Though it's not yet in versioncontrol_git I don't think the API will change, so that's great.