Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Rosenberg2012-01-07 13:00:14 +0000
committerRobin Rosenberg2012-01-13 10:24:31 +0000
commitd5c890e0fdbfdd5d532121a2eb812ee2143c8ab5 (patch)
treed56c15ab41ef216fb22e5f00984dcd5373690e4a /org.eclipse.jgit
parent6a582970bfa1120dfe99e7568ea2d471dfc59387 (diff)
downloadjgit-d5c890e0fdbfdd5d532121a2eb812ee2143c8ab5.tar.gz
jgit-d5c890e0fdbfdd5d532121a2eb812ee2143c8ab5.tar.xz
jgit-d5c890e0fdbfdd5d532121a2eb812ee2143c8ab5.zip
Cannot commit -o file with only file permission change
Bug 345076 Change-Id: Ie64039793ab6ba4748731320399f03301b6282ec Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java5
1 files changed, 4 insertions, 1 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 a6d780e908..d2386f1e82 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
@@ -382,7 +382,10 @@ public class CommitCommand extends GitCommand<RevCommit> {
// add to temporary in-core index
dcBuilder.add(dcEntry);
- if (emptyCommit && (hTree == null || !hTree.idEqual(fTree)))
+ if (emptyCommit
+ && (hTree == null || !hTree.idEqual(fTree) || hTree
+ .getEntryRawMode() != fTree
+ .getEntryRawMode()))
// this is a change
emptyCommit = false;
} else {

Back to the top