Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support git-lfs? #160

Open
wlandau opened this issue Nov 15, 2021 · 1 comment
Open

Support git-lfs? #160

wlandau opened this issue Nov 15, 2021 · 1 comment

Comments

@wlandau
Copy link

wlandau commented Nov 15, 2021

I am trying to use gert with git-lfs, and it looks like it does not work out of the box.

library(gert)
#> Linking to libgit2 v1.1.0, ssh support: YES
#> Global config: /home/CENSORED/.gitconfig
#> System config: /etc/gitconfig
#> Default user: wlandau will.landau@lilly.com
writeLines("contents", "file.txt")
writeLines("file.txt filter=lfs diff=lfs merge=lfs -text", ".gitattributes")
git_init()
git_add("file.txt")
#> # A tibble: 5 x 3
#> file status staged
#>
#> 1 .gitattributes new FALSE
#> 2 file.txt new TRUE
#> 3 sand-viper_reprex.R new FALSE
#> 4 sand-viper_reprex.spin.R new FALSE
#> 5 sand-viper_reprex.spin.Rmd new FALSE
git_commit("First commit")
#> [1] "117017fc494d2654bae1fd96dedf5149f8bd74a3"
list.files(".git/lfs")
#> character(0)


But it does work in the Linux terminal.

```sh
$ echo "contents" >> file.txt
$ echo "file.txt filter=lfs diff=lfs merge=lfs -text" >> .gitattributes
$ git init
$ git add file.txt
$ git commit -m "First commit"
$ ls .git/lfs
objects  tmp

From git-lfs/git-lfs#375 and libgit2/libgit2sharp#1236, it looks like libgit2 + git-lfs is not automatic. Is this something at all feasible in gert?

@meowcat
Copy link

meowcat commented Dec 1, 2021

I would also be very interested in git lfs support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants