git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/2] git-worktree.txt: fix indentation of example and text of 'add' command

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Feb 16, 2018, 20:44 UTC
Message-ID
<20180216204452.2153-3-sunshine@sunshineco.com>
In-Reply-To
<20180216204452.2153-1-sunshine@sunshineco.com>

When 4e85333197 (worktree: make add <path> <branch> dwim, 2017-11-26) added an example command in a literal code block, it neglected to insert a mandatory "+" line before the block. This omission resulted in both the literal code block and the (existing) paragraph following the block to be outdented, even though they should be indented under the 'add' sub-command along with the rest of the text pertaining to that command. Furthermore, the mandatory "+" line separating the code block from the following text got rendered as a leading character on the line ("+ If <commit-ish>...") rather than being treated as a formatting directive.

Fix these problems by adding the missing "+" line before the example code block.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
---
 Documentation/git-worktree.txt | 1 +
 1 file changed, 1 insertion(+)
diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
index c941c48827..5ac3f68ab5 100644
--- a/Documentation/git-worktree.txt
+++ b/Documentation/git-worktree.txt
@@ -56,6 +56,7 @@ If <commit-ish> is a branch name (call it `<branch>`) and is not found,
 and neither `-b` nor `-B` nor `--detach` are used, but there does
 exist a tracking branch in exactly one remote (call it `<remote>`)
 with a matching name, treat as equivalent to:
++
 ------------
 $ git worktree add --track -b <branch> <path> <remote>/<branch>
 ------------
-- 
2.16.1.374.g7648891022
Previous: Eric SunshineNext: Eric Sunshine
Message 2 of 4 in “fix minor git-worktree.txt botches”
  1. 0/2 fix minor git-worktree.txt botchesEric Sunshine, Feb 16, 2018
  2. 2/2 git-worktree.txt: fix indentation of example and text of 'add' commandEric Sunshine, Feb 16, 2018
  3. 1/2 git-worktree.txt: fix missing ")" typoEric Sunshine, Feb 16, 2018
  4. Junio C HamanoFeb 16, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.