Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Sawicki2012-01-23 19:37:10 +0000
committerKevin Sawicki2012-01-30 21:37:40 +0000
commit7bde08e1d4e72385e55b6b31bc7bf5bffdf63a0a (patch)
tree9e2c3a396700bbf554fc94f6eea7f2d8fd590673 /org.eclipse.jgit
parentf54e760232cd8a9552bb7723ed1f8fdc391b4cd2 (diff)
downloadjgit-7bde08e1d4e72385e55b6b31bc7bf5bffdf63a0a.tar.gz
jgit-7bde08e1d4e72385e55b6b31bc7bf5bffdf63a0a.tar.xz
jgit-7bde08e1d4e72385e55b6b31bc7bf5bffdf63a0a.zip
Support committing submodule updates
Use the submodule object id provided by the working tree iterator Change-Id: Ibf82f56c04cb9c91b2b309cf0cfa3f638539e23c
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
index d2386f1e82..882ce2176d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
@@ -351,12 +351,9 @@ public class CommitCommand extends GitCommand<RevCommit> {
if (objectExists) {
dcEntry.setObjectId(fTree.getEntryObjectId());
} else {
- if (FileMode.GITLINK.equals(dcEntry.getFileMode())) {
- // Do not check the content of submodule entries
- // Use the old entry information instead.
- dcEntry.copyMetaData(index.getEntry(dcEntry
- .getPathString()));
- } else {
+ if (FileMode.GITLINK.equals(dcEntry.getFileMode()))
+ dcEntry.setObjectId(fTree.getEntryObjectId());
+ else {
// insert object
if (inserter == null)
inserter = repo.newObjectInserter();

Back to the top