@@ -142,7 +142,15 @@ command in `builtin/psuh.c`. Create that file, and within it, write the entry
point for your command in a function matching the style and signature:
----
-int cmd_psuh(int argc, const char **argv, const char *prefix)
+int cmd_psuh(int argc, const char **argv, const char *prefix, struct repository *repo)
+----
+
+We also use the UNUSED macro to make sure we don't recieve compiler warnings
+for unused arguments from the function cmd_psuh.
+
+----
+int cmd_psuh(int argc UNUSED, const char **argv UNUSED,
+ const char *prefix UNUSED, struct repository *repo UNUSED)
----
We'll also need to add the declaration of psuh; open up `builtin.h`, find the
The `cmd_psuh` function signature in the documentation, was missing the `struct repository *repo` argument, which is standard for built-in commands. This commit corrects the signature to include the `repo` argument. Additionally, this commit adds an explanation, for using the `UNUSED` macro to prevent compiler warnings. This helps new contributors understand, common practices in the Git codebase. Signed-off-by: K Jayatheerth <jayatheerthkulkarni2005@gmail.com> --- Documentation/MyFirstContribution.adoc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)