{"thread":{"id":"48246","subject":"[PATCH 1/2] git-worktree.txt: recommend 'git worktree remove' over manual deletion","startedAt":"2018-04-09T07:34:59Z","lastAt":"2018-04-09T16:12:05Z","messageCount":3,"participants":["Eric Sunshine","Duy Nguyen"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"344160","messageId":"20180409073400.19415-1-sunshine@sunshineco.com","threadId":"48246","inReplyTo":null,"subject":"[PATCH 1/2] git-worktree.txt: recommend 'git worktree remove' over manual deletion","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-04-09T07:33:59Z","receivedAt":"2018-04-09T07:34:59Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"When cc73385cf6 (worktree remove: new command, 2018-02-12) implemented\nand documented 'git worktree remove', it forgot to update existing\ninstructions suggesting manual deletion. Fix this oversight by\nrecommending 'git worktree remove' instead.\n\nSigned-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n Documentation/git-worktree.txt | 14 +++++++-------\n 1 file changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt\nindex e7eb24ab85..bc9cd8b60f 100644\n--- a/Documentation/git-worktree.txt\n+++ b/Documentation/git-worktree.txt\n@@ -27,11 +27,12 @@ out more than one branch at a time.  With `git worktree add` a new working\n tree is associated with the repository.  This new working tree is called a\n \"linked working tree\" as opposed to the \"main working tree\" prepared by \"git\n init\" or \"git clone\".  A repository has one main working tree (if it's not a\n-bare repository) and zero or more linked working trees.\n+bare repository) and zero or more linked working trees. When you are done\n+with a linked working tree, remove it with `git worktree remove`.\n \n-When you are done with a linked working tree you can simply delete it.\n-The working tree's administrative files in the repository (see\n-\"DETAILS\" below) will eventually be removed automatically (see\n+If a working tree is deleted without using `git worktree remove`, then\n+its associated administrative files, which reside in the repository\n+(see \"DETAILS\" below), will eventually be removed automatically (see\n `gc.worktreePruneExpire` in linkgit:git-config[1]), or you can run\n `git worktree prune` in the main or any linked working tree to\n clean up any stale administrative files.\n@@ -106,7 +107,7 @@ OPTIONS\n \tBy default, `add` refuses to create a new working tree when\n \t`<commit-ish>` is a branch name and is already checked out by\n \tanother working tree and `remove` refuses to remove an unclean\n-\tworking tree. This option overrides that safeguard.\n+\tworking tree. This option overrides these safeguards.\n \n -b <new-branch>::\n -B <new-branch>::\n@@ -278,8 +279,7 @@ $ pushd ../temp\n # ... hack hack hack ...\n $ git commit -a -m 'emergency fix for boss'\n $ popd\n-$ rm -rf ../temp\n-$ git worktree prune\n+$ git worktree remove ../temp\n ------------\n \n BUGS\n-- \n2.17.0.484.g0c8726318c\n\n"},{"id":"344161","messageId":"20180409073400.19415-2-sunshine@sunshineco.com","threadId":"48246","inReplyTo":"20180409073400.19415-1-sunshine@sunshineco.com","subject":"[PATCH 2/2] git-worktree.txt: unify command-line prompt in example blocks","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-04-09T07:34:00Z","receivedAt":"2018-04-09T07:35:01Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"The command-line prompt in the \"EXAMPLES\" section is \"$\", however,\nexamples in the 'git worktree list' section (oddly) use \"S\" as a\nprompt. Fix this inconsistency by settling on \"$\" as prompt in all\nexamples.\n\nSigned-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n Documentation/git-worktree.txt | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt\nindex bc9cd8b60f..2755ca90e3 100644\n--- a/Documentation/git-worktree.txt\n+++ b/Documentation/git-worktree.txt\n@@ -233,7 +233,7 @@ The worktree list command has two output formats.  The default format shows the\n details on a single line with columns.  For example:\n \n ------------\n-S git worktree list\n+$ git worktree list\n /path/to/bare-source            (bare)\n /path/to/linked-worktree        abcd1234 [master]\n /path/to/other-linked-worktree  1234abc  (detached HEAD)\n@@ -248,7 +248,7 @@ if the value is true.  An empty line indicates the end of a worktree.  For\n example:\n \n ------------\n-S git worktree list --porcelain\n+$ git worktree list --porcelain\n worktree /path/to/bare-source\n bare\n \n-- \n2.17.0.484.g0c8726318c\n\n"},{"id":"344200","messageId":"CACsJy8C+x__iEXU3LPTBRnoUBbcOXom6qO_42yk=eNS8_UddvQ@mail.gmail.com","threadId":"48246","inReplyTo":"20180409073400.19415-1-sunshine@sunshineco.com","subject":"Re: [PATCH 1/2] git-worktree.txt: recommend 'git worktree remove' over manual deletion","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2018-04-09T16:11:28Z","receivedAt":"2018-04-09T16:12:05Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Mon, Apr 9, 2018 at 9:33 AM, Eric Sunshine <sunshine@sunshineco.com> wrote:\n> When cc73385cf6 (worktree remove: new command, 2018-02-12) implemented\n> and documented 'git worktree remove', it forgot to update existing\n> instructions suggesting manual deletion. Fix this oversight by\n> recommending 'git worktree remove' instead.\n\nToo bad we can't show off \"git worktree move\" :) The patches look fine.\n-- \nDuy\n"}]}