<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/Makefile, branch v2.35.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.35.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.35.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2021-10-29T22:43:13Z</updated>
<entry>
<title>Merge branch 'ab/fix-make-lint-docs'</title>
<updated>2021-10-29T22:43:13Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-10-29T22:43:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dacf0acdf69bb873c0d54cd62d8652f1de464ed6'/>
<id>urn:sha1:dacf0acdf69bb873c0d54cd62d8652f1de464ed6</id>
<content type='text'>
Hotfix for a topic recently merged to 'master'.

* ab/fix-make-lint-docs:
  Documentation/Makefile: fix lint-docs mkdir dependency
</content>
</entry>
<entry>
<title>Documentation/Makefile: fix lint-docs mkdir dependency</title>
<updated>2021-10-27T23:57:14Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2021-10-26T07:31:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4c64fb5aad93dd2efe07bce943852ba4ce41ed26'/>
<id>urn:sha1:4c64fb5aad93dd2efe07bce943852ba4ce41ed26</id>
<content type='text'>
Since 8650c6298c (doc lint: make "lint-docs" non-.PHONY, 2021-10-15), we
put the output for gitlink linter into .build/lint-docs/gitlink. There
are order-only dependencies to create the sequence of subdirs like:

  .build/lint-docs: | .build
          $(QUIET)mkdir $@
  .build/lint-docs/gitlink: | .build/lint-docs
          $(QUIET)mkdir $@

where each level has to depend on the prior one (since the parent
directory must exist for us to create something inside it). But the
"howto" and "config" subdirectories of gitlink have the wrong
dependency; they depend on "lint-docs", not "lint-docs/gitlink".

This usually works out, because the LINT_DOCS_GITLINK targets which
depend on "gitlink/howto" also depend on just "gitlink", so the
directory gets created anyway. But since we haven't given make an
explicit ordering, things can racily happen out of order.

If you stick a "sleep 1" in the rule to build "gitlink" like this:

   ## Lint: gitlink
   .build/lint-docs/gitlink: | .build/lint-docs
  -	$(QUIET)mkdir $@
  +	$(QUIET)sleep 1 &amp;&amp; mkdir $@

then "make clean; make lint-docs" will fail reliably. Or you can see it
as-is just by building the directory in isolation:

  $ make clean
  [...]
  $ make .build/lint-docs/gitlink/howto
      GEN mergetools-list.made
      GEN cmd-list.made
      GEN doc.dep
      SUBDIR ../
  make[1]: 'GIT-VERSION-FILE' is up to date.
      SUBDIR ../
  make[1]: 'GIT-VERSION-FILE' is up to date.
  mkdir: cannot create directory ‘.build/lint-docs/gitlink/howto’: No such file or directory
  make: *** [Makefile:476: .build/lint-docs/gitlink/howto] Error 1

The fix is easy: we just need to depend on the correct parent directory.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ab/fix-make-lint-docs'</title>
<updated>2021-10-25T23:07:01Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-10-25T23:07:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=63ec2297d26155adb0e38745bf2284cd663add8e'/>
<id>urn:sha1:63ec2297d26155adb0e38745bf2284cd663add8e</id>
<content type='text'>
Build fix.

* ab/fix-make-lint-docs:
  doc lint: make "lint-docs" non-.PHONY
  doc build: speed up "make lint-docs"
  doc lint: emit errors on STDERR
  doc lint: fix error-hiding regression
</content>
</entry>
<entry>
<title>Merge branch 'tz/doc-link-to-bundle-format-fix'</title>
<updated>2021-10-18T22:47:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-10-18T22:47:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f217f6d1d1adbc928aed72be880991ab4102eb0c'/>
<id>urn:sha1:f217f6d1d1adbc928aed72be880991ab4102eb0c</id>
<content type='text'>
Doc update.

* tz/doc-link-to-bundle-format-fix:
  doc: add bundle-format to TECH_DOCS
</content>
</entry>
<entry>
<title>doc lint: make "lint-docs" non-.PHONY</title>
<updated>2021-10-15T17:29:11Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-10-15T12:39:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8650c6298c1cde720ffe3fe9f222662f61e7a0dc'/>
<id>urn:sha1:8650c6298c1cde720ffe3fe9f222662f61e7a0dc</id>
<content type='text'>
Speed up the "lint-docs" target by making it non-.PHONY. Similar to my
c234e8a0ecf (Makefile: make the "sparse" target non-.PHONY,
2021-09-23). We'll now create empty files corresponding to a
dependency graph for each of these lint scripts.

