Skip to content

Register gitlab repository into scalar maintenance automatically

Overview

Scalar is a tool for managing large Git repositories. It ships with Git, and makes it so that Git is configured to work as efficiently as possible on large Git repositories.

Impacted categories

The following categories relate to this issue:

Impact

  • Productivity improvement: Faster Git operations
  • Faster onboarding: Initial GitLab clone downloads significantly faster

Proposal

Register the local gitlab repository with scalar during gdk update to benefit from scalar's optimized Git configuration and maintenance scheduling without the complexity of using scalar clone.

Implementation guide

  1. Add a new Rake task gitlab-scalar-register in lib/tasks/update.rake
  2. Execute after gitlab-git-pull - Insert the new task directly after the existing gitlab-git-pull task in the gitlab task dependency chain
  3. Use scalar register --no-maintenance to avoid lock file conflicts with existing maintenance processes
  4. Expected outcome: The gitlab/.git/config file will have the updated scalar configuration for optimized Git operations

This approach:

  • Leverages scalar's proven Git optimizations without maintenance overhead
  • Integrates seamlessly into existing GDK update workflow
  • Avoids potential issues with partial clones (--filter blob:none)
  • Works with existing GDK instances without requiring re-cloning
Edited by Kev Kloss