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

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:48:34

Jeff King [off-list ref] 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).

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

From: Jeff King <hidden>
Date: 2016-06-15 22:48:34

On Wed, Apr 07, 2010 at 10:35:40PM -0700, Junio C Hamano wrote:
Jeff King [off-list ref] writes:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help