git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <bonzini@gnu.org>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org, spearce@spearce.org,
	johannes.schindelin@gmx.de, srb@cuci.nl,
	Alex Riesen <raa.lkml@gmail.com>
Subject: Re: [PATCH 0/7] limit the usage of the default remote "origin" to the minimum
Date: Wed, 30 Apr 2008 07:24:00 +0200	[thread overview]
Message-ID: <48180270.9080708@gnu.org> (raw)
In-Reply-To: <20080429231201.GA22646@sigill.intra.peff.net>


>>> ... The principle of "remove defaults from code, and
>>> put them into the automatically generated config file" makes sense to
>>> me. It gives users an easy place to look to understand and change such
>>> behavior. So even without the rest of the patches, I think this is an
>>> improvement.
>> If the removal of defaults do not break expectations of users of an
>> existing repository, I'd agree.  Is it the case, or the lack of default
>> that is supposed to be there now suddenly makes the tool do unexpected
>> things?
> 
> I think in the case of patches 1 and 2 (but without the later patches)
> it becomes redundant. And of course, Paolo's idea is that it opens us up
> to changing the default later, in which case it will cease to be
> redundant. But I think even in the meantime that it gives the user
> a clue when looking in the config file about what can be tweaked.

Agreed.  Patches 1 and 2 can definitely go in earlier and can help in 
the transition (see later).

> Didn't we already have this discussion and don't we already have a way to
> define a remote that you can use to push to more than one places?

No, because you may want to push to some places, and mirror to others. 
Unfortunately, mirroring is not handled entirely within match_refs but 
is also special-cased in builtin-send-pack.c.  So you cannot handle it 
with a magic refspec (like --force), and you are forced to use a 
separate remote, independent of remote.*.mirror.

>>> ... I
>>> assume people still with ancient .git/remotes files? Are those actually
>>> deprecated?
>>
>> Neither .git/branches.  When you interact with hundreds of remote
>> repositories, one interesting branch per each, like akpm does, the format
>> of one-file-per-remote is far easier and simpler to work with.
> 
> Then in that case, I think the warning is definitely bogus.

When you use .git/remotes and .git/branches, do you actually use them 
with the zero-argument versions of "git pull" (and "git fetch")?  I'm 
not sure about that, actually I very much doubt so.

So here is my plan.

1) Merge patches 1 and 2 now.

2) Add a warning to "git push" if it pushes to something without a push 
refspec.  Merge patch 3, the doc can say that --push suppresses this 
warning.  Make sure the warning suggests how to silence it.

3) Merge patch 5 as it is just a cleanup.

4) Merge patch 6.

5) Add a similar warning to "git fetch".

6) Add a warning when "git push" is used with zero-arguments and there 
is more than one remote with a push refspec.  Something like, "git push 
will only push to ***.  This may not be what you want, and it may change 
in future versions of git".

7) If there is a revolt against the warning in (5), revert it and add a 
warning whenever the "magic origin" behavior is triggered by "git push".


For 1.6.0, the remaining changes would be harder to warn about 
preventively, so this part can be refined:

8) In "git pull", turn the warning into an error.

9) Ditto for "git fetch".

10) Ditto for "git push" if we had to go for (7).  If we didn't, merge 
patch 4 for 1.6.0.  Put a prominent note in the release notes that "git 
push" will push to all remotes with a push refspec.  By now, users will 
have added push refspecs appropriately thanks to the warning in step 2 
above; so at least "git push" will not stop pushing to origin.


