}
func isIndexable(entry *git.TreeEntry) bool {
- return entry.IsRegular()
+ return entry.IsRegular() || entry.IsExecutable()
}
// parseGitLsTreeOutput parses the output of a `git ls-tree -r --full-name` command
return te.gogitTreeEntry.Mode == filemode.Regular
}
+// IsExecutable if the entry is an executable file (not necessarily binary)
+func (te *TreeEntry) IsExecutable() bool {
+ return te.gogitTreeEntry.Mode == filemode.Executable
+}
+
// Blob returns the blob object the entry
func (te *TreeEntry) Blob() *Blob {
encodedObj, err := te.ptree.repo.gogitRepo.Storer.EncodedObject(plumbing.AnyObject, te.gogitTreeEntry.Hash)