Skip to content

Commit

Permalink
avoid pulling before doing a change to the git repo if we have disabl…
Browse files Browse the repository at this point in the history
…ed pullOnStartup
  • Loading branch information
jstrachan committed Jul 30, 2013
1 parent 842abbb commit 53f2225
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hawtio-git/src/main/java/io/hawt/git/GitFacade.java
Expand Up @@ -894,7 +894,7 @@ protected <T> T gitOperation(PersonIdent personIdent, Callable<T> callable) {
// lets stash any local changes just in case..
git.stashCreate().setPerson(personIdent).setWorkingDirectoryMessage("Stash before a write").setRef("HEAD").call();
}
if (isPullBeforeOperation() && Strings.isNotBlank(getRemoteRepository())) {
if (isPullOnStartup() && isPullBeforeOperation() && Strings.isNotBlank(getRemoteRepository())) {
doPull();
}
return callable.call();
Expand Down

0 comments on commit 53f2225

Please sign in to comment.