This speeds things up a bit[1], and makes the output correspond to any
in-tree changes we have:

    $ touch git-add.txt; make lint-docs; make lint-docs
        GEN cmd-list.made
        GEN doc.dep
        LINT GITLINK git-add.txt
        LINT MAN END git-add.txt
        LINT MAN SEC git-add.txt
    make: Nothing to be done for 'lint-docs'.

As with the "sparse" target changes this has a hard dependency on the
use of ".DELETE_ON_ERROR" in the Makefile, added here in
db10fc6c09f (doc: simplify Makefile using .DELETE_ON_ERROR,
2021-05-21). This method also depends on the output for us emitting
any errors on STDERR (fixed in a preceding commit), as well us these
scripts exiting with non-zero on any errors (which they were already
doing).

1.
$ git show HEAD~:Documentation/Makefile &gt;Makefile.old
$ hyperfine --warmup 2 -L f ",.old" 'make -j1 -f Makefile{f} lint-docs'
Benchmark #1: make -j1 -f Makefile lint-docs
  Time (mean ± σ):      60.8 ms ±   1.4 ms    [User: 58.7 ms, System: 2.5 ms]
  Range (min … max):    58.9 ms …  64.0 ms    48 runs

Benchmark #2: make -j1 -f Makefile.old lint-docs
  Time (mean ± σ):      84.0 ms ±   1.5 ms    [User: 78.6 ms, System: 5.7 ms]
  Range (min … max):    81.8 ms …  87.8 ms    35 runs

Summary
  'make -j1 -f Makefile lint-docs' ran
    1.38 ± 0.04 times faster than 'make -j1 -f Makefile.old lint-docs'

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 build: speed up "make lint-docs"</title>
<updated>2021-10-15T17:20:21Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-10-15T12:39:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8cc804d0abf78e5ff22f1561e9301e7264c58aa0'/>
<id>urn:sha1:8cc804d0abf78e5ff22f1561e9301e7264c58aa0</id>
<content type='text'>
Extend the trick we use to speed up the "clean" target to also extend
to the "lint-docs" target. See 54df87555b1 (Documentation/Makefile:
conditionally include doc.dep, 2020-12-08) for the "clean"
implementation.

The "doc-lint" target only depends on *.txt files, so we don't need to
generate GIT-VERSION-FILE etc. if that's all we're doing. This makes
the "make lint-docs" target more than 2x as fast:

$ git show HEAD~:Documentation/Makefile &gt;Makefile.old
$ hyperfine -L f ",.old" 'make -f Makefile{f} lint-docs'
Benchmark #1: make -f Makefile lint-docs
  Time (mean ± σ):     100.2 ms ±   1.3 ms    [User: 93.7 ms, System: 6.7 ms]
  Range (min … max):    98.4 ms … 103.1 ms    29 runs

Benchmark #2: make -f Makefile.old lint-docs
  Time (mean ± σ):     220.0 ms ±  20.0 ms    [User: 206.0 ms, System: 18.0 ms]
  Range (min … max):   206.6 ms … 267.5 ms    11 runs

Summary
  'make -f Makefile lint-docs' ran
    2.19 ± 0.20 times faster than 'make -f Makefile.old lint-docs'

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 error-hiding regression</title>
<updated>2021-10-15T17:16:36Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-10-15T12:39:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7e19e2efa906b9598d4c2258f6f37eb1dfffffee'/>
<id>urn:sha1:7e19e2efa906b9598d4c2258f6f37eb1dfffffee</id>
<content type='text'>
Fix the broken "make lint-docs" (or "make check-docs" at the
top-level) target, which has been broken since my cafd9828e89 (doc
lint: lint and fix missing "GIT" end sections, 2021-04-09).

The CI for "seen" is emitting an error about a broken gitlink, but due
to there being 3x scripts chained via ";" instead of "&amp;&amp;" we're not
carrying forward the non-zero exit code.

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: add bundle-format to TECH_DOCS</title>
<updated>2021-10-13T18:05:04Z</updated>
<author>
<name>Todd Zullinger</name>
<email>tmz@pobox.com</email>
</author>
<published>2021-10-13T03:28:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6e4fd8bfcd97d3ad493beb13a818f05597e637ea'/>
<id>urn:sha1:6e4fd8bfcd97d3ad493beb13a818f05597e637ea</id>
<content type='text'>
A link to the bundle-format was added in 5c8273d57c (bundle doc: rewrite
the "DESCRIPTION" section, 2021-07-31).

Ensure `technical/bundle-format.html` is created to avoid a broken link
in `git-bundle.html`.

Signed-off-by: Todd Zullinger &lt;tmz@pobox.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<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>
</feed>
