Re: [EGIT PATCH 1/2] Add utilities for figuring out repositories for selected resources

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

 



Robin Rosenberg <robin.rosenberg@xxxxxxxxxx> 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.
--
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