<< Back to previous view

[QB-3163] Depth option for git repositories is basically unusable except if you just use one branch
Created: 30/Mar/18  Updated: 22/Apr/18

Status: Resolved
Project: QuickBuild
Component/s: None
Affects Version/s: 7.0.31, 8.0.1
Fix Version/s: 8.0.3

Type: Bug Priority: Critical
Reporter: AlSt Assigned To: Unassigned
Resolution: Fixed Votes: 0
Remaining Estimate: Unknown Time Spent: Unknown
Original Estimate: Unknown

File Attachments: JPEG File branch-commits.jpg    

 Description   
Hi!

We have some huge git repositories now and would like to use the depth option to not clone the whole history, but this does not work on multiple branches.

For example if we want to build a commit which is not reachable from HEAD (because it is in a different branch which exists in parallel to master) it fails because the revision could not be found.

There are basically two things which would make that usable:
1. Add a "Clone branch" option where one can define which branch should be cloned if "depth" is set (to something other than 0 which means it is disabled) and add that as "--branch <clone branch>" additionally to "--depth <depth>"
2. If "Clone branch" is empty add "--no-single-branch" (additionally to --depth) so that all commits can be reached and not just the history of HEAD.

I hope this makes clear what we need. If not, please just ask.

Thanks,
Alex

 Comments   
Comment by AlSt [ 30/Mar/18 12:52 PM ]
I added a little drawing to maybe make it clearer.

If we want to build "branchcommit-1" it will fail if the "--depth" option is used.

With our solution (we know that one config will only build commits from a specified branch) we could either set the "Clone branch" to the branch name where "branchcommit-1" is located or set nothing and we still can reach "branchcommit-1" because the history (limited to depth) is available for all branches.
Comment by Robin Shen [ 22/Apr/18 12:13 PM ]
Only "--no-single-branch" is added as I do not want to add another configurable "clone branch" option to confuse users considering there is already a branch related setting
Generated at Tue Apr 16 13:34:30 UTC 2024 using JIRA 189.