aboutsummaryrefslogtreecommitdiff
path: root/Documentation/MyFirstContribution.adoc
diff options
context:
space:
mode:
authorShreyansh Paliwal <shreyanshpaliwalcmsmn@gmail.com>2026-01-13 01:23:43 +0530
committerJunio C Hamano <gitster@pobox.com>2026-01-12 12:24:02 -0800
commit81021871eaa8b16a892b9c8791a0c905ab26e342 (patch)
treeb3d71c4c852aa0be6f2b9716e33003215ec26a67 /Documentation/MyFirstContribution.adoc
parent9a2fb147f2c61d0cab52c883e7e26f5b7948e3ed (diff)
downloadgit-81021871eaa8b16a892b9c8791a0c905ab26e342.tar.xz
doc: MyFirstContribution: fix missing dependencies and clarify build steps
Fix issues in the MyFirstContribution guide that can lead to confusion or test failures when following the documented steps. * Add missing header includes in code examples (environment.h and strbuf.h). * Correct manpage synopsis formatting to prevent failing documentation tests. * Specify the use of parallel test execution with -j$(nproc), noting that it runs tests using all available CPUs and may be adjusted. These updates improve documentation accuracy and make the first-time contributor journey smoother. Signed-off-by: Shreyansh Paliwal <shreyanshpaliwalcmsmn@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/MyFirstContribution.adoc')
-rw-r--r--Documentation/MyFirstContribution.adoc15
1 files changed, 9 insertions, 6 deletions
diff --git a/Documentation/MyFirstContribution.adoc b/Documentation/MyFirstContribution.adoc
index f186dfbc89..7306edab0f 100644
--- a/Documentation/MyFirstContribution.adoc
+++ b/Documentation/MyFirstContribution.adoc
@@ -331,7 +331,8 @@ 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"` and `#include "repository.h"`.
+Add a line to `#include "config.h"`, `#include "repository.h"` and
+`#include "environment.h"`.
Then, add the following bits to the function body:
function body:
@@ -429,6 +430,7 @@ Add the following includes:
----
#include "commit.h"
#include "pretty.h"
+#include "strbuf.h"
----
Then, add the following lines within your implementation of `cmd_psuh()` near
@@ -503,8 +505,8 @@ git-psuh - Delight users' typo with a shy horse
SYNOPSIS
--------
-[verse]
-'git-psuh [<arg>...]'
+[synopsis]
+git psuh [<arg>...]
DESCRIPTION
-----------
@@ -726,9 +728,10 @@ $ prove -j$(nproc) --shuffle t[0-9]*.sh
----
NOTE: You can also do this with `make test` or use any testing harness which can
-speak TAP. `prove` can run concurrently. `shuffle` randomizes the order the
-tests are run in, which makes them resilient against unwanted inter-test
-dependencies. `prove` also makes the output nicer.
+speak TAP. `prove` can run concurrently. `-j$(nproc)` runs tests using all
+available CPUs in parallel, but the job count can be adjusted as needed.
+`shuffle` randomizes the order the tests are run in, which makes them resilient
+against unwanted inter-test dependencies. `prove` also makes the output nicer.
Go ahead and commit this change, as well.