| Summary: | DiffEntry.scan() does not report executable bit only difference | ||
|---|---|---|---|
| Product: | [Technology] JGit | Reporter: | Stanley Chen <stanzchen> |
| Component: | JGit | Assignee: | Project Inbox <jgit.core-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | artur, matthew, remy.suen, robin.rosenberg, stanzchen |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
A bug has also been opened with the result of this bug as seen by the user: https://bugs.eclipse.org/bugs/show_bug.cgi?id=345076 Can't commit file with only file permission change. Proposed fix pushed to http://egit.eclipse.org/r/#change,4826 (In reply to comment #1) > A bug has also been opened with the result of this bug as seen by the user: > > https://bugs.eclipse.org/bugs/show_bug.cgi?id=345076 > Can't commit file with only file permission change. Actually it's a different code path for that bug. 78bc526d9b7e5063d267a76b0bbefaa989139bf3 merged |
Build Identifier: jgit 1.2.0 Currently scan() will determine if a file is missing on either side of the diff but will only check for content changes: else if {!entry.oldId.equals(entry.newId) { entry.changeType = ChangeType.MODIFY; if (RenameDetector.sameType(entry.oldMode, entry.newMode)) r.add(entry); else r.addAll(breakModify(entry)); } This prevents changes in file permissions from being returned in the diff list. Reproducible: Always Steps to Reproduce: 1.Create a commit with a new file 2.chmod +x the file and commit again 3.jgit diff the two commits, nothing is reported 4.do the same with git diff and differences in permissions are reported