James Moger
2013-04-01 0f47b2f605ed4119a6042b72d3499b223f40ec90
src/main/java/com/gitblit/GitBlit.java
@@ -454,12 +454,13 @@
    * advertise alternative urls for Git client repository access.
    * 
    * @param repositoryName
    * @param userName
    * @return list of non-gitblit clone urls
    */
   public List<String> getOtherCloneUrls(String repositoryName) {
   public List<String> getOtherCloneUrls(String repositoryName, String username) {
      List<String> cloneUrls = new ArrayList<String>();
      for (String url : settings.getStrings(Keys.web.otherUrls)) {
         cloneUrls.add(MessageFormat.format(url, repositoryName));
         cloneUrls.add(MessageFormat.format(url, repositoryName, username));
      }
      return cloneUrls;
   }
@@ -1675,6 +1676,8 @@
         model.addOwners(ArrayUtils.fromString(getConfig(config, "owner", "")));
         model.useTickets = getConfig(config, "useTickets", false);
         model.useDocs = getConfig(config, "useDocs", false);
         model.useIncrementalPushTags = getConfig(config, "useIncrementalPushTags", false);
         model.incrementalPushTagPrefix = getConfig(config, "incrementalPushTagPrefix", null);
         model.allowForks = getConfig(config, "allowForks", true);
         model.accessRestriction = AccessRestrictionType.fromName(getConfig(config,
               "accessRestriction", settings.getString(Keys.git.defaultAccessRestriction, null)));
@@ -2196,6 +2199,13 @@
      config.setString(Constants.CONFIG_GITBLIT, null, "owner", ArrayUtils.toString(repository.owners));
      config.setBoolean(Constants.CONFIG_GITBLIT, null, "useTickets", repository.useTickets);
      config.setBoolean(Constants.CONFIG_GITBLIT, null, "useDocs", repository.useDocs);
      config.setBoolean(Constants.CONFIG_GITBLIT, null, "useIncrementalPushTags", repository.useIncrementalPushTags);
      if (StringUtils.isEmpty(repository.incrementalPushTagPrefix) ||
            repository.incrementalPushTagPrefix.equals(settings.getString(Keys.git.defaultIncrementalPushTagPrefix, "r"))) {
         config.unset(Constants.CONFIG_GITBLIT, null, "incrementalPushTagPrefix");
      } else {
         config.setString(Constants.CONFIG_GITBLIT, null, "incrementalPushTagPrefix", repository.incrementalPushTagPrefix);
      }
      config.setBoolean(Constants.CONFIG_GITBLIT, null, "allowForks", repository.allowForks);
      config.setString(Constants.CONFIG_GITBLIT, null, "accessRestriction", repository.accessRestriction.name());
      config.setString(Constants.CONFIG_GITBLIT, null, "authorizationControl", repository.authorizationControl.name());