git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marek Zawirski <marek.zawirski@gmail.com>
To: Robin Rosenberg <robin.rosenberg@dewire.com>
Cc: "Shawn O. Pearce" <spearce@spearce.org>, git@vger.kernel.org
Subject: Re: [EGIT RFC] Commit behaviour
Date: Sun, 15 Jun 2008 04:00:53 +0200	[thread overview]
Message-ID: <485477D5.3090502@gmail.com> (raw)
In-Reply-To: <200806141223.11134.robin.rosenberg@dewire.com>

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@gmail.com

  reply	other threads:[~2008-06-15  2:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-12 23:39 [EGIT RFC] Commit behaviour Robin Rosenberg
2008-06-12 23:39 ` [EGIT RFC] Add utilities for figuring out repositories for selected resources Robin Rosenberg
2008-06-12 23:39   ` [EGIT RFC] Enable commit for any resource in a Git-shared project Robin Rosenberg
2008-06-13 22:07 ` [EGIT RFC] Commit behaviour Marek Zawirski
2008-06-13 22:41   ` Marek Zawirski
2008-06-14  8:40     ` Robin Rosenberg
2008-06-14 10:05       ` Robin Rosenberg
2008-06-14  9:08   ` Robin Rosenberg
2008-06-14 10:23   ` Robin Rosenberg
2008-06-15  2:00     ` Marek Zawirski [this message]
2008-06-16  2:11 ` Shawn O. Pearce

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=485477D5.3090502@gmail.com \
    --to=marek.zawirski@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=robin.rosenberg@dewire.com \
    --cc=spearce@spearce.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).