From: Shawn O. Pearce Date: Wed, 12 Mar 2008 07:52:05 GMT Subject: Re: [jgit] index v2 pull request Message-ID: <20080312075205.GT8410@spearce.org> In-Reply-To: <200803120807.01715.robin.rosenberg@dewire.com> Robin Rosenberg wrote: > 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. :-) > + *
> + *  [remote "name"]
> + *     url = URL:ish
> + *     fetch = [+]remoteref:localref
> + * 
> + * > + * 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. > +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.