Skip to content

Commit 7a927a0

Browse files
committed
Add default safe methods for Repository::checkout
Reviewed-by: rwestberg
1 parent bcd21d8 commit 7a927a0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

vcs/src/main/java/org/openjdk/skara/vcs/Repository.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,13 @@
3535
public interface Repository extends ReadOnlyRepository {
3636
Repository init() throws IOException;
3737
void checkout(Hash h, boolean force) throws IOException;
38+
default void checkout(Hash h) throws IOException {
39+
checkout(h, false);
40+
}
3841
void checkout(Branch b, boolean force) throws IOException;
42+
default void checkout(Branch b) throws IOException {
43+
checkout(b, false);
44+
}
3945
Hash fetch(URI uri, String refspec) throws IOException;
4046
void fetchAll() throws IOException;
4147
void pushAll(URI uri) throws IOException;

0 commit comments

Comments
 (0)