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

Re: [RFC/PATCH] remote: add new sync command

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Nov 30, 2011, 11:47 UTC
Message-ID
<CAMP44s2WxveGAmzaz8kwKRxia1TBWYwxwPBdb14K93TKr1sfsA@mail.gmail.com>
In-Reply-To
<20111130070111.GE5317@sigill.intra.peff.net>
On Wed, Nov 30, 2011 at 9:01 AM, Jeff King <peff@peff.net> wrote:
Show 12 quoted lines
> On Tue, Nov 22, 2011 at 01:47:36AM +0200, Felipe Contreras wrote:
>
>> > I didn't mean "you didn't define a mirror in your config". I meant "your
>> > question is not well-defined, because you haven't defined the term
>> > 'mirror'". IOW, I can't answer your question without knowing exactly
>> > what you meant.
>>
>> I wasn't the one that brought the mirror up, you did:
>
> Yes, because that is the most related concept in current git. But I
> thought you were asking from the perspective of a clueless user, and I
> don't know what that clueless user meant by "mirror".
I don't think common users know, or should care about, what a "mirror" is.
> Anyway, I don't think it's important.
Me neither.
> I read over your whole message, and I feel like our discussion isn't
> really moving towards an actual goal. Junio and I both mentioned that in
> the long-term, features like this should be part of "push", not
> "remote". Do you want to try revising your patch in that direction?

Yes, I can try that for 'git push', but my worry is about 'git fetch'. To me it's really clear that what I am trying to achieve is more complicated than a simple push/fetch.

You still haven't replied to my solution to synchronize the local branches, which to first do a 'git fetch' so we have the remote branches tracked locally, and go through each one of them and do something to the local ones. This solution works, is simple, and allows all kinds of options, but IMO it's not part of 'git fetch'.

> That will give us something concrete to talk about (and hopefully
> apply).

Yes, but that's basically 'git push --prune', which I think is the only thing we have agreed. But what about the rest?

I feel you are trying to ignore the fact that 'refs/heads/*' is not user-friendly, neither is BRANCHES, or :, and 'git fetch' would be even more cumbersome.

The user-friendliness of git is one of the biggest complains people have, and while it makes sense to keep certain operations under push/fetch, there's only so much pureness we can have before things become too complicated for the users. The fact of the matter is that these particular remote synchronization operations are much easier to picture mentally in a group like 'git remote sync'. That not only works for all the cases, including 'git fetch', but it's non-intrusive, and most importantly: user-friendly.

Cheers.
-- 
Felipe Contreras
Previous: Jeff King
Message 26 of 26 in “remote: add new sync command”
  1. remote: add new sync commandFelipe Contreras, Nov 7, 2011
  2. Jeff KingNov 7, 2011
  3. Felipe ContrerasNov 7, 2011
  4. Jeff KingNov 7, 2011
  5. Felipe ContrerasNov 7, 2011
  6. Jeff KingNov 7, 2011
  7. Junio C HamanoNov 7, 2011
  8. Jeff KingNov 7, 2011
  9. Felipe ContrerasNov 8, 2011
  10. Junio C HamanoNov 8, 2011
  11. Felipe ContrerasNov 8, 2011
  12. Junio C HamanoNov 9, 2011
  13. Jakub NarebskiNov 11, 2011
  14. Junio C HamanoNov 11, 2011
  15. Jakub NarebskiNov 11, 2011
  16. Felipe ContrerasNov 8, 2011
  17. Jeff KingNov 8, 2011
  18. Felipe ContrerasNov 11, 2011
  19. Jeff KingNov 11, 2011
  20. Felipe ContrerasNov 12, 2011
  21. Jeff KingNov 14, 2011
  22. Felipe ContrerasNov 14, 2011
  23. Jeff KingNov 21, 2011
  24. Felipe ContrerasNov 21, 2011
  25. Jeff KingNov 30, 2011
  26. Felipe ContrerasNov 30, 2011

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.