Skip to content

Commit f17ee83

Browse files
Anthony Demurtasdregad
authored andcommitted
The default branch "master" is now configurable for all VCS using the hardcoded "master" branch
1 parent 550d6d2 commit f17ee83

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

SourceBitBucket/SourceBitBucket.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function update_repo_form( $p_repo ) {
111111
if( isset($p_repo->info['master_branch']) ) {
112112
$t_master_branch = $p_repo->info['master_branch'];
113113
} else {
114-
$t_master_branch = 'master';
114+
$t_master_branch = config_get( 'plugin_Source_default_branch', 'master' );
115115
}
116116
?>
117117
<tr>
@@ -223,7 +223,7 @@ public function import_full( $p_repo, $p_use_cache = true ) {
223223
$t_branch = $p_repo->info['master_branch'];
224224

225225
if( is_blank( $t_branch ) ) {
226-
$t_branch = 'master';
226+
$t_branch = config_get( 'plugin_Source_default_branch', 'master' );
227227
}
228228

229229
$t_username = $p_repo->info['bit_username'];

SourceCgit/SourceCgit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function update_repo_form( $p_repo ) {
9393
if ( isset( $p_repo->info['master_branch'] ) ) {
9494
$t_master_branch = $p_repo->info['master_branch'];
9595
} else {
96-
$t_master_branch = 'master';
96+
$t_master_branch = config_get( 'plugin_Source_default_branch', 'master' );
9797
}
9898
?>
9999
<tr>
@@ -157,7 +157,7 @@ public function import_full( $p_repo ) {
157157

158158
$t_branch = $p_repo->info['master_branch'];
159159
if ( is_blank( $t_branch ) ) {
160-
$t_branch = 'master';
160+
$t_branch = config_get( 'plugin_Source_default_branch', 'master' );
161161
}
162162

163163
$t_branches = array_map( 'trim', explode( ',', $t_branch ) );

SourceGithub/SourceGithub.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ public function update_repo_form( $p_repo ) {
288288
if ( isset( $p_repo->info['master_branch'] ) ) {
289289
$t_master_branch = $p_repo->info['master_branch'];
290290
} else {
291-
$t_master_branch = 'master';
291+
$t_master_branch = config_get( 'plugin_Source_default_branch', 'master' );
292292
}
293293
?>
294294

@@ -572,7 +572,7 @@ public function import_full( $p_repo ) {
572572

573573
$t_branch = $p_repo->info['master_branch'];
574574
if ( is_blank( $t_branch ) ) {
575-
$t_branch = 'master';
575+
$t_branch = config_get( 'plugin_Source_default_branch', 'master' );
576576
}
577577

578578
if ($t_branch != '*')

SourceGitphp/SourceGitphp.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function update_repo_form( $p_repo ) {
8484
if ( isset( $p_repo->info['master_branch'] ) ) {
8585
$t_master_branch = $p_repo->info['master_branch'];
8686
} else {
87-
$t_master_branch = 'master';
87+
$t_master_branch = config_get( 'plugin_Source_default_branch', 'master' );
8888
}
8989
?>
9090
<tr>
@@ -152,7 +152,7 @@ public function import_full( $p_repo ) {
152152
echo '<pre>';
153153
$t_branch = $p_repo->info['master_branch'];
154154
if ( is_blank( $t_branch ) ) {
155-
$t_branch = 'master';
155+
$t_branch = config_get( 'plugin_Source_default_branch', 'master' );
156156
}
157157

158158
if ($t_branch != '*')

SourceGitweb/SourceGitweb.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function update_repo_form( $p_repo ) {
104104
if ( isset( $p_repo->info['master_branch'] ) ) {
105105
$t_master_branch = $p_repo->info['master_branch'];
106106
} else {
107-
$t_master_branch = 'master';
107+
$t_master_branch = config_get( 'plugin_Source_default_branch', 'master' );
108108
}
109109
?>
110110
<tr>
@@ -189,7 +189,7 @@ public function import_full( $p_repo ) {
189189

190190
$t_branch = $p_repo->info['master_branch'];
191191
if ( is_blank( $t_branch ) ) {
192-
$t_branch = 'master';
192+
$t_branch = config_get( 'plugin_Source_default_branch', 'master' );
193193
}
194194

195195
if ($t_branch != '*')

0 commit comments

Comments
 (0)