diff options
author | James Moger <james.moger@gitblit.com> | 2014-03-07 15:25:08 -0500 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-03-07 15:25:08 -0500 |
commit | a771f15a172c93d729cfd7982254e3624d6fe8f6 (patch) | |
tree | 2299750606684268983a24789174343dfb73592a /src/main/java/com/gitblit/utils | |
parent | b635f482e4b1a8ce4d39990f532a15d0ec0f0be2 (diff) | |
download | gitblit-a771f15a172c93d729cfd7982254e3624d6fe8f6.tar.gz gitblit-a771f15a172c93d729cfd7982254e3624d6fe8f6.zip |
Fix 'head' vs 'HEAD' commit resolution
Diffstat (limited to 'src/main/java/com/gitblit/utils')
-rw-r--r-- | src/main/java/com/gitblit/utils/JGitUtils.java | 2 |
1 files changed, 1 insertions, 1 deletions
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);
|