Skip to content

Enhance git clone with missing options #1846

@jelmer

Description

@jelmer

Summary

The git clone command in dulwich is missing several useful options that are available in standard git.

Missing Options

  • --shallow-since: Create a shallow clone with history after a specific date
  • --shallow-exclude: Create a shallow clone excluding commits reachable from specified refs
  • --single-branch: Clone only the history leading to the tip of a single branch
  • --no-tags: Don't clone any tags
  • --recurse-submodules: Initialize and clone submodules recursively

Benefits

These options would improve dulwich's git clone functionality by:

  • Enabling shallow clones with specific date constraints using --shallow-since
  • Providing more control over shallow clone boundaries with --shallow-exclude
  • Reducing clone size and time with --single-branch and --no-tags
  • Supporting projects with submodules through --recurse-submodules

This would bring dulwich's clone command closer to feature parity with standard git and better support modern development practices like CI/CD pipelines that benefit from faster, smaller clones.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions