summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2013-01-13 17:31:29 -0500
committerJames Moger <james.moger@gitblit.com>2013-01-13 17:31:29 -0500
commit19e902522d1d55f042daf076a1f7299b7c220061 (patch)
tree5c6b3ab997ca39111c5196b1d9ac182d9c7a66ec
parent9727511ad07db2c332f164fe399108768457bdae (diff)
downloadgitblit-19e902522d1d55f042daf076a1f7299b7c220061.tar.gz
gitblit-19e902522d1d55f042daf076a1f7299b7c220061.zip
Set the new objectid for all diff entries (issue-178)
-rw-r--r--docs/04_releases.mkd1
-rw-r--r--src/com/gitblit/utils/JGitUtils.java6
2 files changed, 2 insertions, 5 deletions
diff --git a/docs/04_releases.mkd b/docs/04_releases.mkd
index af702f2c..ee31b692 100644
--- a/docs/04_releases.mkd
+++ b/docs/04_releases.mkd
@@ -11,6 +11,7 @@
- Fixed bug where permission changes were not visible in the web ui to a logged-in user until the user logged-out and then logged back in again (issue-186)
- Fixed nullpointer on creating a repository with mixed case (issue 185)
- Fixed nullpointer when using web.allowForking = true && git.cacheRepositoryList = false (issue 182)
+- Likely fix for commit and commitdiff page failures when a submodule reference changes (issue 178)
- Build project models from the repository model cache, when possible, to reduce page load time (issue 172)
- Fixed loading of Brazilian Portuguese translation from *nix server (github/inaiat)
diff --git a/src/com/gitblit/utils/JGitUtils.java b/src/com/gitblit/utils/JGitUtils.java
index e1127708..815f8b5a 100644
--- a/src/com/gitblit/utils/JGitUtils.java
+++ b/src/com/gitblit/utils/JGitUtils.java
@@ -743,11 +743,7 @@ public class JGitUtils {
df.setDetectRenames(true);
List<DiffEntry> diffs = df.scan(parent.getTree(), commit.getTree());
for (DiffEntry diff : diffs) {
- String objectId = null;
- if (FileMode.GITLINK.equals(diff.getNewMode())) {
- objectId = diff.getNewId().name();
- }
-
+ String objectId = diff.getNewId().name();
if (diff.getChangeType().equals(ChangeType.DELETE)) {
list.add(new PathChangeModel(diff.getOldPath(), diff.getOldPath(), 0, diff
.getNewMode().getBits(), objectId, commit.getId().getName(), diff