<< Back to previous view

[QB-3569] Change Git reference repository argument to --reference-if-able
Created: 07/May/20  Updated: 09/May/20

Status: Resolved
Project: QuickBuild
Component/s: None
Affects Version/s: None
Fix Version/s: 10.0.13

Type: Improvement Priority: Major
Reporter: Michal Tyminski Assigned To: Unassigned
Resolution: Fixed Votes: 0
Remaining Estimate: Unknown Time Spent: Unknown
Original Estimate: Unknown


 Description   
Please consider using "--reference-if-able" argument instead of "--reference". Advantage of this method is that it can handle non-existing path situation.
It would be very helpful in situations when for some reason reference repository is not available on build agent so it would continue with remote repo saving build from failure by extending resource usage.

Git documentation: https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---reference-if-ableltrepositorygt

file: com.pmease.quickbuild.plugin.scm.git/src/com/pmease/quickbuild/plugin/scm/git/GitCli.java

File refRepo = new File(refRepoPath);
if (!refRepo.exists()) {
    throw new QuickbuildException("Reference repository path [" + refRepoPath + "] doesn't exist");
} else if (!refRepo.isDirectory()) {
    throw new QuickbuildException("Reference repository path [" + refRepoPath + "] should be a git directory");
} else {
    command.setLine("--reference").setValue(refRepoPath);
}

Generated at Sat Apr 20 00:45:32 UTC 2024 using JIRA 189.