Skip to content

Potential improvements for partial/shallow clones #4907

@Rudxain

Description

@Rudxain

Important

disclaimer: I've only searched the codebase, I haven't actually used this software (yet)

I assume there's no feature for doing a partial or shallow clone, but if such feature were to be added, I have tips to share:

  • If the user has a shallow clone, warn them before amending the grafted commit. Amending such commits will break the history
  • If the user wants to do a shallow-clone, it's likely they also want to apply a --filter to it. Git allows clones to be shallow and partial at the same time. I have minimal experience with such repos, but everything is fine so far!
  • Before computing the blame of a file in a partial-clone, use backfill to fetch the blobs+trees faster. I guess Git doesn't do this by default because backfill is experimental (according to the manpage)
  • When rebasing 2 branches in a partial-clone, use --reapply-cherry-picks to avoid "infinite" loops

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions