git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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 &quot;name&quot;]
> + *     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.
Previous: Robin RosenbergNext: Imran M Yousuf
Message 9 of 13 in “[jgit] index v2 pull request”
  1. Shawn O. PearceMar 8, 2008
  2. Jakub NarebskiMar 8, 2008
  3. Shawn O. PearceMar 9, 2008
  4. Robin RosenbergMar 9, 2008
  5. Imran M YousufMar 10, 2008
  6. Robin RosenbergMar 10, 2008
  7. Imran M YousufMar 12, 2008
  8. Robin RosenbergMar 12, 2008
  9. Shawn O. PearceMar 12, 2008
  10. Imran M YousufMar 12, 2008
  11. Shawn O. PearceMar 11, 2008
  12. Imran M YousufMar 11, 2008
  13. Shawn O. PearceMar 10, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.