I still think a couple of helper methods will make the tests easier to read:

  private void setBare(File gitDir, boolean bare) {
    Repository repo = new Repository(gitDir, null);
    repo.getConfig().setBoolean(ConfigConstants.CONFIG_CORE_SECTION,
        null, ConfigConstants.CONFIG_KEY_BARE, bare);
    repo.getConfig().save();
  }

  private void setWorkTree(File gitDir, File workTree) {
    Repository repo = new Repository(gitDir, null);
    repo.getConfig().setBoolean(ConfigConstants.CONFIG_CORE_SECTION,
        null, ConfigConstants.CONFIG_KEY_WORKTREE,
        workTree.getAbsolutePath());
    repo.getConfig().save();
  }

Then the tests are a bit more declarative as they setup their condition to be tested.