From 4027303c4df7bc44f02446178bfd9d4c180930c3 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Sun, 06 Jan 2013 11:02:52 -0500
Subject: [PATCH] Improve pushlog api and model class
---
src/com/gitblit/utils/JGitUtils.java | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/src/com/gitblit/utils/JGitUtils.java b/src/com/gitblit/utils/JGitUtils.java
index beaa27d..099036e 100644
--- a/src/com/gitblit/utils/JGitUtils.java
+++ b/src/com/gitblit/utils/JGitUtils.java
@@ -1457,6 +1457,20 @@
int maxCount) {
return getRefs(repository, Constants.R_NOTES, fullName, maxCount);
}
+
+ /**
+ * Returns the list of refs in the specified base ref. If repository does
+ * not exist or is empty, an empty list is returned.
+ *
+ * @param repository
+ * @param fullName
+ * if true, /refs/yadayadayada is returned. If false,
+ * yadayadayada is returned.
+ * @return list of refs
+ */
+ public static List<RefModel> getRefs(Repository repository, String baseRef) {
+ return getRefs(repository, baseRef, true, -1);
+ }
/**
* Returns a list of references in the repository matching "refs". If the
--
Gitblit v1.9.1