Bug 498547 - Staging view doesn't properly handles changed submodules
Summary: Staging view doesn't properly handles changed submodules
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 4.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 5.6   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-27 05:03 EDT by Andrey Loskutov CLA
Modified: 2019-11-08 04:23 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Loskutov CLA 2016-07-27 05:03:57 EDT
If a submodule is changed, staging view for parent repository shows unstaged entry for that submodule with right icon (OK), but double click on it does not work and right click -> compare with index throws an exception.

Example repo:
git://git.eclipse.org/gitroot/platform/eclipse.platform.releng.aggregator.git

Be aware, that fetching all submodules there will be a pain on slow connection and requires lot of disk space!

We should at least show text diff, similar what git does:
diff --git a/eclipse.jdt b/eclipse.jdt
index 4c16ede..b85af7d 160000
--- a/eclipse.jdt
+++ b/eclipse.jdt

I'm attaching patch but this is very raw and part of this is better implemented in jgit I guess (see comments in GitBlobeStorage).
Comment 1 Eclipse Genie CLA 2016-07-27 05:05:11 EDT
New Gerrit change created: https://git.eclipse.org/r/77954
Comment 2 Andrey Loskutov CLA 2016-07-27 07:41:08 EDT
JGit handles diff on a changed submodule as expected:

jgit diff -- eclipse.jdt
diff --git a/eclipse.jdt b/eclipse.jdt
index 4c16ede..b85af7d 160000
--- a/eclipse.jdt
+++ b/eclipse.jdt
@@ -1 +1 @@
-Subproject commit 4c16ede0264c1f897158f06ca7b5bff0fe0d1fbb
+Subproject commit b85af7d9f23e9c6e054b4c7b14a1cd10be4dd366

So the problem seem to be on the UI site only.
Comment 3 Eclipse Genie CLA 2016-07-28 05:40:10 EDT
New Gerrit change created: https://git.eclipse.org/r/78054
Comment 4 Eclipse Genie CLA 2016-07-28 05:40:15 EDT
New Gerrit change created: https://git.eclipse.org/r/78053
Comment 5 Eclipse Genie CLA 2016-07-28 08:55:21 EDT
Gerrit change https://git.eclipse.org/r/78053 was merged to [master].
Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=f69e28ea69a7cdb13046f9270331d788bfe7597b
Comment 6 Eclipse Genie CLA 2016-07-28 08:55:23 EDT
Gerrit change https://git.eclipse.org/r/78054 was merged to [master].
Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=1bea4bb82f9cde04f2d4d0e099b58d00ea2a11d4
Comment 7 Eclipse Genie CLA 2019-10-28 16:22:52 EDT
New Gerrit change created: https://git.eclipse.org/r/151721
Comment 8 Eclipse Genie CLA 2019-11-08 04:22:56 EST
Gerrit change https://git.eclipse.org/r/151721 was merged to [master].
Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=0210b0cc7be853ed322890502f817e96aefb2c2b