- Fix forcing default locale to en or LANG_CC for web ui (ticket-51)
- Fix inconsistency with repository ownership permission checking (ticket-52)
- Prevent submission from New|Edit ticket page with empty titles (ticket-53)
+ - Ensure the repository model ref list is refreshed on ref creation or deletion (ticket-54)
- Fix case-sensitivity error in determining fork network (issue-420, ticket-62)
- Fix transport determination for SSH urls served on port 22 (issue-421, ticket-63)
changes:
return;\r
}\r
\r
+ boolean isRefCreationOrDeletion = false;\r
+\r
// log ref changes\r
for (ReceiveCommand cmd : commands) {\r
\r
switch (cmd.getType()) {\r
case DELETE:\r
LOGGER.info(MessageFormat.format("{0} DELETED {1} in {2} ({3})", user.username, cmd.getRefName(), repository.name, cmd.getOldId().name()));\r
+ isRefCreationOrDeletion = true;\r
break;\r
case CREATE:\r
LOGGER.info(MessageFormat.format("{0} CREATED {1} in {2}", user.username, cmd.getRefName(), repository.name));\r
+ isRefCreationOrDeletion = true;\r
break;\r
case UPDATE:\r
LOGGER.info(MessageFormat.format("{0} UPDATED {1} in {2} (from {3} to {4})", user.username, cmd.getRefName(), repository.name, cmd.getOldId().name(), cmd.getNewId().name()));\r
}\r
}\r
\r
+ if (isRefCreationOrDeletion) {\r
+ gitblit.resetRepositoryCache(repository.name);\r
+ }\r
+\r
if (repository.useIncrementalPushTags) {\r
// tag each pushed branch tip\r
String emailAddress = user.emailAddress == null ? rp.getRefLogIdent().getEmailAddress() : user.emailAddress;\r
repositoryManager.resetRepositoryListCache();
}
+ @Override
+ public void resetRepositoryCache(String repositoryName) {
+ repositoryManager.resetRepositoryCache(repositoryName);
+ }
+
@Override
public List<String> getRepositoryList() {
return repositoryManager.getRepositoryList();
*/
void resetRepositoryListCache();
+ /**
+ * Reset all caches for this repository.
+ *
+ * @param repositoryName
+ * @since 1.5.1
+ */
+ void resetRepositoryCache(String repositoryName);
+
/**
* Returns the list of all repositories available to Gitblit. This method
* does not consider user access permissions.
CommitCache.instance().clear(repositoryName);
}
+ /**
+ * Reset all caches for this repository.
+ *
+ * @param repositoryName
+ * @since 1.5.1
+ */
+ @Override
+ public void resetRepositoryCache(String repositoryName) {
+ removeFromCachedRepositoryList(repositoryName);
+ clearRepositoryMetadataCache(repositoryName);
+ }
+
/**
* Resets the repository list cache.
*