Note: This function is efficient for listing the files in the staging area, but listing all the files in a commit requires recursively walking through the git object store.
If you do not require a complete list of every file, better performance can be achieved by using walk and ignoring subdirectories you don't care about.
Returns
Resolves successfully with an array of filepaths.
Example
// All the files in the previous commit letfiles = awaitlistFiles({ fs, dir:'/tutorial', ref:'HEAD' }) console.log(files) // All the files in the current staging area files = awaitlistFiles({ fs, dir:'/tutorial' }) console.log(files)
List all the files in the git index or a commit.
Returns
Resolves successfully with an array of filepaths.
Example