From 36acf4e90305df2e099f96c0350aec09bbf5cdcc Mon Sep 17 00:00:00 2001 From: Constantine Plotnikov Date: Fri, 19 Jun 2009 22:14:38 +0400 Subject: [PATCH] git4idea: The changes to submodule information could be now committed. --- plugins/git4idea/src/git4idea/checkin/GitCheckinEnvironment.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/git4idea/src/git4idea/checkin/GitCheckinEnvironment.java b/plugins/git4idea/src/git4idea/checkin/GitCheckinEnvironment.java index 365a703edf..c6bf41c84c 100644 --- a/plugins/git4idea/src/git4idea/checkin/GitCheckinEnvironment.java +++ b/plugins/git4idea/src/git4idea/checkin/GitCheckinEnvironment.java @@ -559,7 +559,10 @@ public class GitCheckinEnvironment implements CheckinEnvironment { final FilePath filePath = afterRevision != null ? afterRevision.getFile() : beforeRevision.getFile(); final VirtualFile vcsRoot; try { - vcsRoot = GitUtil.getGitRoot(filePath); + // the parent paths for calculating roots in order to account for submodules that contribute + // to the parent change. The path "." is never is valid change, so there should be no problem + // with it. + vcsRoot = GitUtil.getGitRoot(filePath.getParentPath()); } catch (VcsException e) { exceptions.add(e); -- 2.11.4.GIT