Skip to content

Commit

Permalink
Treat credentials as immutable within repository
Browse files Browse the repository at this point in the history
In 1.9.1, Credentials was changed from Immutable to Canonical in order
to better support default values that won't cause problems later on in
the code. Repository relied on Credentials being considered Immutable
and thus caused an exception anytime you pass credentials in to an open
(or similar call) that creates a Repository.

Instructing Repository to treat it as immutable should resolve this
issue #163.
  • Loading branch information
ajoberstar committed Jun 5, 2017
1 parent 2e13c28 commit 3b8c7e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/groovy/org/ajoberstar/grgit/Repository.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import org.eclipse.jgit.api.Git
* A repository.
* @since 0.1.0
*/
@Immutable(knownImmutableClasses=[Git, File])
@Immutable(knownImmutableClasses=[Git, File, Credentials])
class Repository {
/**
* The directory the repository is contained in.
Expand Down

0 comments on commit 3b8c7e7

Please sign in to comment.