git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] submodule--helper: fix initialization of warn_if_uninitialized
@ 2022-04-24  6:26 Orgad Shaneh via GitGitGadget
  2022-04-25  9:34 ` Junio C Hamano
  2022-04-25 12:45 ` [PATCH v2] " Orgad Shaneh via GitGitGadget
  0 siblings, 2 replies; 11+ messages in thread
From: Orgad Shaneh via GitGitGadget @ 2022-04-24  6:26 UTC (permalink / raw)
  To: git; +Cc: Orgad Shaneh, Orgad Shaneh

From: Orgad Shaneh <orgads@gmail.com>

This field is supposed to be off by default, and it is only enabled when
running `git submodule update <path>`, and path is not initialized.

Commit c9911c9358 changed it to enabled by default. This affects for
example git checkout, which displays the following warning for each
uninitialized submodule:

Submodule path 'sub' not initialized
Maybe you want to use 'update --init'?

Amends c9911c9358e611390e2444f718c73900d17d3d60.

Signed-off-by: Orgad Shaneh <orgads@gmail.com>
---
    submodule--helper: fix initialization of warn_if_uninitialized
    
    This field is supposed to be off by default, and it is only enabled when
    running git submodule update <path>, and path is not initialized.
    
    Commit c9911c9358 changed it to enabled by default. This affects for
    example git checkout, which displays the following warning for each
    uninitialized submodule:
    
    Submodule path 'sub' not initialized
    Maybe you want to use 'update --init'?
    
    
    Amends c9911c9358e611390e2444f718c73900d17d3d60.
    
    Signed-off-by: Orgad Shaneh orgads@gmail.com

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1258%2Forgads%2Fsub-no-warn-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1258/orgads/sub-no-warn-v1
Pull-Request: https://github.com/git/git/pull/1258

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

diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index 2c87ef9364f..b28112e3040 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -2026,7 +2026,7 @@ struct update_data {
 	.references = STRING_LIST_INIT_DUP, \
 	.single_branch = -1, \
 	.max_jobs = 1, \
-	.warn_if_uninitialized = 1, \
+	.warn_if_uninitialized = 0, \
 }
 
 static void next_submodule_warn_missing(struct submodule_update_clone *suc,

base-commit: 6cd33dceed60949e2dbc32e3f0f5e67c4c882e1e
-- 
gitgitgadget

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

end of thread, other threads:[~2022-04-27 23:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-24  6:26 [PATCH] submodule--helper: fix initialization of warn_if_uninitialized Orgad Shaneh via GitGitGadget
2022-04-25  9:34 ` Junio C Hamano
2022-04-25 12:43   ` Orgad Shaneh
2022-04-25 12:45 ` [PATCH v2] " Orgad Shaneh via GitGitGadget
2022-04-25 18:25   ` Junio C Hamano
2022-04-25 20:56     ` Junio C Hamano
2022-04-27 22:22       ` Glen Choo
2022-04-27 22:23       ` Glen Choo
2022-04-27 22:25       ` Glen Choo
2022-04-27 22:19   ` Glen Choo
2022-04-27 23:20     ` Junio C Hamano

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).