Thread (1 message) 1 message, 1 author, 2025-09-16

Re: [PATCH v2 2/4] doc: add an UPSTREAM BRANCHES section to pull/push/fetch

From: Junio C Hamano <hidden>
Date: 2025-09-16 05:33:54
Subsystem: documentation, the rest · Maintainers: Jonathan Corbet, Linus Torvalds

Possibly related (same subject, not in this thread)

Junio C Hamano [off-list ref] writes:
quoted
+```
+[branch "main"]
+   remote = origin
+   merge = refs/heads/main
+```
When running with AsciiDoc, this makes the build fail with

        ASCIIDOC git-fetch.html
    asciidoc: ERROR: urls-remotes-upstreams.adoc: line 111: illegal style name: branch "main"
    gmake: *** [Makefile:356: git-fetch.html] Error 1

The line #111 is the one that has [branch "main"] on it.

Curiously, USE_ASCIIDOCTOR=YesPlease would not suffer from the
issue.

cf. https://github.com/git/git/actions/runs/17743739238/job/50423820029#step:4:1395
For now I'd locally patch it with the attached, which does not seem
to change the output at all when formatted with Asciidoctor, and
does not break the build when AsciiDoctor is used.

Thanks.
diff --git a/Documentation/urls-remotes-upstreams.adoc b/Documentation/urls-remotes-upstreams.adoc
index 1e9c56dc5f..f40db15b20 100644
--- a/Documentation/urls-remotes-upstreams.adoc
+++ b/Documentation/urls-remotes-upstreams.adoc
@@ -107,11 +107,9 @@ Git defaults to using the upstream branch for remote operations, for example:
 The upstream is stored in `.git/config`, in the "remote" and "merge"
 fields. For example, if `main`'s upstream is `origin/main`:
 
-```
-[branch "main"]
-   remote = origin
-   merge = refs/heads/main
-```
+	[branch "main"]
+	   remote = origin
+	   merge = refs/heads/main
 
 You can set an upstream branch explicitly with
 `git push --set-upstream <remote> <branch>` or `git branch --track`,

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help