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

Re: [PATCH] ls-remote: default to 'origin' when no remote specified

From
Jeff King <peff@peff.net>
Date
Apr 8, 2010, 06:25 UTC
Message-ID
<20100408062539.GC30473@coredump.intra.peff.net>
In-Reply-To
<7v8w8y8q1f.fsf@alter.siamese.dyndns.org>
On Wed, Apr 07, 2010 at 10:35:40PM -0700, Junio C Hamano wrote:
Show 12 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > I don't really see a problem with this. The current behavior produces an
> > error, so it is not as if we are breaking somebody's workflow, and the
> > only sensible default is the same one used by the other commands.
> 
> I'd agree only if "the other commands" default to the same remote;
> otherwise as a plumbing, ls-remote should insist that the user be more
> explicit.
>
> The only odd-man out that would worry me is "git pull", as I expect
> everybody written in C would just use remote_get(NULL).

I agree, but I think they do all default to the same remote. Push and fetch both use remote_get(NULL). Pull, AFAICT, just calls fetch and picks out what to merge from FETCH_HEAD. Am I missing any others?

-Peff
Previous: Junio C HamanoNext: Tay Ray Chuan
Message 4 of 18 in “ls-remote: default to 'origin' when no remote specified”
  1. ls-remote: default to 'origin' when no remote specifiedTay Ray Chuan, Apr 8, 2010
  2. Jeff KingApr 8, 2010
  3. Junio C HamanoApr 8, 2010
  4. Jeff KingApr 8, 2010
  5. Tay Ray ChuanApr 8, 2010
  6. Jeff KingApr 8, 2010
  7. Junio C HamanoApr 8, 2010
  8. Jeff KingApr 8, 2010
  9. Junio C HamanoApr 8, 2010
  10. Tay Ray ChuanApr 8, 2010
  11. ls-remote: fall-back to default remotes when no remote specifiedTay Ray Chuan, Apr 8, 2010
  12. ls-remote: fall-back to default remotes when no remote specifiedTay Ray Chuan, Apr 8, 2010
  13. Jeff KingApr 8, 2010
  14. Tay Ray ChuanApr 8, 2010
  15. ls-remote: fall-back to default remotes when no remote specifiedTay Ray Chuan, Apr 8, 2010
  16. Jeff KingApr 8, 2010
  17. Peter KjellerstedtApr 9, 2010
  18. Tay Ray ChuanApr 9, 2010

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.