File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
git-repository/src/reference Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -57,16 +57,28 @@ impl<'r> Platform<'r> {
57
57
}
58
58
59
59
// TODO: tests
60
- /// Return an iterator over all branches.
60
+ /// Return an iterator over all local branches.
61
61
///
62
62
/// They are all prefixed with `refs/heads`.
63
- pub fn branches ( & self ) -> Result < Iter < ' _ > , init:: Error > {
63
+ pub fn local_branches ( & self ) -> Result < Iter < ' _ > , init:: Error > {
64
64
Ok ( Iter {
65
65
inner : self . platform . prefixed ( "refs/heads/" ) ?,
66
66
peel : false ,
67
67
repo : self . repo ,
68
68
} )
69
69
}
70
+
71
+ // TODO: tests
72
+ /// Return an iterator over all remote branches.
73
+ ///
74
+ /// They are all prefixed with `refs/remotes`.
75
+ pub fn remote_branches ( & self ) -> Result < Iter < ' _ > , init:: Error > {
76
+ Ok ( Iter {
77
+ inner : self . platform . prefixed ( "refs/remotes/" ) ?,
78
+ peel : false ,
79
+ repo : self . repo ,
80
+ } )
81
+ }
70
82
}
71
83
72
84
impl < ' r > Iter < ' r > {
You can’t perform that action at this time.
0 commit comments