Thread (2 messages) 2 messages, 2 authors, 2025-03-24

Re: [[GSOC][PATCH v3] 3/3] docs: replace git_config with repo_config

From: JAYATHEERTH K <hidden>
Date: 2025-03-24 01:42:21

On Mon, Mar 24, 2025 at 3:38 AM Junio C Hamano [off-list ref] wrote:
K Jayatheerth [off-list ref] writes:
quoted
Refactor config handling by replacing git_config(...)
with repo_config(...) for better repository context
awareness and alignment with modern Git practices.

Signed-off-by: K Jayatheerth <redacted>
---
 Documentation/MyFirstContribution.adoc | 57 ++++++++++++++++++--------
 1 file changed, 39 insertions(+), 18 deletions(-)
diff --git a/Documentation/MyFirstContribution.adoc b/Documentation/MyFirstContribution.adoc
index 45efe117ab..3ae85016d4 100644
--- a/Documentation/MyFirstContribution.adoc
+++ b/Documentation/MyFirstContribution.adoc
@@ -316,26 +316,47 @@ on the command line, including the name of our command. (If `prefix` is empty
 for you, try `cd Documentation/ && ../bin-wrappers/git psuh`). That's not so
 helpful. So what other context can we get?

-Add a line to `#include "config.h"`. Then, add the following bits to the
+Add `#include "config.h"` and `#include "repository.h"`. Then, add the following bits to the
 function body:

 ----
-     const char *cfg_name;
+#include "builtin.h"
+#include "gettext.h"
+#include "config.h"
+#include "repository.h"  // Required for repo_config_get_string_tmp()
I do not think we updated Coding Guidelines to allow // comments.
Since this was a tutorial I thought this was helpful, anyways I will
remove the comments, because I get that this would be bad practice for
newbies.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help