-
Notifications
You must be signed in to change notification settings - Fork 869
Closed
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
My golang application needs to list all file and folder paths in a subfolder of a git repo (a search path). I only care about the HEAD commit. I'm using Clone() first, then walking the tree from the HEAD commit.
repo, _ = git.Clone(memory.NewStorage(), nil, git.CloneOptions{URL: repoUrl, Depth: 1})
// Get commit object at HEAD
// get tree of commit object
// iterate into tree and append file names if file is within my search path
This works but the clone operation is very slow as the repo gets large and probably gives me a ton of stuff I don't need (I'm only interested in a subset of the repo tree). I noticed that the git clone docs have a --filter option that could serve my purposes. Is this option available via the go-git library? I don't see anything in the CloneOptions object
AnthonyHerman, matejrisek, mxcd, weberc2, dekimsey and 2 more
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed