summaryrefslogtreecommitdiffstats
path: root/MyFirstContribution.html
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-12-01 14:58:27 -0800
committerJunio C Hamano <gitster@pobox.com>2019-12-01 14:58:27 -0800
commit8ef91f31f6606a0370b18943c3b0f089e04873f9 (patch)
tree2bf27a3779a34fa4bf69dfc02e1fe1be848ea0d2 /MyFirstContribution.html
parent8ac8a3d8dd001611b77776fa19ef37c2c87cd987 (diff)
downloadgit-htmldocs-8ef91f31f6606a0370b18943c3b0f089e04873f9.tar.gz
Autogenerated HTML docs for v2.24.0-308-g228f5
Diffstat (limited to 'MyFirstContribution.html')
-rw-r--r--MyFirstContribution.html70
1 files changed, 60 insertions, 10 deletions
diff --git a/MyFirstContribution.html b/MyFirstContribution.html
index 2cadcef70..347d7bc0e 100644
--- a/MyFirstContribution.html
+++ b/MyFirstContribution.html
@@ -781,6 +781,30 @@ $ cd git</code></pre>
</div></div>
</div>
<div class="sect2">
+<h3 id="dependencies">Installing Dependencies</h3>
+<div class="paragraph"><p>To build Git from source, you need to have a handful of dependencies installed
+on your system. For a hint of what&#8217;s needed, you can take a look at
+<code>INSTALL</code>, paying close attention to the section about Git&#8217;s dependencies on
+external programs and libraries. That document mentions a way to "test-drive"
+our freshly built Git without installing; that&#8217;s the method we&#8217;ll be using in
+this tutorial.</p></div>
+<div class="paragraph"><p>Make sure that your environment has everything you need by building your brand
+new clone of Git from the above step:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>$ make</code></pre>
+</div></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<div class="title">Note</div>
+</td>
+<td class="content">The Git build is parallelizable. <code>-j#</code> is not included above but you can
+use it as you prefer, here and elsewhere.</td>
+</tr></table>
+</div>
+</div>
+<div class="sect2">
<h3 id="identify-problem">Identify Problem to Solve</h3>
<div class="paragraph"><p>In this tutorial, we will add a new command, <code>git psuh</code>, short for &#8220;Pony Saying
&#8216;Um, Hello&#8221;&#8217; - a feature which has gone unimplemented despite a high frequency
@@ -884,15 +908,6 @@ $ make</code></pre>
it off, but it&#8217;s a good idea to mention the problem to the mailing list.</td>
</tr></table>
</div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">The Git build is parallelizable. <code>-j#</code> is not included above but you can
-use it as you prefer, here and elsewhere.</td>
-</tr></table>
-</div>
<div class="paragraph"><p>Great, now your new command builds happily on its own. But nobody invokes it.
Let&#8217;s change that.</p></div>
<div class="paragraph"><p>The list of commands lives in <code>git.c</code>. We can register a new command by adding
@@ -1246,6 +1261,27 @@ the <code>--</code> are interpreted merely as positional arguments. (This can be
you want to pass as a parameter something which would usually be interpreted as
a flag.) <code>parse_options()</code> will terminate parsing when it reaches <code>--</code> and give
you the rest of the options afterwards, untouched.</p></div>
+<div class="paragraph"><p>Now that you have a usage hint, you can teach Git how to show it in the general
+command list shown by <code>git help git</code> or <code>git help -a</code>, which is generated from
+<code>command-list.txt</code>. Find the line for <em>git-pull</em> so you can add your <em>git-psuh</em>
+line above it in alphabetical order. Now, we can add some attributes about the
+command which impacts where it shows up in the aforementioned help commands. The
+top of <code>command-list.txt</code> shares some information about what each attribute
+means; in those help pages, the commands are sorted according to these
+attributes. <code>git psuh</code> is user-facing, or porcelain - so we will mark it as
+"mainporcelain". For "mainporcelain" commands, the comments at the top of
+<code>command-list.txt</code> indicate we can also optionally add an attribute from another
+list; since <code>git psuh</code> shows some information about the user&#8217;s workspace but
+doesn&#8217;t modify anything, let&#8217;s mark it as "info". Make sure to keep your
+attributes in the same style as the rest of <code>command-list.txt</code> using spaces to
+align and delineate them:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>git-prune-packed plumbingmanipulators
+git-psuh mainporcelain info
+git-pull mainporcelain remote
+git-push mainporcelain remote</code></pre>
+</div></div>
<div class="paragraph"><p>Build again. Now, when you run with <code>-h</code>, you should see your usage printed and
your command terminated before anything else interesting happens. Great!</p></div>
<div class="paragraph"><p>Go ahead and commit this one, too.</p></div>
@@ -1451,6 +1487,20 @@ already uses it to comment on your PR with <code>/allow &lt;username&gt;</code>.
will automatically run your PRs through the CI even without the permission given
but you will not be able to <code>/submit</code> your changes until someone allows you to
use the tool.</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<div class="title">Note</div>
+</td>
+<td class="content">You can typically find someone who can <code>/allow</code> you on GitGitGadget by
+either examining recent pull requests where someone has been granted <code>/allow</code>
+(<a href="https://github.com/gitgitgadget/git/pulls?utf8=%E2%9C%93&amp;q=is%3Apr+is%3Aopen+%22%2Fallow%22">Search:
+is:pr is:open "/allow"</a>), in which case both the author and the person who
+granted the <code>/allow</code> can now <code>/allow</code> you, or by inquiring on the
+<a href="https://webchat.freenode.net/#git-devel">#git-devel</a> IRC channel on Freenode
+linking your pull request and asking for someone to <code>/allow</code> you.</td>
+</tr></table>
+</div>
<div class="paragraph"><p>If the CI fails, you can update your changes with <code>git rebase -i</code> and push your
branch again:</p></div>
<div class="listingblock">
@@ -1814,7 +1864,7 @@ should generate your diffs from <code>&lt;topic&gt;..&lt;mybranch&gt;</code> and
<div id="footer">
<div id="footer-text">
Last updated
- 2019-10-09 14:51:03 JST
+ 2019-12-01 14:55:34 PST
</div>
</div>
</body>