{"thread":{"id":"60361","subject":"[PATCH 0/2] [Outreachy][PATCH v2] branch.c: adjust error messages to coding guidelines","startedAt":"2023-10-13T15:33:52Z","lastAt":"2023-10-13T18:30:44Z","messageCount":7,"participants":["Isoken June Ibizugbe via GitGitGadget","Isoken Ibizugbe","Rubén Justo","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"483202","messageId":"pull.1590.git.git.1697211227.gitgitgadget@gmail.com","threadId":"60361","inReplyTo":null,"subject":"[PATCH 0/2] [Outreachy][PATCH v2] branch.c: adjust error messages to coding guidelines","fromName":"Isoken June Ibizugbe via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-10-13T15:33:45Z","receivedAt":"2023-10-13T15:33:52Z","isPatch":true,"sender":{"key":"isokenjune@gmail.com","avatar":"https://avatars.githubusercontent.com/u/127752393?v=4"},"body":"As per the CodingGuidelines document, it is recommended that a single-line\nmessage provided to error messages such as die(), error() and warning(),\nshould start with a lowercase letter and should not end with a period.\n\nSigned-off-by: Isoken June Ibizugbe isokenjune@gmail.com\n\nIsoken June Ibizugbe (2):\n  branch.c: ammend error messages for die()\n  branch.c: adjust error messages to coding guidelines\n\n builtin/branch.c | 66 ++++++++++++++++++++++++------------------------\n 1 file changed, 33 insertions(+), 33 deletions(-)\n\n\nbase-commit: aab89be2eb6ca51eefeb8c8066f673f447058856\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1590%2FJunie06%2Famend-error-mesg-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1590/Junie06/amend-error-mesg-v1\nPull-Request: https://github.com/git/git/pull/1590\n-- \ngitgitgadget\n"},{"id":"483203","messageId":"91e4ad3984147fcc277254a3f6836bf79f5c9550.1697211227.git.gitgitgadget@gmail.com","threadId":"60361","inReplyTo":"pull.1590.git.git.1697211227.gitgitgadget@gmail.com","subject":"[PATCH 2/2] branch.c: adjust error messages to coding guidelines","fromName":"Isoken June Ibizugbe via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-10-13T15:33:47Z","receivedAt":"2023-10-13T15:33:54Z","isPatch":true,"sender":{"key":"isokenjune@gmail.com","avatar":"https://avatars.githubusercontent.com/u/127752393?v=4"},"body":"From: Isoken June Ibizugbe <isokenjune@gmail.com>\n\nSigned-off-by: Isoken June Ibizugbe <isokenjune@gmail.com>\n---\n builtin/branch.c | 32 ++++++++++++++++----------------\n 1 file changed, 16 insertions(+), 16 deletions(-)\n\ndiff --git a/builtin/branch.c b/builtin/branch.c\nindex a756543d644..e7ee9bd0f15 100644\n--- a/builtin/branch.c\n+++ b/builtin/branch.c\n@@ -173,11 +173,11 @@ static int branch_merged(int kind, const char *name,\n \t    (head_rev ? repo_in_merge_bases(the_repository, rev, head_rev) : 0) != merged) {\n \t\tif (merged)\n \t\t\twarning(_(\"deleting branch '%s' that has been merged to\\n\"\n-\t\t\t\t\"         '%s', but not yet merged to HEAD.\"),\n+\t\t\t\t\"         '%s', but not yet merged to HEAD\"),\n \t\t\t\tname, reference_name);\n \t\telse\n \t\t\twarning(_(\"not deleting branch '%s' that is not yet merged to\\n\"\n-\t\t\t\t\"         '%s', even though it is merged to HEAD.\"),\n+\t\t\t\t\"         '%s', even though it is merged to HEAD\"),\n \t\t\t\tname, reference_name);\n \t}\n \tfree(reference_name_to_free);\n@@ -190,13 +190,13 @@ static int check_branch_commit(const char *branchname, const char *refname,\n {\n \tstruct commit *rev = lookup_commit_reference(the_repository, oid);\n \tif (!force && !rev) {\n-\t\terror(_(\"Couldn't look up commit object for '%s'\"), refname);\n+\t\terror(_(\"couldn't look up commit object for '%s'\"), refname);\n \t\treturn -1;\n \t}\n \tif (!force && !branch_merged(kinds, branchname, rev, head_rev)) {\n-\t\terror(_(\"The branch '%s' is not fully merged.\\n\"\n+\t\terror(_(\"the branch '%s' is not fully merged.\\n\"\n \t\t      \"If you are sure you want to delete it, \"\n-\t\t      \"run 'git branch -D %s'.\"), branchname, branchname);\n+\t\t      \"run 'git branch -D %s'\"), branchname, branchname);\n \t\treturn -1;\n \t}\n \treturn 0;\n@@ -207,7 +207,7 @@ static void delete_branch_config(const char *branchname)\n \tstruct strbuf buf = STRBUF_INIT;\n \tstrbuf_addf(&buf, \"branch.%s\", branchname);\n \tif (git_config_rename_section(buf.buf, NULL) < 0)\n-\t\twarning(_(\"Update of config-file failed\"));\n+\t\twarning(_(\"update of config-file failed\"));\n \tstrbuf_release(&buf);\n }\n \n@@ -260,7 +260,7 @@ static int delete_branches(int argc, const char **argv, int force, int kinds,\n \t\tif (kinds == FILTER_REFS_BRANCHES) {\n \t\t\tconst char *path;\n \t\t\tif ((path = branch_checked_out(name))) {\n-\t\t\t\terror(_(\"Cannot delete branch '%s' \"\n+\t\t\t\terror(_(\"cannot delete branch '%s' \"\n \t\t\t\t\t\"used by worktree at '%s'\"),\n \t\t\t\t      bname.buf, path);\n \t\t\t\tret = 1;\n@@ -275,7 +275,7 @@ static int delete_branches(int argc, const char **argv, int force, int kinds,\n \t\t\t\t\t&oid, &flags);\n \t\tif (!target) {\n \t\t\tif (remote_branch) {\n-\t\t\t\terror(_(\"remote-tracking branch '%s' not found.\"), bname.buf);\n+\t\t\t\terror(_(\"remote-tracking branch '%s' not found\"), bname.buf);\n \t\t\t} else {\n \t\t\t\tchar *virtual_name = mkpathdup(fmt_remotes, bname.buf);\n \t\t\t\tchar *virtual_target = resolve_refdup(virtual_name,\n@@ -290,7 +290,7 @@ static int delete_branches(int argc, const char **argv, int force, int kinds,\n \t\t\t\t\t\t\"Did you forget --remote?\"),\n \t\t\t\t\t\tbname.buf);\n \t\t\t\telse\n-\t\t\t\t\terror(_(\"branch '%s' not found.\"), bname.buf);\n+\t\t\t\t\terror(_(\"branch '%s' not found\"), bname.buf);\n \t\t\t\tFREE_AND_NULL(virtual_target);\n \t\t\t}\n \t\t\tret = 1;\n@@ -630,17 +630,17 @@ static void copy_or_rename_branch(const char *oldname, const char *newname, int\n \n \tif (recovery) {\n \t\tif (copy)\n-\t\t\twarning(_(\"Created a copy of a misnamed branch '%s'\"),\n+\t\t\twarning(_(\"created a copy of a misnamed branch '%s'\"),\n \t\t\t\tinterpreted_oldname);\n \t\telse\n-\t\t\twarning(_(\"Renamed a misnamed branch '%s' away\"),\n+\t\t\twarning(_(\"renamed a misnamed branch '%s' away\"),\n \t\t\t\tinterpreted_oldname);\n \t}\n \n \tif (!copy && (oldref_usage & IS_HEAD) &&\n \t    replace_each_worktree_head_symref(worktrees, oldref.buf, newref.buf,\n \t\t\t\t\t      logmsg.buf))\n-\t\tdie(_(\"branch renamed to %s, but HEAD is not updated!\"), newname);\n+\t\tdie(_(\"branch renamed to %s, but HEAD is not updated\"), newname);\n \n \tstrbuf_release(&logmsg);\n \n@@ -878,8 +878,8 @@ int cmd_branch(int argc, const char **argv, const char *prefix)\n \t\tstrbuf_addf(&branch_ref, \"refs/heads/%s\", branch_name);\n \t\tif (!ref_exists(branch_ref.buf))\n \t\t\terror((!argc || branch_checked_out(branch_ref.buf))\n-\t\t\t      ? _(\"No commit on branch '%s' yet.\")\n-\t\t\t      : _(\"No branch named '%s'.\"),\n+\t\t\t      ? _(\"no commit on branch '%s' yet\")\n+\t\t\t      : _(\"no branch named '%s'\"),\n \t\t\t      branch_name);\n \t\telse if (!edit_branch_description(branch_name))\n \t\t\tret = 0; /* happy */\n@@ -893,7 +893,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)\n \t\t\tdie(_(\"branch name required\"));\n \t\telse if ((argc == 1) && filter.detached)\n \t\t\tdie(copy? _(\"cannot copy the current branch while not on any\")\n-\t\t\t\t: _(\"cannot rename the current branch while not on any.\"));\n+\t\t\t\t: _(\"cannot rename the current branch while not on any\"));\n \t\telse if (argc == 1)\n \t\t\tcopy_or_rename_branch(head, argv[0], copy, copy + rename > 1);\n \t\telse if (argc == 2)\n@@ -965,7 +965,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)\n \t\tconst char *start_name = argc == 2 ? argv[1] : head;\n \n \t\tif (filter.kind != FILTER_REFS_BRANCHES)\n-\t\t\tdie(_(\"the -a, and -r, options to 'git branch' do not take a branch name\\n\"\n+\t\t\tdie(_(\"the -a, and -r, options to 'git branch' do not take a branch name.\\n\"\n \t\t\t\t  \"Did you mean to use: -a|-r --list <pattern>?\"));\n \n \t\tif (track == BRANCH_TRACK_OVERRIDE)\n-- \ngitgitgadget\n"},{"id":"483204","messageId":"24618a8a3e9df4d5ae3cd715ce9ebd6376fcf766.1697211227.git.gitgitgadget@gmail.com","threadId":"60361","inReplyTo":"pull.1590.git.git.1697211227.gitgitgadget@gmail.com","subject":"[PATCH 1/2] branch.c: ammend error messages for die()","fromName":"Isoken June Ibizugbe via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-10-13T15:33:46Z","receivedAt":"2023-10-13T15:33:54Z","isPatch":true,"sender":{"key":"isokenjune@gmail.com","avatar":"https://avatars.githubusercontent.com/u/127752393?v=4"},"body":"From: Isoken June Ibizugbe <isokenjune@gmail.com>\n\nSigned-off-by: Isoken June Ibizugbe <isokenjune@gmail.com>\n---\n builtin/branch.c | 38 +++++++++++++++++++-------------------\n 1 file changed, 19 insertions(+), 19 deletions(-)\n\ndiff --git a/builtin/branch.c b/builtin/branch.c\nindex 2ec190b14a7..a756543d644 100644\n--- a/builtin/branch.c\n+++ b/builtin/branch.c\n@@ -518,11 +518,11 @@ static void reject_rebase_or_bisect_branch(struct worktree **worktrees,\n \t\t\tcontinue;\n \n \t\tif (is_worktree_being_rebased(wt, target))\n-\t\t\tdie(_(\"Branch %s is being rebased at %s\"),\n+\t\t\tdie(_(\"branch %s is being rebased at %s\"),\n \t\t\t    target, wt->path);\n \n \t\tif (is_worktree_being_bisected(wt, target))\n-\t\t\tdie(_(\"Branch %s is being bisected at %s\"),\n+\t\t\tdie(_(\"branch %s is being bisected at %s\"),\n \t\t\t    target, wt->path);\n \t}\n }\n@@ -578,7 +578,7 @@ static void copy_or_rename_branch(const char *oldname, const char *newname, int\n \t\tif (ref_exists(oldref.buf))\n \t\t\trecovery = 1;\n \t\telse\n-\t\t\tdie(_(\"Invalid branch name: '%s'\"), oldname);\n+\t\t\tdie(_(\"invalid branch name: '%s'\"), oldname);\n \t}\n \n \tfor (int i = 0; worktrees[i]; i++) {\n@@ -594,9 +594,9 @@ static void copy_or_rename_branch(const char *oldname, const char *newname, int\n \n \tif ((copy || !(oldref_usage & IS_HEAD)) && !ref_exists(oldref.buf)) {\n \t\tif (oldref_usage & IS_HEAD)\n-\t\t\tdie(_(\"No commit on branch '%s' yet.\"), oldname);\n+\t\t\tdie(_(\"no commit on branch '%s' yet\"), oldname);\n \t\telse\n-\t\t\tdie(_(\"No branch named '%s'.\"), oldname);\n+\t\t\tdie(_(\"no branch named '%s'\"), oldname);\n \t}\n \n \t/*\n@@ -624,9 +624,9 @@ static void copy_or_rename_branch(const char *oldname, const char *newname, int\n \n \tif (!copy && !(oldref_usage & IS_ORPHAN) &&\n \t    rename_ref(oldref.buf, newref.buf, logmsg.buf))\n-\t\tdie(_(\"Branch rename failed\"));\n+\t\tdie(_(\"branch rename failed\"));\n \tif (copy && copy_existing_ref(oldref.buf, newref.buf, logmsg.buf))\n-\t\tdie(_(\"Branch copy failed\"));\n+\t\tdie(_(\"branch copy failed\"));\n \n \tif (recovery) {\n \t\tif (copy)\n@@ -640,16 +640,16 @@ static void copy_or_rename_branch(const char *oldname, const char *newname, int\n \tif (!copy && (oldref_usage & IS_HEAD) &&\n \t    replace_each_worktree_head_symref(worktrees, oldref.buf, newref.buf,\n \t\t\t\t\t      logmsg.buf))\n-\t\tdie(_(\"Branch renamed to %s, but HEAD is not updated!\"), newname);\n+\t\tdie(_(\"branch renamed to %s, but HEAD is not updated!\"), newname);\n \n \tstrbuf_release(&logmsg);\n \n \tstrbuf_addf(&oldsection, \"branch.%s\", interpreted_oldname);\n \tstrbuf_addf(&newsection, \"branch.%s\", interpreted_newname);\n \tif (!copy && git_config_rename_section(oldsection.buf, newsection.buf) < 0)\n-\t\tdie(_(\"Branch is renamed, but update of config-file failed\"));\n+\t\tdie(_(\"branch is renamed, but update of config-file failed\"));\n \tif (copy && strcmp(interpreted_oldname, interpreted_newname) && git_config_copy_section(oldsection.buf, newsection.buf) < 0)\n-\t\tdie(_(\"Branch is copied, but update of config-file failed\"));\n+\t\tdie(_(\"branch is copied, but update of config-file failed\"));\n \tstrbuf_release(&oldref);\n \tstrbuf_release(&newref);\n \tstrbuf_release(&oldsection);\n@@ -773,7 +773,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)\n \n \thead = resolve_refdup(\"HEAD\", 0, &head_oid, NULL);\n \tif (!head)\n-\t\tdie(_(\"Failed to resolve HEAD as a valid ref.\"));\n+\t\tdie(_(\"failed to resolve HEAD as a valid ref\"));\n \tif (!strcmp(head, \"HEAD\"))\n \t\tfilter.detached = 1;\n \telse if (!skip_prefix(head, \"refs/heads/\", &head))\n@@ -866,7 +866,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)\n \n \t\tif (!argc) {\n \t\t\tif (filter.detached)\n-\t\t\t\tdie(_(\"Cannot give description to detached HEAD\"));\n+\t\t\t\tdie(_(\"cannot give description to detached HEAD\"));\n \t\t\tbranch_name = head;\n \t\t} else if (argc == 1) {\n \t\t\tstrbuf_branchname(&buf, argv[0], INTERPRET_BRANCH_LOCAL);\n@@ -892,7 +892,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)\n \t\tif (!argc)\n \t\t\tdie(_(\"branch name required\"));\n \t\telse if ((argc == 1) && filter.detached)\n-\t\t\tdie(copy? _(\"cannot copy the current branch while not on any.\")\n+\t\t\tdie(copy? _(\"cannot copy the current branch while not on any\")\n \t\t\t\t: _(\"cannot rename the current branch while not on any.\"));\n \t\telse if (argc == 1)\n \t\t\tcopy_or_rename_branch(head, argv[0], copy, copy + rename > 1);\n@@ -916,14 +916,14 @@ int cmd_branch(int argc, const char **argv, const char *prefix)\n \t\tif (!branch) {\n \t\t\tif (!argc || !strcmp(argv[0], \"HEAD\"))\n \t\t\t\tdie(_(\"could not set upstream of HEAD to %s when \"\n-\t\t\t\t      \"it does not point to any branch.\"),\n+\t\t\t\t      \"it does not point to any branch\"),\n \t\t\t\t    new_upstream);\n \t\t\tdie(_(\"no such branch '%s'\"), argv[0]);\n \t\t}\n \n \t\tif (!ref_exists(branch->refname)) {\n \t\t\tif (!argc || branch_checked_out(branch->refname))\n-\t\t\t\tdie(_(\"No commit on branch '%s' yet.\"), branch->name);\n+\t\t\t\tdie(_(\"no commit on branch '%s' yet\"), branch->name);\n \t\t\tdie(_(\"branch '%s' does not exist\"), branch->name);\n \t\t}\n \n@@ -946,12 +946,12 @@ int cmd_branch(int argc, const char **argv, const char *prefix)\n \t\tif (!branch) {\n \t\t\tif (!argc || !strcmp(argv[0], \"HEAD\"))\n \t\t\t\tdie(_(\"could not unset upstream of HEAD when \"\n-\t\t\t\t      \"it does not point to any branch.\"));\n+\t\t\t\t      \"it does not point to any branch\"));\n \t\t\tdie(_(\"no such branch '%s'\"), argv[0]);\n \t\t}\n \n \t\tif (!branch_has_merge_config(branch))\n-\t\t\tdie(_(\"Branch '%s' has no upstream information\"), branch->name);\n+\t\t\tdie(_(\"branch '%s' has no upstream information\"), branch->name);\n \n \t\tstrbuf_reset(&buf);\n \t\tstrbuf_addf(&buf, \"branch.%s.remote\", branch->name);\n@@ -965,11 +965,11 @@ int cmd_branch(int argc, const char **argv, const char *prefix)\n \t\tconst char *start_name = argc == 2 ? argv[1] : head;\n \n \t\tif (filter.kind != FILTER_REFS_BRANCHES)\n-\t\t\tdie(_(\"The -a, and -r, options to 'git branch' do not take a branch name.\\n\"\n+\t\t\tdie(_(\"the -a, and -r, options to 'git branch' do not take a branch name\\n\"\n \t\t\t\t  \"Did you mean to use: -a|-r --list <pattern>?\"));\n \n \t\tif (track == BRANCH_TRACK_OVERRIDE)\n-\t\t\tdie(_(\"the '--set-upstream' option is no longer supported. Please use '--track' or '--set-upstream-to' instead.\"));\n+\t\t\tdie(_(\"the '--set-upstream' option is no longer supported. Please use '--track' or '--set-upstream-to' instead\"));\n \n \t\tif (recurse_submodules) {\n \t\t\tcreate_branches_recursively(the_repository, branch_name,\n-- \ngitgitgadget\n\n"},{"id":"483205","messageId":"CAJHH8bE15VotFy7QQ-Npmfk9ePvf=-h5SP+Q8phrDBRj8Ti=hQ@mail.gmail.com","threadId":"60361","inReplyTo":"91e4ad3984147fcc277254a3f6836bf79f5c9550.1697211227.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 2/2] branch.c: adjust error messages to coding guidelines","fromName":"Isoken Ibizugbe","fromEmail":"isokenjune@gmail.com","sentAt":"2023-10-13T15:40:01Z","receivedAt":"2023-10-13T15:41:32Z","isPatch":true,"sender":{"key":"isokenjune@gmail.com","avatar":"https://avatars.githubusercontent.com/u/127752393?v=4"},"body":"On Fri, Oct 13, 2023 at 4:33 PM Isoken June Ibizugbe via GitGitGadget\n<gitgitgadget@gmail.com> wrote:\n>\n> From: Isoken June Ibizugbe <isokenjune@gmail.com>\n>\n> Signed-off-by: Isoken June Ibizugbe <isokenjune@gmail.com>\n> ---\n>  builtin/branch.c | 32 ++++++++++++++++----------------\n>  1 file changed, 16 insertions(+), 16 deletions(-)\n>\n> diff --git a/builtin/branch.c b/builtin/branch.c\n> index a756543d644..e7ee9bd0f15 100644\n> --- a/builtin/branch.c\n> +++ b/builtin/branch.c\n> @@ -173,11 +173,11 @@ static int branch_merged(int kind, const char *name,\n>             (head_rev ? repo_in_merge_bases(the_repository, rev, head_rev) : 0) != merged) {\n>                 if (merged)\n>                         warning(_(\"deleting branch '%s' that has been merged to\\n\"\n> -                               \"         '%s', but not yet merged to HEAD.\"),\n> +                               \"         '%s', but not yet merged to HEAD\"),\n>                                 name, reference_name);\n>                 else\n>                         warning(_(\"not deleting branch '%s' that is not yet merged to\\n\"\n> -                               \"         '%s', even though it is merged to HEAD.\"),\n> +                               \"         '%s', even though it is merged to HEAD\"),\n>                                 name, reference_name);\n>         }\n>         free(reference_name_to_free);\n> @@ -190,13 +190,13 @@ static int check_branch_commit(const char *branchname, const char *refname,\n>  {\n>         struct commit *rev = lookup_commit_reference(the_repository, oid);\n>         if (!force && !rev) {\n> -               error(_(\"Couldn't look up commit object for '%s'\"), refname);\n> +               error(_(\"couldn't look up commit object for '%s'\"), refname);\n>                 return -1;\n>         }\n>         if (!force && !branch_merged(kinds, branchname, rev, head_rev)) {\n> -               error(_(\"The branch '%s' is not fully merged.\\n\"\n> +               error(_(\"the branch '%s' is not fully merged.\\n\"\n>                       \"If you are sure you want to delete it, \"\n> -                     \"run 'git branch -D %s'.\"), branchname, branchname);\n> +                     \"run 'git branch -D %s'\"), branchname, branchname);\n>                 return -1;\n>         }\n>         return 0;\n> @@ -207,7 +207,7 @@ static void delete_branch_config(const char *branchname)\n>         struct strbuf buf = STRBUF_INIT;\n>         strbuf_addf(&buf, \"branch.%s\", branchname);\n>         if (git_config_rename_section(buf.buf, NULL) < 0)\n> -               warning(_(\"Update of config-file failed\"));\n> +               warning(_(\"update of config-file failed\"));\n>         strbuf_release(&buf);\n>  }\n>\n> @@ -260,7 +260,7 @@ static int delete_branches(int argc, const char **argv, int force, int kinds,\n>                 if (kinds == FILTER_REFS_BRANCHES) {\n>                         const char *path;\n>                         if ((path = branch_checked_out(name))) {\n> -                               error(_(\"Cannot delete branch '%s' \"\n> +                               error(_(\"cannot delete branch '%s' \"\n>                                         \"used by worktree at '%s'\"),\n>                                       bname.buf, path);\n>                                 ret = 1;\n> @@ -275,7 +275,7 @@ static int delete_branches(int argc, const char **argv, int force, int kinds,\n>                                         &oid, &flags);\n>                 if (!target) {\n>                         if (remote_branch) {\n> -                               error(_(\"remote-tracking branch '%s' not found.\"), bname.buf);\n> +                               error(_(\"remote-tracking branch '%s' not found\"), bname.buf);\n>                         } else {\n>                                 char *virtual_name = mkpathdup(fmt_remotes, bname.buf);\n>                                 char *virtual_target = resolve_refdup(virtual_name,\n> @@ -290,7 +290,7 @@ static int delete_branches(int argc, const char **argv, int force, int kinds,\n>                                                 \"Did you forget --remote?\"),\n>                                                 bname.buf);\n>                                 else\n> -                                       error(_(\"branch '%s' not found.\"), bname.buf);\n> +                                       error(_(\"branch '%s' not found\"), bname.buf);\n>                                 FREE_AND_NULL(virtual_target);\n>                         }\n>                         ret = 1;\n> @@ -630,17 +630,17 @@ static void copy_or_rename_branch(const char *oldname, const char *newname, int\n>\n>         if (recovery) {\n>                 if (copy)\n> -                       warning(_(\"Created a copy of a misnamed branch '%s'\"),\n> +                       warning(_(\"created a copy of a misnamed branch '%s'\"),\n>                                 interpreted_oldname);\n>                 else\n> -                       warning(_(\"Renamed a misnamed branch '%s' away\"),\n> +                       warning(_(\"renamed a misnamed branch '%s' away\"),\n>                                 interpreted_oldname);\n>         }\n>\n>         if (!copy && (oldref_usage & IS_HEAD) &&\n>             replace_each_worktree_head_symref(worktrees, oldref.buf, newref.buf,\n>                                               logmsg.buf))\n> -               die(_(\"branch renamed to %s, but HEAD is not updated!\"), newname);\n> +               die(_(\"branch renamed to %s, but HEAD is not updated\"), newname);\n>\n>         strbuf_release(&logmsg);\n>\n> @@ -878,8 +878,8 @@ int cmd_branch(int argc, const char **argv, const char *prefix)\n>                 strbuf_addf(&branch_ref, \"refs/heads/%s\", branch_name);\n>                 if (!ref_exists(branch_ref.buf))\n>                         error((!argc || branch_checked_out(branch_ref.buf))\n> -                             ? _(\"No commit on branch '%s' yet.\")\n> -                             : _(\"No branch named '%s'.\"),\n> +                             ? _(\"no commit on branch '%s' yet\")\n> +                             : _(\"no branch named '%s'\"),\n>                               branch_name);\n>                 else if (!edit_branch_description(branch_name))\n>                         ret = 0; /* happy */\n> @@ -893,7 +893,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)\n>                         die(_(\"branch name required\"));\n>                 else if ((argc == 1) && filter.detached)\n>                         die(copy? _(\"cannot copy the current branch while not on any\")\n> -                               : _(\"cannot rename the current branch while not on any.\"));\n> +                               : _(\"cannot rename the current branch while not on any\"));\n>                 else if (argc == 1)\n>                         copy_or_rename_branch(head, argv[0], copy, copy + rename > 1);\n>                 else if (argc == 2)\n> @@ -965,7 +965,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)\n>                 const char *start_name = argc == 2 ? argv[1] : head;\n>\n>                 if (filter.kind != FILTER_REFS_BRANCHES)\n> -                       die(_(\"the -a, and -r, options to 'git branch' do not take a branch name\\n\"\n> +                       die(_(\"the -a, and -r, options to 'git branch' do not take a branch name.\\n\"\n>                                   \"Did you mean to use: -a|-r --list <pattern>?\"));\n>\n>                 if (track == BRANCH_TRACK_OVERRIDE)\n> --\n> gitgitgadget\nI am sorry if I made any mistakes, It's my first time using\ngitgitgadget. This commit was already sent before through git-send\nemail. The patch was intended to submit the revisions.\n"},{"id":"483212","messageId":"329f635f-2050-421e-bd0d-943f8ad0de22@gmail.com","threadId":"60361","inReplyTo":"91e4ad3984147fcc277254a3f6836bf79f5c9550.1697211227.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 2/2] branch.c: adjust error messages to coding guidelines","fromName":"Rubén Justo","fromEmail":"rjusto@gmail.com","sentAt":"2023-10-13T18:25:08Z","receivedAt":"2023-10-13T18:25:14Z","isPatch":true,"sender":{"key":"rjusto@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5685487?v=4"},"body":"On 13-oct-2023 15:33:47, Isoken June Ibizugbe via GitGitGadget wrote:\n\n>  \t    replace_each_worktree_head_symref(worktrees, oldref.buf, newref.buf,\n>  \t\t\t\t\t      logmsg.buf))\n> -\t\tdie(_(\"branch renamed to %s, but HEAD is not updated!\"), newname);\n> +\t\tdie(_(\"branch renamed to %s, but HEAD is not updated\"), newname);\n\nThanks.  This change is not explicitly suggested in the guidelines, but I think\nit fits well in the spirit of this series.\n\n> @@ -965,7 +965,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)\n>  \t\tconst char *start_name = argc == 2 ? argv[1] : head;\n>  \n>  \t\tif (filter.kind != FILTER_REFS_BRANCHES)\n> -\t\t\tdie(_(\"the -a, and -r, options to 'git branch' do not take a branch name\\n\"\n> +\t\t\tdie(_(\"the -a, and -r, options to 'git branch' do not take a branch name.\\n\"\n\nYou have mistakenly deleted this full stop in the previous [1/2] patch.\nTherefore, if you stop doing so, you do not need to add it here.\n"},{"id":"483213","messageId":"xmqqr0lyz88v.fsf@gitster.g","threadId":"60361","inReplyTo":"CAJHH8bE15VotFy7QQ-Npmfk9ePvf=-h5SP+Q8phrDBRj8Ti=hQ@mail.gmail.com","subject":"Re: [PATCH 2/2] branch.c: adjust error messages to coding guidelines","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2023-10-13T18:29:20Z","receivedAt":"2023-10-13T18:29:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Isoken Ibizugbe <isokenjune@gmail.com> writes:\n\n> I am sorry if I made any mistakes, It's my first time using\n> gitgitgadget. This commit was already sent before through git-send\n> email. The patch was intended to submit the revisions.\n\nI cannot help with GGG, but it looked strange for this change to be\nin two patches, especially since what the rule of deciding which\nmessage is to be touched in which one of the two patches were not\nexplained anywhere in the series.\n\nI suspect what you want to do is to squash these two commits down\ninto a single commit, review the resulting code change and also the\ncommit log message to see if the latter still matches what the\ncombined patch does, update them as needed, run the test suite\nagain.\n\nAnd then format-patch without the cover letter to send the resulting\npatch out.  Or force push to tell GGG to resend a new iteration\nwithout any cover letter.\n\nThanks.\n"},{"id":"483214","messageId":"aed9523e-0ce9-49f6-bdda-90fd1e275691@gmail.com","threadId":"60361","inReplyTo":"pull.1590.git.git.1697211227.gitgitgadget@gmail.com","subject":"Re: [PATCH 0/2] [Outreachy][PATCH v2] branch.c: adjust error messages to coding guidelines","fromName":"Rubén Justo","fromEmail":"rjusto@gmail.com","sentAt":"2023-10-13T18:30:35Z","receivedAt":"2023-10-13T18:30:44Z","isPatch":true,"sender":{"key":"rjusto@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5685487?v=4"},"body":"On 13-oct-2023 15:33:45, Isoken June Ibizugbe via GitGitGadget wrote:\n\n> As per the CodingGuidelines document, it is recommended that a single-line\n> message provided to error messages such as die(), error() and warning(),\n> should start with a lowercase letter and should not end with a period.\n> \n> Signed-off-by: Isoken June Ibizugbe isokenjune@gmail.com\n> \n> Isoken June Ibizugbe (2):\n>   branch.c: ammend error messages for die()\n>   branch.c: adjust error messages to coding guidelines\n\nI don't understand why two commits.  Maybe it was unintentional and you\nwant to merge all changes into one commit, using git rebase.\n\n> \n>  builtin/branch.c | 66 ++++++++++++++++++++++++------------------------\n>  1 file changed, 33 insertions(+), 33 deletions(-)\n\nYou still need to adjust the tests.  Take a look at:\n\nhttps://github.com/git/git/actions/runs/6509642887/job/17681596358\n"}]}