Re: [EGIT RFC] Commit behaviour

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robin Rosenberg wrote:
Found it. Obviously this won't work for commits to multiple repositories which is supposed
to work really, but I think that was broken earlier by yours truly. This fix should make it
possible to test the idea though this thread is about, and see if we have more selection
problems.
-- robin

diff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/actions/CommitAction.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/actions/CommitAction.java
index da32ea5..922649b 100644
--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/actions/CommitAction.java
+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/actions/CommitAction.java
@@ -124,7 +124,7 @@ public class CommitAction extends RepositoryAction {
        }

        private void loadPreviousCommit() {
-               IProject project = getSelectedProjects()[0];
+               IProject project = getProjectsForSelectedResources()[0];

                Repository repo = RepositoryMapping.getMapping(project).getRepository();
                try {


Yeah, it works for me now, with this patch applied.

And yes, without this patch, I found mentioned exception in log:
java.lang.ArrayIndexOutOfBoundsException: 0
at org.spearce.egit.ui.internal.actions.CommitAction.loadPreviousCommit(CommitAction.java:127)

--
Marek Zawirski [zawir]
marek.zawirski@xxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux