<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/Makefile, branch v2.33.6</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.33.6</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.33.6'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2021-05-24T09:08:22Z</updated>
<entry>
<title>doc: avoid using rm directly</title>
<updated>2021-05-24T09:08:22Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2021-05-21T22:29:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7ba30167291eb89f2e587b7cabfa4e7555de4ed5'/>
<id>urn:sha1:7ba30167291eb89f2e587b7cabfa4e7555de4ed5</id>
<content type='text'>
That's what we have $(RM) for.

Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc: simplify Makefile using .DELETE_ON_ERROR</title>
<updated>2021-05-24T09:08:22Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2021-05-21T22:29:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=db10fc6c09f1f74c4d0a9294ecbb68d390f54f15'/>
<id>urn:sha1:db10fc6c09f1f74c4d0a9294ecbb68d390f54f15</id>
<content type='text'>
Currently GNU make already removes files when catching an interruption
signal, however, in order to deal with other kinds of errors a
workaround is in place to store target output to a temporary file, and
only move it to its right place on success.

By enabling the built-in .DELETE_ON_ERROR we let make do this task, so
we don't have to.

This way the rules can be simplified a lot.

Suggested-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc: remove unnecessary rm instances</title>
<updated>2021-05-24T09:08:22Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2021-05-21T22:29:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=471e7b2cf6ab5ef057feed03b35dde9a26357611'/>
<id>urn:sha1:471e7b2cf6ab5ef057feed03b35dde9a26357611</id>
<content type='text'>
Commits 50cff52f1a (When generating manpages, delete outdated targets
first., 2007-08-02) and f9286765b2 (Documentation/Makefile: remove
cmd-list.made before redirecting to it., 2007-08-06) created these rm
instances for a very rare corner-case: building as root by mistake.

It's odd to have workarounds here, but nowhere else in the Makefile--
which already fails in this stuation, starting from
Documentation/technical/.

We gain nothing but complexity, so let's remove them.

Comments-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc: improve asciidoc dependencies</title>
<updated>2021-05-24T09:08:22Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2021-05-21T22:29:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=56da21392b10ebe161dbf426f170e74f800178cf'/>
<id>urn:sha1:56da21392b10ebe161dbf426f170e74f800178cf</id>
<content type='text'>
asciidoc needs asciidoc.conf, asciidoctor asciidoctor-extensions.rb.

Neither needs the other.

Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc: refactor common asciidoc dependencies</title>
<updated>2021-05-24T09:08:21Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2021-05-21T22:29:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=12d078ed2b64df220f2fe8f6a050f271133ccda9'/>
<id>urn:sha1:12d078ed2b64df220f2fe8f6a050f271133ccda9</id>
<content type='text'>
Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ab/doc-lint'</title>
<updated>2021-05-07T03:47:40Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-05-07T03:47:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5a357fa477bd9d7f9190cca3e5a7ef1186c3d64a'/>
<id>urn:sha1:5a357fa477bd9d7f9190cca3e5a7ef1186c3d64a</id>
<content type='text'>
Dev support.

* ab/doc-lint:
  docs: fix linting issues due to incorrect relative section order
  doc lint: lint relative section order
  doc lint: lint and fix missing "GIT" end sections
  doc lint: fix bugs in, simplify and improve lint script
  doc lint: Perl "strict" and "warnings" in lint-gitlink.perl
  Documentation/Makefile: make doc.dep dependencies a variable again
  Documentation/Makefile: make $(wildcard howto/*.txt) a var
</content>
</entry>
<entry>
<title>parallel-checkout: add design documentation</title>
<updated>2021-04-19T22:05:25Z</updated>
<author>
<name>Matheus Tavares</name>
<email>matheus.bernardino@usp.br</email>
</author>
<published>2021-04-19T19:53:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=68e66f2987724a639c896e7996ea347be62ef578'/>
<id>urn:sha1:68e66f2987724a639c896e7996ea347be62ef578</id>
<content type='text'>
Co-authored-by: Jeff Hostetler &lt;jeffhost@microsoft.com&gt;
Signed-off-by: Matheus Tavares &lt;matheus.bernardino@usp.br&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc lint: lint relative section order</title>
<updated>2021-04-11T06:36:34Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-04-09T15:02:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ea8b9271b17e64502dc80981cf09cec42739dce7'/>
<id>urn:sha1:ea8b9271b17e64502dc80981cf09cec42739dce7</id>
<content type='text'>
Add a linting script to check the relative order of the sections in
the documentation. We should have NAME, then SYNOPSIS, DESCRIPTION,
OPTIONS etc. in that order.

That holds true throughout our documentation, except for a few
exceptions which are hardcoded in the linting script.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc lint: lint and fix missing "GIT" end sections</title>
<updated>2021-04-11T06:36:34Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-04-09T15:02:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cafd9828e89328fef563e39f3b8e78e9aee74da5'/>
<id>urn:sha1:cafd9828e89328fef563e39f3b8e78e9aee74da5</id>
<content type='text'>
Lint for and fix the three manual pages that were missing the standard
"Part of the linkgit:git[1] suite" end section.

We only do this for the man[157] section documents (we don't have
anything outside those sections), not files to be included,
howto *.txt files etc.

We could also add this to the existing (and then renamed)
lint-gitlink.perl, but I'm not doing that here.

Obviously all of that fits in one script, but I think for something
like this that's a one-off script with global variables it's much
harder to follow when a large part of your script is some if/else or
keeping/resetting of state simply to work around the script doing two
things instead of one.

Especially because in this case this script wants to process the file
as one big string, but lint-gitlink.perl wants to look at it one line
at a time. We could also consolidate this whole thing and
t/check-non-portable-shell.pl, but that one likes to join lines as
part of its shell parsing.

So let's just add another script, whole scaffolding is basically:

    use strict;
    use warnings;
    sub report { ... }
    my $code = 0;
    while (&lt;&gt;) { ... }
    exit $code;

We'd spend more lines effort trying to consolidate them than just
copying that around.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc lint: fix bugs in, simplify and improve lint script</title>
<updated>2021-04-11T06:36:34Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-04-09T15:02:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d2c9908076b00aa59037673e7f262fc6f8867559'/>
<id>urn:sha1:d2c9908076b00aa59037673e7f262fc6f8867559</id>
<content type='text'>
The lint-gitlink.perl script added in ab81411ced (ci: validate
"linkgit:" in documentation, 2016-05-04) was more complex than it
needed to be. It:

 - Was using File::Find to recursively find *.txt files in
   Documentation/, let's instead use the Makefile as a source of truth
   for *.txt files, and pass it down to the script.

 - We now don't lint linkgit:* in RelNotes/* or technical/*, which we
   shouldn't have been doing in the first place anyway.

 - When the doc-diff script was added in beb188e22a (add a script to
   diff rendered documentation, 2018-08-06) we started sometimes having
   a "git worktree" under Documentation/.

   This tree contains a full checkout of git.git, as a result the
   "lint" script would recurse into that, and lint any *.txt file
   found in that entire repository.

   In practice the only in-tree "linkgit" outside of the
   Documentation/ tree is contrib/contacts/git-contacts.txt and
   contrib/subtree/git-subtree.txt, so this wouldn't emit any errors

Now we instead simply trust the Makefile to give us *.txt files.
Since the Makefile also knows what sections each page should be in we
don't have to open the files ourselves and try to parse that out. As a
bonus this will also catch bugs with the section line in the files
themselves being incorrect.

The structure of the new script is mostly based on
t/check-non-portable-shell.pl. As an added bonus it will also use
pos() to print where the problems it finds are, e.g. given an issue
like:

    diff --git a/Documentation/git-cherry.txt b/Documentation/git-cherry.txt
    [...]
     and line numbers.  git-cherry therefore detects when commits have been
    -"copied" by means of linkgit:git-cherry-pick[1], linkgit:git-am[1] or
    -linkgit:git-rebase[1].
    +"copied" by means of linkgit:git-cherry-pick[2], linkgit:git-am[3] or
    +linkgit:git-rebase[4].

We'll now emit:

    git-cherry.txt:20: error: git-cherry-pick[2]: wrong section (should be 1), shown with 'HERE' below:
    git-cherry.txt:20:      '"copied" by means of linkgit:git-cherry-pick[2]' &lt;-- HERE
    git-cherry.txt:20: error: git-am[3]: wrong section (should be 1), shown with 'HERE' below:
    git-cherry.txt:20:      '"copied" by means of linkgit:git-cherry-pick[2], linkgit:git-am[3]' &lt;-- HERE
    git-cherry.txt:21: error: git-rebase[4]: wrong section (should be 1), shown with 'HERE' below:
    git-cherry.txt:21:      'linkgit:git-rebase[4]' &lt;-- HERE

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
