Skip to content

Commit 049e64a

Browse files
bk2204gitster
authored andcommitted
Documentation: convert SubmittingPatches to AsciiDoc
The SubmittingPatches document is often cited by outside parties as an example of good practices to follow, including logical, independent commits; patch sign-offs; and sending patches to a mailing list. Currently, people who want to cite a particular section tend to either refer to it by name and let the interested party search through the document to find it, or link to a given line number on GitHub and hope the file doesn't change. Instead, convert the document to AsciiDoc. Build it as part of the technical documentation, since it is likely of interest to the same group of people. Provide stable links to the sections which outside parties are likely to want to link to. Make some minor structural changes to organize it so that it can be formatted sanely. Since the makefile needs a .txt extension in order to build with the rest of the documentation, simply copy the file. Ignore the temporary file so it doesn't get checked in accidentally, and remove it as part of the clean process. Do this instead of renaming the file so that people who have already linked to the documentation (who we're trying to help) don't find their links broken. Avoid symlinking since Windows will not like that. This allows us to render the document as part of the website for the benefit of others who wish to link to it as well as providing a more nicely formatted display for our community and potential contributors. Signed-off-by: brian m. carlson <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b072e0a commit 049e64a

File tree

3 files changed

+191
-161
lines changed

3 files changed

+191
-161
lines changed

Documentation/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ doc.dep
1111
cmds-*.txt
1212
mergetools-*.txt
1313
manpage-base-url.xsl
14+
SubmittingPatches.txt

Documentation/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ SP_ARTICLES += howto/maintain-git
6767
API_DOCS = $(patsubst %.txt,%,$(filter-out technical/api-index-skel.txt technical/api-index.txt, $(wildcard technical/api-*.txt)))
6868
SP_ARTICLES += $(API_DOCS)
6969

70+
TECH_DOCS += SubmittingPatches
7071
TECH_DOCS += technical/hash-function-transition
7172
TECH_DOCS += technical/http-protocol
7273
TECH_DOCS += technical/index-format
@@ -324,6 +325,7 @@ clean:
324325
$(RM) *.pdf
325326
$(RM) howto-index.txt howto/*.html doc.dep
326327
$(RM) technical/*.html technical/api-index.txt
328+
$(RM) SubmittingPatches.txt
327329
$(RM) $(cmds_txt) $(mergetools_txt) *.made
328330
$(RM) manpage-base-url.xsl
329331

@@ -362,6 +364,9 @@ technical/%.html: ASCIIDOC_EXTRA += -a git-relative-html-prefix=../
362364
$(patsubst %,%.html,$(API_DOCS) technical/api-index $(TECH_DOCS)): %.html : %.txt asciidoc.conf
363365
$(QUIET_ASCIIDOC)$(TXT_TO_HTML) $*.txt
364366

367+
SubmittingPatches.txt: SubmittingPatches
368+
$(QUIET_GEN) cp $< $@
369+
365370
XSLT = docbook.xsl
366371
XSLTOPTS = --xinclude --stringparam html.stylesheet docbook-xsl.css
367372

0 commit comments

Comments
 (0)