r-lib / gert

Simple git client for R
https://docs.ropensci.org/gert/
Other
146 stars 31 forks source link

Added use of .gitattributes for git_archive_zip #191

Closed DavideMessinaARS closed 1 year ago

DavideMessinaARS commented 1 year ago

The original git command 'git archive' considers the existence of .gitattributes and searches for files or directories with attributes 'export-ignore' or 'export-subst' inside it. The modification is about implementing the functionality connected to 'export-ignore'. What it does is ignore files/folders with that attribute when building the archive.

In theory, it should work as the normal 'git archive' command

jeroen commented 1 year ago

I feel a bit uncomfortable with custom parsers for the gitattributes format. For example this doesn't seem to support the * and ** wildcards ?

DavideMessinaARS commented 1 year ago

Mmmh... you are right. Sorry for wasting your time, but I felt this would have been a fine addition to the function, at least to make it a little bit less custom and more like the true 'git archive' command. I will find another solution then to our necessities.