woodpecker-ci / plugin-git

Woodpecker plugin for cloning Git repositories
https://woodpecker-ci.org/docs/usage/workflow-syntax#clone
Apache License 2.0
16 stars 25 forks source link

Support cloning Git LFS data #7

Closed reivilibre closed 2 years ago

reivilibre commented 2 years ago

Clear and concise description of the problem

When using Git LFS in a repository, the LFS data is not cloned and I'm left with textual pointers describing the objects in their place.

As a point of comparison, Drone seems to handle LFS automatically.

Suggested solution

I'm not exactly sure which part is responsible for cloning the repository, but it could detect when LFS is in use and automatically pull the LFS content.

Alternative

No response

Additional context

As a work around,

  cloneLfs:
    image: alpine:3.14
    commands:
      - apk add git-lfs
      - git lfs pull

appears to work

Validations

reivilibre commented 2 years ago

I tested using the below clone override and it works :partying_face: :)

clone:
  git:
    image: woodpeckerci/plugin-git:v1.2.0
6543 commented 2 years ago

git fetch woodpeckerci/plugin-git:latest on agent hosts should do it to now