Skip to content

GH snap does not include git-lfs and fails on repos with LFS content #32

Description

@RobertCoop

Describe the feature or problem you’d like to solve

I attempted to review a PR on a git-lfs-enabled repo. Error occurred:

gh pr checkout 89
Branch 'xxx' set up to track remote branch 'xxx' from 'origin'.
Switched to a new branch 'xxx'

This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-checkout.

exit status 1

Proposed solution

Problem was solved by putting git-lfs binary into the snap filesystem:

sudo unsquashfs -d /tmp/ghsnap /var/lib/snapd/snaps/gh_502.snap
cd /tmp/ghsnap/usr/bin
sudo cp /usr/bin/git-lfs .
sudo snap try /tmp/ghsnap/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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