mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-08 06:25:51 +01:00
(refs #313)Search files which have FileMode.EXECUTABLE_FILE mode not only REGULAR_FILE
This commit is contained in:
@@ -63,7 +63,8 @@ RepositorySearchService { self: IssuesService =>
|
||||
val list = new ListBuffer[(String, String)]
|
||||
|
||||
while (treeWalk.next()) {
|
||||
if(treeWalk.getFileMode(0) == FileMode.REGULAR_FILE){
|
||||
val mode = treeWalk.getFileMode(0)
|
||||
if(mode == FileMode.REGULAR_FILE || mode == FileMode.EXECUTABLE_FILE){
|
||||
JGitUtil.getContentFromId(git, treeWalk.getObjectId(0), false).foreach { bytes =>
|
||||
if(FileUtil.isText(bytes)){
|
||||
val text = StringUtil.convertFromByteArray(bytes)
|
||||
|
||||
Reference in New Issue
Block a user