{"thread":{"id":"56768","subject":"Contradicting man page for git branch copy","startedAt":"2021-10-23T18:32:33Z","lastAt":"2021-10-23T23:57:35Z","messageCount":2,"participants":["Martin","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"439452","messageId":"7a600f7e-e3a7-edac-056c-9639ff01e471@mfriebe.de","threadId":"56768","inReplyTo":null,"subject":"Contradicting man page for git branch copy","fromName":"Martin","fromEmail":"git@mfriebe.de","sentAt":"2021-10-23T15:25:16Z","receivedAt":"2021-10-23T18:32:33Z","isPatch":false,"sender":{"key":"git@mfriebe.de","avatar":null},"body":"The man page says\n\n1) Under \"Description\"\nhttps://git-scm.com/docs/git-branch#_description\n> The |-c| and |-C| options have the exact same semantics as |-m| and \n> |-M|, except instead of the branch being renamed, it will be copied to \n> a new name, along with its config and reflog.\n\nBut on the option itself\nhttps://git-scm.com/docs/git-branch#Documentation/git-branch.txt--c\n>\n> -c\n> --copy\n>\n>     Copy a branch and the corresponding reflog.\n>\n\nThe latter does not mention the config.\n\nSo does it copy the config or not ?\n\n\n\n"},{"id":"439469","messageId":"xmqq5ytn8fbp.fsf@gitster.g","threadId":"56768","inReplyTo":"7a600f7e-e3a7-edac-056c-9639ff01e471@mfriebe.de","subject":"Re* Contradicting man page for git branch copy","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-10-23T23:57:30Z","receivedAt":"2021-10-23T23:57:35Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Martin <git@mfriebe.de> writes:\n\n> The man page says\n>\n> 1) Under \"Description\"\n> https://git-scm.com/docs/git-branch#_description\n>> The |-c| and |-C| options have the exact same semantics as |-m| and\n>> |-M|, except instead of the branch being renamed, it will be copied\n>> to a new name, along with its config and reflog.\n>\n> But on the option itself\n> https://git-scm.com/docs/git-branch#Documentation/git-branch.txt--c\n>>\n>> -c\n>> --copy\n>>\n>>     Copy a branch and the corresponding reflog.\n>>\n>\n> The latter does not mention the config.\n>\n> So does it copy the config or not ?\n\nThanks for a report.  \n\nI hope that builtin/branch.c::copy_or_rename_branch() is a\nrelatively easy read.\n\n----- >8 --------- >8 --------- >8 --------- >8 -----\nSubject: branch (doc): -m/-c copies config and reflog\n\nThe description section for the command mentions config and reflog\nare moved or copied by these options, but the description for these\noptions did not.  Make them match.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/git-branch.txt | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git i/Documentation/git-branch.txt w/Documentation/git-branch.txt\nindex 5449767121..8af42eff89 100644\n--- i/Documentation/git-branch.txt\n+++ w/Documentation/git-branch.txt\n@@ -125,14 +125,14 @@ OPTIONS\n \n -m::\n --move::\n-\tMove/rename a branch and the corresponding reflog.\n+\tMove/rename a branch, together with its config and reflog.\n \n -M::\n \tShortcut for `--move --force`.\n \n -c::\n --copy::\n-\tCopy a branch and the corresponding reflog.\n+\tCopy a branch, together with its config and reflog.\n \n -C::\n \tShortcut for `--copy --force`.\n\n\n"}]}