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

[PATCH 4/4] MyFirstObjectWalk: drop `init_walken_defaults()`

From
MÅMartin Ågren <martin.agren@gmail.com>
Date
Nov 21, 2020, 18:31 UTC
Message-ID
<ca4523ce9e79654f2a51c0fee4909d84bd1f2bba.1605972564.git.martin.agren@gmail.com>
In-Reply-To
<cover.1605972564.git.martin.agren@gmail.com>

In a recent commit, we stopped calling `init_grep_defaults()` from this function. Thus, by the end of the tutorial, we still haven't added any contents to this function. Let's remove it for simplicity.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
---
 Documentation/MyFirstObjectWalk.txt | 24 ------------------------
 1 file changed, 24 deletions(-)
diff --git a/Documentation/MyFirstObjectWalk.txt b/Documentation/MyFirstObjectWalk.txt
index 7f4bffc4dd..2d10eea7a9 100644
--- a/Documentation/MyFirstObjectWalk.txt
+++ b/Documentation/MyFirstObjectWalk.txt
@@ -182,30 +182,6 @@ its `init_log_defaults()` sets its own state (`decoration_style`) and asks
 `grep` and `diff` to initialize themselves by calling each of their
 initialization functions.
 
-For our first example within `git walken`, we don't intend to use any other
-components within Git, and we don't have any configuration to do.  However, we
-may want to add some later, so for now, we can add an empty placeholder. Create
-a new function in `builtin/walken.c`:
-
-----
-static void init_walken_defaults(void)
-{
-	/*
-	 * We don't actually need the same components `git log` does; leave this
-	 * empty for now.
-	 */
-}
-----
-
-Make sure to add a line invoking it inside of `cmd_walken()`.
-
-----
-int cmd_walken(int argc, const char **argv, const char *prefix)
-{
-	init_walken_defaults();
-}
-----
-
 ==== Configuring From `.gitconfig`
 
 Next, we should have a look at any relevant configuration settings (i.e.,
-- 
2.29.2.454.gaff20da3a2
Previous: Jeff KingNext: Johannes Schindelin
Message 9 of 26 in “grep: retire `init_grep_defaults()`”
  1. 0/4 grep: retire `init_grep_defaults()`Martin Ågren, Nov 21, 2020
  2. 1/4 grep: don't set up a "default" repo for grepMartin Ågren, Nov 21, 2020
  3. 2/4 grep: use designated initializers for `grep_defaults`Martin Ågren, Nov 21, 2020
  4. 3/4 grep: simplify color setupMartin Ågren, Nov 21, 2020
  5. Jeff KingNov 21, 2020
  6. Martin ÅgrenNov 21, 2020
  7. Junio C HamanoNov 21, 2020
  8. Jeff KingNov 24, 2020
  9. 4/4 MyFirstObjectWalk: drop `init_walken_defaults()`Martin Ågren, Nov 21, 2020
  10. Johannes SchindelinNov 23, 2020
  11. 0/4 grep: simplify "grep defaults" handlingMartin Ågren, Nov 24, 2020
  12. 1/4 grep: don't set up a "default" repo for grepMartin Ågren, Nov 24, 2020
  13. 2/4 grep: use designated initializers for `grep_defaults`Martin Ågren, Nov 24, 2020
  14. 3/4 grep: copy struct in one fell swoopMartin Ågren, Nov 24, 2020
  15. Junio C HamanoNov 24, 2020
  16. Martin ÅgrenNov 25, 2020
  17. Junio C HamanoNov 25, 2020
  18. Martin ÅgrenNov 26, 2020
  19. 4/4 MyFirstObjectWalk: drop `init_walken_defaults()`Martin Ågren, Nov 24, 2020
  20. Ævar Arnfjörð BjarmasonNov 25, 2020
  21. 0/4 grep: simplify "grep defaults" handlingMartin Ågren, Nov 29, 2020
  22. 1/4 grep: don't set up a "default" repo for grepMartin Ågren, Nov 29, 2020
  23. 2/4 grep: use designated initializers for `grep_defaults`Martin Ågren, Nov 29, 2020
  24. 3/4 grep: copy struct in one fell swoopMartin Ågren, Nov 29, 2020
  25. 4/4 MyFirstObjectWalk: drop `init_walken_defaults()`Martin Ågren, Nov 29, 2020
  26. Junio C HamanoDec 1, 2020

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.