In the meanwhile, decide what is the best thing to do for patch 7.  If 
we decide it is to go in, steps 5 and 9 will have to be replaced with 
something else (I don't know what).

Paolo

      reply	other threads:[~2008-04-30  5:24 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-26  7:31 [PATCH resend] make "git push" update origin and mirrors, "git push --mirror" update mirrors Paolo Bonzini
2008-04-26 17:01 ` Shawn O. Pearce
2008-04-26 17:46   ` Junio C Hamano
2008-04-27  4:30     ` Shawn O. Pearce
2008-04-27  4:40       ` Shawn O. Pearce
2008-04-27  5:23         ` Junio C Hamano
2008-04-27 17:34           ` Shawn O. Pearce
2008-04-27 20:13             ` Junio C Hamano
2008-04-27 20:22               ` Paolo Bonzini
2008-04-28  1:26                 ` Jeff King
2008-04-28  5:07                   ` Paolo Bonzini
2008-04-28  9:09                     ` Jeff King
2008-04-28  9:11                       ` Jeff King
2008-04-28  9:19                         ` Paolo Bonzini
2008-04-28 10:33                           ` Johannes Schindelin
2008-04-28 11:24                             ` Paolo Bonzini
2008-04-28 11:57                               ` Johannes Schindelin
2008-04-28  3:32               ` Shawn O. Pearce
2008-04-28  5:03                 ` Paolo Bonzini
2008-04-28  6:08                 ` Stephen R. van den Berg
2008-04-28  1:21             ` Jeff King
2008-04-27  9:03         ` Paolo Bonzini
2008-04-27  7:23   ` Paolo Bonzini
2008-04-28 15:32 ` [PATCH 0/7] limit the usage of the default remote "origin" to the minimum Paolo Bonzini
2008-04-28 15:32   ` [PATCH 1/7] add special "matching refs" refspec Paolo Bonzini
2008-04-28 15:32     ` [PATCH 2/7] add push line in git-clone Paolo Bonzini
2008-04-28 15:32       ` [PATCH 3/7] Add a --push option to "git-remote add" Paolo Bonzini
2008-04-28 15:32         ` [PATCH 4/7] make "git push" update all push repositories Paolo Bonzini
2008-04-28 15:32           ` [PATCH 5/7] don't rely on zero-argument "git fetch" from within git pull Paolo Bonzini
2008-04-28 15:32             ` [PATCH 6/7] warn on "git pull" without a given branch.<name>.remote value Paolo Bonzini
2008-04-28 15:32               ` [PATCH 7/7] make "git fetch" update all fetch repositories Paolo Bonzini
2008-04-28 18:10                 ` Alex Riesen
2008-04-28 18:19                   ` Paolo Bonzini
2008-04-28 21:33                     ` Alex Riesen
2008-04-29  4:52                       ` Paolo Bonzini
2008-04-29  5:38                         ` Alex Riesen
2008-04-29  6:05                           ` Andreas Ericsson
2008-04-29  6:55                             ` Paolo Bonzini
2008-04-29 16:13                               ` Johannes Schindelin
2008-04-29 16:40                                 ` Paolo Bonzini
2008-04-29 20:34                                   ` Alex Riesen
2008-04-29  6:50                           ` Paolo Bonzini
2008-04-29  7:16                             ` Andreas Ericsson
2008-04-29  7:57                               ` Paolo Bonzini
2008-04-29  8:48                                 ` Andreas Ericsson
2008-04-29  9:02                                   ` Paolo Bonzini
2008-04-29 21:08                                   ` しらいしななこ
     [not found]                                   ` <200804292108.m3TL8moV011790@mi1.bluebottle.com>
2008-04-29 21:21                                     ` Paolo Bonzini
2008-04-29 22:21                                       ` Johannes Schindelin
2008-04-29 20:44                                 ` Alex Riesen
2008-04-29 21:15                                   ` Paolo Bonzini
2008-04-29 21:33                                     ` Alex Riesen
2008-04-29 21:41                                       ` Paolo Bonzini
2008-04-29 21:53                                         ` Alex Riesen
2008-04-29 22:26                                         ` Johannes Schindelin
2008-04-29 23:02                                           ` Jeff King
2008-04-29 23:17                                             ` Junio C Hamano
2008-04-30  5:28                                               ` Paolo Bonzini
2008-04-29 21:39                                   ` Johannes Schindelin
2008-04-29 20:24                             ` Alex Riesen
2008-05-01  6:28       ` [PATCH 2/7] add push line in git-clone Junio C Hamano
2008-05-06  8:37         ` Paolo Bonzini
2008-05-14 15:20           ` Paolo Bonzini
2008-05-14 18:16             ` Junio C Hamano
2008-05-14 19:07               ` Paolo Bonzini
2008-05-14 19:23                 ` Junio C Hamano
2008-05-14 19:40                   ` Paolo Bonzini
2008-04-30  9:23     ` [PATCH 1/7] add special "matching refs" refspec Junio C Hamano
2008-04-30  9:35       ` Paolo Bonzini
2008-04-29 19:35   ` [PATCH 0/7] limit the usage of the default remote "origin" to the minimum Jeff King
2008-04-29 21:42     ` Alex Riesen
2008-04-29 21:56     ` Junio C Hamano
2008-04-29 23:12       ` Jeff King
2008-04-30  5:24         ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48180270.9080708@gnu.org \
    --to=bonzini@gnu.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.de \
    --cc=peff@peff.net \
    --cc=raa.lkml@gmail.com \
    --cc=spearce@spearce.org \
    --cc=srb@cuci.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).