From: "Shawn O. Pearce" <spearce@spearce.org>
To: Robin Rosenberg <robin.rosenberg@dewire.com>
Cc: Marek Zawirski <marek.zawirski@gmail.com>, git@vger.kernel.org
Subject: Re: [EGIT PATCH 1/2] Add utilities for figuring out repositories for selected resources
Date: Tue, 2 Sep 2008 08:03:23 -0700 [thread overview]
Message-ID: <20080902150323.GC28704@spearce.org> (raw)
In-Reply-To: <1220175524-1523-2-git-send-email-robin.rosenberg@dewire.com>
Robin Rosenberg <robin.rosenberg@dewire.com> wrote:
> We want to go from selected resources to repositories and back
> to any resource in those repositories
...
> + protected Repository[] getRepositoriesFor(final IProject[] projects) {
> + Set<Repository> ret = new HashSet<Repository>();
> + for (IProject project : projects) {
> + RepositoryMapping repositoryMapping = RepositoryMapping.getMapping(project);
> + if (repositoryMapping == null)
> + return new Repository[0];
> + ret.add(repositoryMapping.getRepository());
> + }
Hmm. So if any one of the selected projects doesn't have a Git
repository at its top level we just plain fail and pretend none of
them have a Git repository? That doesn't seem right to me. We
should just skip that project and move to another project.
But I also wonder if that really makes sense when a project could
have a linked resource under it that points to the repository's
working directory. In such cases we want operations on that project
to potentially impact the inner repository as maybe the project
repository does not have a repository itself. IOW I'm questioning
the idea of getRepositoriesFor(getProjectsForSelectedResources()).
--
Shawn.
next prev parent reply other threads:[~2008-09-02 15:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-31 9:38 [EGIT PATCH] Select all changes in repository for commit by default Robin Rosenberg
2008-08-31 9:38 ` [EGIT PATCH 1/2] Add utilities for figuring out repositories for selected resources Robin Rosenberg
2008-08-31 9:38 ` [EGIT PATCH 2/2] Enable commit for any resource in a Git-shared project Robin Rosenberg
2008-09-02 15:03 ` Shawn O. Pearce [this message]
2008-09-02 18:53 ` [EGIT PATCH 1/2] Add utilities for figuring out repositories for selected resources Robin Rosenberg
2008-09-02 19:00 ` 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=20080902150323.GC28704@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=marek.zawirski@gmail.com \
--cc=robin.rosenberg@dewire.com \
/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).