Re: [jgit] index v2 pull request
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Mar 12, 2008, 07:52 UTC
- Message-ID
- <20080312075205.GT8410@spearce.org>
- In-Reply-To
- <200803120807.01715.robin.rosenberg@dewire.com>
Robin Rosenberg <robin.rosenberg@dewire.com> wrote:
Show 6 quoted lines
> Den Wednesday 12 March 2008 03.52.05 skrev Imran M Yousuf: > > > I am currently looking into .git/config format as Shawn suggested. > > That's a good one too. I have code for parsing the remotes specs, though > e.g. "+refs/heads/master/*:refs/remotes/origin/*", but nothing for the "branch" config. I haven't used it yet, so it's a rip-out.
Your RemoteSpec is missing the fact that some people have more than one URL, fetch, and/or push lines in the same remote. :-)
Show 7 quoted lines
> + * <pre> > + * [remote "name"] > + * url = URL:ish > + * fetch = [+]remoteref:localref > + * </pre> > + * > + * There are more variants but we do not support them here yet.
Or is that what you mean by the above statement?
In any case the remote spec needs a list of URLs a list of the fetch/push Info objects. That changes the public API of the RemoteSpec class rather significantly.
Show 19 quoted lines
> +public class RemoteSpec {
> +
> + static class Info {
> + boolean overwriteAlways;
> +
> + boolean matchAny;
> +
> + String remoteRef;
> +
> + String localRef;
> + }
> +
> + Info fetch = new Info();
> +
> + Info push = null;
> +
> + private final String name;
> +
> + private final String url;-- Shawn.