mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-24 10:37:47 +08:00
Initial support for push options (#12169)
* Initial support for push options Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix misspelling 🤦 Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix formatting after conflict resolution * defer close git repo * According the GitLab documentation, git >= 2.10 Signed-off-by: jolheiser <john.olheiser@gmail.com> * Words are hard. Thanks @mrsdizzie 😅 Co-authored-by: mrsdizzie <info@mrsdizzie.com> * Only update if there are push options Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: mrsdizzie <info@mrsdizzie.com>
This commit is contained in:
@ -120,6 +120,12 @@ func Init(ctx context.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if version.Compare(gitVersion, "2.10", ">=") {
|
||||
if err := checkAndSetConfig("receive.advertisePushOptions", "true", true); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if version.Compare(gitVersion, "2.18", ">=") {
|
||||
if err := checkAndSetConfig("core.commitGraph", "true", true); err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user