git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [EGIT RFC] Commit behaviour

From
MZMarek Zawirski <marek.zawirski@gmail.com>
Date
Jun 15, 2008, 02:00 UTC
Message-ID
<485477D5.3090502@gmail.com>
In-Reply-To
<200806141223.11134.robin.rosenberg@dewire.com>
Robin Rosenberg wrote:
Show 21 quoted lines
> 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@gmail.com
Previous: Robin RosenbergNext: Shawn O. Pearce
Message 10 of 11 in “[EGIT RFC] Commit behaviour”
  1. Robin RosenbergJun 12, 2008
  2. [EGIT RFC] Add utilities for figuring out repositories for selected resourcesRobin Rosenberg, Jun 12, 2008
  3. [EGIT RFC] Enable commit for any resource in a Git-shared projectRobin Rosenberg, Jun 12, 2008
  4. Marek ZawirskiJun 13, 2008
  5. Marek ZawirskiJun 13, 2008
  6. Robin RosenbergJun 14, 2008
  7. Robin RosenbergJun 14, 2008
  8. Robin RosenbergJun 14, 2008
  9. Robin RosenbergJun 14, 2008
  10. Marek ZawirskiJun 15, 2008
  11. Shawn O. PearceJun 16, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.