From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.1 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id B00F520248 for ; Sat, 9 Mar 2019 12:35:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726487AbfCIMfs (ORCPT ); Sat, 9 Mar 2019 07:35:48 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:34543 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726164AbfCIMfs (ORCPT ); Sat, 9 Mar 2019 07:35:48 -0500 Received: by mail-lj1-f194.google.com with SMTP id l5so257456lje.1 for ; Sat, 09 Mar 2019 04:35:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gjjMdkzViXAAJZRRQwQfegvqCV1axqeLkTKT2pj2ebk=; b=OIqnC7zkg1t1/ZPPoQxuGBVZ/4dKo1AGMM00qOdDo50FWvtRpikm1gk1ClQIpikG1W ovv+FQNzbyIWcBSot5jxjoI7TzDicHwixA9pphzjbTOYvsbZ4yVsi8kdA15NyyoKCMWK eOuZkHYez5cq1JHQJ9Vm/b2wxvKj0CPQnZxQjKKNG3hC0vWLxAu9BP229g8SQ8znCzVq PGXtoqW1YFpgRQmDKH8UFqDfyseWsd42wRTRwy86o+8RyujAry3KaROp2H7NGmcPUDt1 Wx5GWwMYerOSBrblq3p+UtqqEXKDksiOEttlshcboTuuXpwxbEQ2Uxjr2hxipEcncwwi lwsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gjjMdkzViXAAJZRRQwQfegvqCV1axqeLkTKT2pj2ebk=; b=anvogETjAyYa20i7sq4NoNNuyvchA5ye7bP3TDm8ijXFJzxmfrrnJwbLkQcCLKl0cs Eqe6v+vNMA6zgo8M4c1jvjoKGNannX+zIvYmHDxFnZCdP0Dyw+Q7GgrctP6wj/lISTfZ HdPFDuVXa8du1cFKDmwJyFQj1jTKaC4gK1pGCG4xA3IVp4ebcIynxEVBX+wbyCQxBg9k vOzLnULHGaXCuV10Un7pc46oIi/vQkFNX1gDEv4hK1D3mYjeMqVQmnzx28bvu8nm2AzM nokTpNgnhwJgk/vpWCckxgKqxv8GGsBCjqVHlxjI4cJbW9yWsy3HUgJoNUpCYcn8hS9a T+5w== X-Gm-Message-State: APjAAAVLiwsLIfv7GXK/wvIjQPRMJCQCCnxtT5NANbAIvfYz+vmPSpUr sifU6wCM+ps1Uy/XQFXQBhI= X-Google-Smtp-Source: APXvYqyU7ROPzrn3ivwDuxuRaTR0pENPjjYGTbXGWg9h2n24Wyj1f7vIhW3UwK59gc+WPeV9zDXcOQ== X-Received: by 2002:a2e:3009:: with SMTP id w9mr11719322ljw.144.1552134944721; Sat, 09 Mar 2019 04:35:44 -0800 (PST) Received: from localhost.localdomain (31-211-229-121.customers.ownit.se. [31.211.229.121]) by smtp.gmail.com with ESMTPSA id p5sm69235ljg.44.2019.03.09.04.35.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Mar 2019 04:35:43 -0800 (PST) From: =?UTF-8?q?Martin=20=C3=85gren?= To: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Cc: git@vger.kernel.org, Junio C Hamano , Eric Sunshine , =?UTF-8?q?SZEDER=20G=C3=A1bor?= Subject: Re: [PATCH v3 04/21] git-checkout.txt: fix monospace typeset Date: Sat, 9 Mar 2019 13:35:18 +0100 Message-Id: <20190309123518.2193053-1-martin.agren@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190308095752.8574-5-pclouds@gmail.com> References: <20190308095752.8574-5-pclouds@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Fri, 8 Mar 2019 at 10:58, Nguyễn Thái Ngọc Duy wrote: > Documentation/git-checkout.txt | 60 +++++++++++++++++----------------- > 1 file changed, 30 insertions(+), 30 deletions(-) > > 'git checkout' []:: > - To prepare for working on , switch to it by updating > + To prepare for working on ``, switch to it by updating > the index and the files in the working tree, and by pointing > HEAD at the branch. Local modifications to the files in the You could wrap HEAD in backticks as well: `HEAD`. > - Prepare to work on top of , by detaching HEAD at it > + Prepare to work on top of ``, by detaching HEAD at it Likewise. > (see "DETACHED HEAD" section), and updating the index and the (but not here) > be used to detach HEAD at the tip of the branch (`git checkout > -` would check out that branch without detaching HEAD). > +``` would check out that branch without detaching HEAD). This results in a nesting. I would say this was already correct. (A few more `HEAD` here.) > - Create a new branch named and start it at > - ; see linkgit:git-branch[1] for details. > + Create a new branch named `` and start it at > + ``; see linkgit:git-branch[1] for details. Lots of changes like this. Good. > This is the default behavior of "git checkout " when Should be `git checkout `? > - is not a branch name. See the "DETACHED HEAD" section > + `` is not a branch name. See the "DETACHED HEAD" section Good. > -that records a set of paths similar to by easily running > +that records a set of paths similar to `` by easily running > "git commit -a" to make the root commit. Another opportunity for backticks. I saw one change that I disagreed with and a few missed opportunities (IMHO). How about something like the below squashed in? (This is based on this point in the series.) It might be worth polishing this document before copying it (or parts of it) in the next commit. Martin -- >8 -- Subject: git-checkout.txt: add more backticks for monospacing Add backticks where we have none, replace single quotes with backticks and replace double-quotes. Drop double-quotes from nested constructions such as `"@{-1}"`. Add a missing possessive apostrophe after the word "submodules" while at it. Signed-off-by: Martin Ågren --- Documentation/git-checkout.txt | 106 ++++++++++++++++----------------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index 1b9d689933..af5906fbf5 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -26,7 +26,7 @@ branch. 'git checkout' []:: To prepare for working on ``, switch to it by updating the index and the files in the working tree, and by pointing - HEAD at the branch. Local modifications to the files in the + `HEAD` at the branch. Local modifications to the files in the working tree are kept, so that they can be committed to the ``. + @@ -75,7 +75,7 @@ successful. 'git checkout' --detach []:: 'git checkout' [--detach] :: - Prepare to work on top of ``, by detaching HEAD at it + Prepare to work on top of ``, by detaching `HEAD` at it (see "DETACHED HEAD" section), and updating the index and the files in the working tree. Local modifications to the files in the working tree are kept, so that the resulting working @@ -83,10 +83,10 @@ successful. modifications. + When the `` argument is a branch name, the `--detach` option can -be used to detach HEAD at the tip of the branch (`git checkout -``` would check out that branch without detaching HEAD). +be used to detach `HEAD` at the tip of the branch (`git checkout +` would check out that branch without detaching `HEAD`). + -Omitting `` detaches HEAD at the tip of the current branch. +Omitting `` detaches `HEAD` at the tip of the current branch. 'git checkout' [] [--] ...:: @@ -128,7 +128,7 @@ OPTIONS -f:: --force:: When switching branches, proceed even if the index or the - working tree differs from HEAD. This is used to throw away + working tree differs from `HEAD`. This is used to throw away local changes. + When checking out paths from the index, do not fail upon unmerged @@ -173,15 +173,15 @@ If no `-b` option is given, the name of the new branch will be derived from the remote-tracking branch, by looking at the local part of the refspec configured for the corresponding remote, and then stripping the initial part up to the "*". -This would tell us to use "hack" as the local branch when branching -off of "origin/hack" (or "remotes/origin/hack", or even -"refs/remotes/origin/hack"). If the given name has no slash, or the above +This would tell us to use `hack` as the local branch when branching +off of `origin/hack` (or `remotes/origin/hack`, or even +`refs/remotes/origin/hack`). If the given name has no slash, or the above guessing results in an empty name, the guessing is aborted. You can explicitly give a name with `-b` in such a case. --no-track:: Do not set up "upstream" configuration, even if the - branch.autoSetupMerge configuration variable is true. + `branch.autoSetupMerge` configuration variable is true. -l:: Create the new branch's reflog; see linkgit:git-branch[1] for @@ -190,7 +190,7 @@ explicitly give a name with `-b` in such a case. --detach:: Rather than checking out a branch to work on it, check out a commit for inspection and discardable experiments. - This is the default behavior of "git checkout " when + This is the default behavior of `git checkout ` when `` is not a branch name. See the "DETACHED HEAD" section below for details. @@ -202,9 +202,9 @@ explicitly give a name with `-b` in such a case. commits. + The index and the working tree are adjusted as if you had previously run -"git checkout ". This allows you to start a new history +`git checkout `. This allows you to start a new history that records a set of paths similar to `` by easily running -"git commit -a" to make the root commit. +`git commit -a` to make the root commit. + This can be useful when you want to publish the tree from a commit without exposing its full history. You might want to do this to publish @@ -215,14 +215,14 @@ code. If you want to start a disconnected history that records a set of paths that is totally different from the one of ``, then you should clear the index and the working tree right after creating the orphan -branch by running "git rm -rf ." from the top level of the working tree. +branch by running `git rm -rf .` from the top level of the working tree. Afterwards you will be ready to prepare your new files, repopulating the working tree, by copying them from elsewhere, extracting a tarball, etc. --ignore-skip-worktree-bits:: In sparse checkout mode, `git checkout -- ` would update only entries matched by `` and sparse patterns - in $GIT_DIR/info/sparse-checkout. This option ignores + in `$GIT_DIR/info/sparse-checkout`. This option ignores the sparse patterns and adds back any files in ``. -m:: @@ -245,9 +245,9 @@ When checking out paths from the index, this option lets you recreate the conflicted merge in the specified paths. --conflict=