Skip to content
This repository was archived by the owner on Jul 18, 2022. It is now read-only.
This repository was archived by the owner on Jul 18, 2022. It is now read-only.

Fail on shallow Git clones #68

@fbiville

Description

@fbiville

When one clones a repository with a limited depth (such as the most extreme git clone [...] --depth=1), every file will be associated with the oldest fetched commit in the shallow clone or newer.
In other words, files that pre-dates the earliest shallow clone's commit will be considered as created at that commit, which is wrong. In the above extreme example, all files are considered created at the shallow clone sole commit.

The only safe way seems to reject shallow clones entirely.
Luckily, the shallowness information is accessible since Git 2.15, as explained here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions