File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
scala-git/src/main/scala/com/madgag/git Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -18,19 +18,16 @@ package com.madgag
18
18
19
19
import java .io .File
20
20
import java .nio .charset .Charset
21
-
22
21
import _root_ .scala .jdk .CollectionConverters ._
23
22
import _root_ .scala .annotation .tailrec
24
23
import _root_ .scala .language .implicitConversions
25
24
import _root_ .scala .util .{Success , Try }
26
-
27
-
28
25
import org .eclipse .jgit
29
26
import org .eclipse .jgit .api .Git
30
27
import org .eclipse .jgit .diff .DiffAlgorithm .SupportedAlgorithm
31
28
import org .eclipse .jgit .diff ._
32
29
import org .eclipse .jgit .internal .storage .file .ObjectDirectory
33
- import org .eclipse .jgit .lib .Constants .OBJ_BLOB
30
+ import org .eclipse .jgit .lib .Constants .{ OBJ_BLOB , R_HEADS }
34
31
import org .eclipse .jgit .lib .ObjectInserter .Formatter
35
32
import org .eclipse .jgit .lib .ObjectReader .OBJ_ANY
36
33
import org .eclipse .jgit .lib ._
@@ -95,7 +92,10 @@ package object git {
95
92
}
96
93
97
94
def nonSymbolicRefs = repo.getRefDatabase.getRefs.asScala.filterNot(_.isSymbolic).toSeq
95
+ }
98
96
97
+ implicit class RichRefDatabase (refDatabase : RefDatabase ) {
98
+ val branchRefs : Seq [Ref ] = refDatabase.getRefsByPrefix(R_HEADS ).asScala.toSeq
99
99
}
100
100
101
101
implicit class RichString (str : String ) {
You can’t perform that action at this time.
0 commit comments