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

[PATCH 2/9] submodule.c: fix indentation

From
Stefan Beller <sbeller@google.com>
Date
Oct 16, 2018, 18:13 UTC
Message-ID
<20181016181327.107186-3-sbeller@google.com>
In-Reply-To
<20181016181327.107186-1-sbeller@google.com>

The submodule subsystem is really bad at staying within 80 characters. Fix it while we are here.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 submodule.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/submodule.c b/submodule.c
index 2b7082b2db..e145ebbb16 100644
--- a/submodule.c
+++ b/submodule.c
@@ -1258,7 +1258,8 @@ static int get_next_submodule(struct child_process *cp,
 		if (!submodule) {
 			const char *name = default_name_or_path(ce->name);
 			if (name) {
-				default_submodule.path = default_submodule.name = name;
+				default_submodule.path = name;
+				default_submodule.name = name;
 				submodule = &default_submodule;
 			}
 		}
@@ -1268,8 +1269,10 @@ static int get_next_submodule(struct child_process *cp,
 		default:
 		case RECURSE_SUBMODULES_DEFAULT:
 		case RECURSE_SUBMODULES_ON_DEMAND:
-			if (!submodule || !unsorted_string_list_lookup(&changed_submodule_names,
-							 submodule->name))
+			if (!submodule ||
+			    !unsorted_string_list_lookup(
+					&changed_submodule_names,
+					submodule->name))
 				continue;
 			default_argv = "on-demand";
 			break;
-- 
2.19.0
Previous: Stefan BellerNext: Stefan Beller
Message 3 of 28 in “Resending sb/submodule-recursive-fetch-gets-the-tip”
  1. 0/9 Resending sb/submodule-recursive-fetch-gets-the-tipStefan Beller, Oct 16, 2018
  2. 1/9 sha1-array: provide oid_array_filterStefan Beller, Oct 16, 2018
  3. 2/9 submodule.c: fix indentationStefan Beller, Oct 16, 2018
  4. 3/9 submodule.c: sort changed_submodule_names before searching itStefan Beller, Oct 16, 2018
  5. Jonathan TanOct 17, 2018
  6. 4/9 submodule.c: move global changed_submodule_names into fetch submodule structStefan Beller, Oct 16, 2018
  7. Jonathan TanOct 17, 2018
  8. Stefan BellerOct 18, 2018
  9. 5/9 submodule.c: do not copy around submodule listStefan Beller, Oct 16, 2018
  10. Jonathan TanOct 17, 2018
  11. Junio C HamanoOct 18, 2018
  12. 6/9 repository: repo_submodule_init to take a submodule structStefan Beller, Oct 16, 2018
  13. Jonathan TanOct 17, 2018
  14. 7/9 submodule: fetch in submodules git directory instead of in worktreeStefan Beller, Oct 16, 2018
  15. Jonathan TanOct 17, 2018
  16. Stefan BellerOct 23, 2018
  17. Jonathan TanOct 23, 2018
  18. Stefan BellerOct 23, 2018
  19. 8/9 fetch: retry fetching submodules if needed objects were not fetchedStefan Beller, Oct 16, 2018
  20. Jonathan TanOct 18, 2018
  21. Stefan BellerOct 23, 2018
  22. Jonathan TanOct 23, 2018
  23. Stefan BellerOct 25, 2018
  24. 9/9 builtin/fetch: check for submodule updates for non branch fetchesStefan Beller, Oct 16, 2018
  25. Jonathan TanOct 18, 2018
  26. Junio C HamanoOct 18, 2018
  27. Junio C HamanoOct 18, 2018
  28. Stefan BellerOct 18, 2018

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.