From a771f15a172c93d729cfd7982254e3624d6fe8f6 Mon Sep 17 00:00:00 2001 From: James Moger Date: Fri, 7 Mar 2014 15:25:08 -0500 Subject: [PATCH] Fix 'head' vs 'HEAD' commit resolution --- src/main/java/com/gitblit/utils/JGitUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gitblit/utils/JGitUtils.java b/src/main/java/com/gitblit/utils/JGitUtils.java index c6526c28..0cee70d5 100644 --- a/src/main/java/com/gitblit/utils/JGitUtils.java +++ b/src/main/java/com/gitblit/utils/JGitUtils.java @@ -711,7 +711,7 @@ public class JGitUtils { try { // resolve object id ObjectId branchObject; - if (StringUtils.isEmpty(objectId)) { + if (StringUtils.isEmpty(objectId) || "HEAD".equalsIgnoreCase(objectId)) { branchObject = getDefaultBranch(repository); } else { branchObject = repository.resolve(objectId); -- 2.39.5