git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] push: change submodule default to check
@ 2016-08-17 20:48 Stefan Beller
  2016-08-17 21:05 ` Junio C Hamano
  0 siblings, 1 reply; 15+ messages in thread
From: Stefan Beller @ 2016-08-17 20:48 UTC (permalink / raw)
  To: gitster; +Cc: git, Jens.Lehmann, iveqy, Stefan Beller

When working with submodules, it is easy to forget to push the submodules.
Change the default to 'check' if any existing submodule is present on at
least one remote of the submodule remotes.

This doesn't affect you if you do not work with submodules.
If working with submodules, there are more reports of missing submodules
rather than the desire to push the superproject without the submodules
to be pushed out. Flipping the default to check for submodules is safer
than the current default of ignoring submodules while pushing.

Signed-off-by: Stefan Beller <sbeller@google.com>
---
 
 Probably too late for the 2.10 release as I'd propose to keep it in master for
 quite a while before actually doing a release with this.
 
 Thanks,
 Stefan

 builtin/push.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builtin/push.c b/builtin/push.c
index 3bb9d6b..479150a 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -22,7 +22,7 @@ static int deleterefs;
 static const char *receivepack;
 static int verbosity;
 static int progress = -1;
-static int recurse_submodules = RECURSE_SUBMODULES_DEFAULT;
+static int recurse_submodules = RECURSE_SUBMODULES_CHECK;
 static enum transport_family family;
 
 static struct push_cas_option cas;
-- 
2.9.2.730.g525ad04.dirty


^ permalink raw reply related	[flat|nested] 15+ messages in thread
* Re: Slow pushes on 'pu' - even when up-to-date..
@ 2016-10-04 16:21 Jeff King
  2016-10-04 16:40 ` [PATCH] push: change submodule default to check Stefan Beller
  0 siblings, 1 reply; 15+ messages in thread
From: Jeff King @ 2016-10-04 16:21 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Heiko Voigt, Linus Torvalds, Stefan Beller, Git Mailing List

On Tue, Oct 04, 2016 at 09:19:01AM -0700, Junio C Hamano wrote:

> Jeff King <peff@peff.net> writes:
> 
> > As I argued in [1], I think it's not just "this must be cheaper" but
> > "this must not be enabled if submodules are not in use at all".  Most
> > repositories don't have submodules enabled at all, so anything that
> > cause any extra traversal, even of a portion of the history, is going to
> > be a net negative for a lot of people.
> >
> > I think the only sane default is going to be some kind of heuristic that
> > says "submodules are probably in use".
> 
> Why should we even have a default different from today's?  If most
> repositories don't have submodules enabled at all, we can just let
> those working with submodules enabled to toggle their configuration
> and that is an very easy to understand solution, no?

You will not see any complaint from me on that. I was taking for granted
that the current default is inconvenient to submodule users, but I don't
have any experience myself.

-Peff

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-10-04 18:28 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-17 20:48 [PATCH] push: change submodule default to check Stefan Beller
2016-08-17 21:05 ` Junio C Hamano
2016-08-17 21:14   ` Stefan Beller
     [not found]     ` <20160818140922.GA5925@sandbox>
2016-08-24 16:46       ` Stefan Beller
2016-08-24 18:08         ` Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2016-10-04 16:21 Slow pushes on 'pu' - even when up-to-date Jeff King
2016-10-04 16:40 ` [PATCH] push: change submodule default to check Stefan Beller
2016-10-04 17:34   ` Jeff King
2016-10-04 17:48     ` Stefan Beller
2016-10-04 17:54       ` Jeff King
2016-10-04 18:04         ` Junio C Hamano
2016-10-04 18:08           ` Stefan Beller
2016-10-04 18:28             ` Jeff King
2016-10-04 18:00   ` Junio C Hamano
2016-10-04 18:02     ` Junio C Hamano
2016-10-04 18:05     ` Stefan Beller

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).