@@ -215,11 +215,11 @@ public static Repository getRepository(File file, CommandTimeoutType cmdType, bo
215215 });
216216 }
217217
218- if (repo .getType () == null || repo .getType ().length () == 0 ) {
218+ if (repo .getType () == null || repo .getType ().isEmpty () ) {
219219 repo .setType (repo .getClass ().getSimpleName ());
220220 }
221221
222- if (repo .getParent () == null || repo .getParent ().length () == 0 ) {
222+ if (repo .getParent () == null || repo .getParent ().isEmpty () ) {
223223 try {
224224 repo .setParent (repo .determineParent (cmdType ));
225225 } catch (IOException ex ) {
@@ -229,7 +229,7 @@ public static Repository getRepository(File file, CommandTimeoutType cmdType, bo
229229 }
230230 }
231231
232- if (repo .getBranch () == null || repo .getBranch ().length () == 0 ) {
232+ if (repo .getBranch () == null || repo .getBranch ().isEmpty () ) {
233233 try {
234234 repo .setBranch (repo .determineBranch (cmdType ));
235235 } catch (IOException ex ) {
@@ -239,7 +239,7 @@ public static Repository getRepository(File file, CommandTimeoutType cmdType, bo
239239 }
240240 }
241241
242- if (repo .getCurrentVersion () == null || repo .getCurrentVersion ().length () == 0 ) {
242+ if (repo .getCurrentVersion () == null || repo .getCurrentVersion ().isEmpty () ) {
243243 try {
244244 repo .setCurrentVersion (repo .determineCurrentVersion (cmdType ));
245245 } catch (IOException ex ) {
@@ -249,14 +249,16 @@ public static Repository getRepository(File file, CommandTimeoutType cmdType, bo
249249 }
250250 }
251251
252+ // This has to be called before building tag list below as it depends on the repository properties
253+ // inherited from the project/configuration.
254+ repo .fillFromProject ();
255+
252256 // If this repository displays tags only for files changed by tagged
253257 // revision, we need to prepare list of all tags in advance.
254258 if (cmdType .equals (CommandTimeoutType .INDEXER ) && repo .isTagsEnabled () && repo .hasFileBasedTags ()) {
255259 repo .buildTagList (file , cmdType );
256260 }
257261
258- repo .fillFromProject ();
259-
260262 break ;
261263 }
262264 }
0 commit comments