{"thread":{"id":"60398","subject":"[Outreachy][PATCH v2] builtin/branch.c: adjust error messages to coding guidelines","startedAt":"2023-10-19T07:42:00Z","lastAt":"2023-10-19T07:50:09Z","messageCount":2,"participants":["Isoken June Ibizugbe","Isoken Ibizugbe"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"483471","messageId":"20231019074126.567638-1-isokenjune@gmail.com","threadId":"60398","inReplyTo":null,"subject":"[Outreachy][PATCH v2] builtin/branch.c: adjust error messages to coding guidelines","fromName":"Isoken June Ibizugbe","fromEmail":"isokenjune@gmail.com","sentAt":"2023-10-19T07:41:26Z","receivedAt":"2023-10-19T07:42:00Z","isPatch":true,"sender":{"key":"isokenjune@gmail.com","avatar":"https://avatars.githubusercontent.com/u/127752393?v=4"},"body":"Signed-off-by: Isoken June Ibizugbe <isokenjune@gmail.com>\n---\n builtin/branch.c | 66 ++++++++++++++++++++++++------------------------\n 1 file changed, 33 insertions(+), 33 deletions(-)\n\ndiff --git a/builtin/branch.c b/builtin/branch.c\nindex 2ec190b14a..938c40bfaa 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@@ -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,32 +624,32 @@ 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-\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 \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@@ -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@@ -892,8 +892,8 @@ 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\t\t: _(\"cannot rename 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 \t\telse if (argc == 2)\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-- \n2.42.0.346.g24618a8a3e.dirty\n\n"},{"id":"483472","messageId":"CAJHH8bEyHQ0esWDwmGowAeM75V7ZrgLBtgHAq8zcgM_UYAKt=w@mail.gmail.com","threadId":"60398","inReplyTo":"20231019074126.567638-1-isokenjune@gmail.com","subject":"Re: [Outreachy][PATCH v2] builtin/branch.c: adjust error messages to coding guidelines","fromName":"Isoken Ibizugbe","fromEmail":"isokenjune@gmail.com","sentAt":"2023-10-19T07:48:37Z","receivedAt":"2023-10-19T07:50:09Z","isPatch":true,"sender":{"key":"isokenjune@gmail.com","avatar":"https://avatars.githubusercontent.com/u/127752393?v=4"},"body":"On Thu, Oct 19, 2023 at 8:41 AM Isoken June Ibizugbe\n<isokenjune@gmail.com> wrote:\n>\n> Signed-off-by: Isoken June Ibizugbe <isokenjune@gmail.com>\n> ---\n>  builtin/branch.c | 66 ++++++++++++++++++++++++------------------------\n>  1 file changed, 33 insertions(+), 33 deletions(-)\nplease ignore this patch. It didn't include the changes for the test files.\nthanks\n>\n> diff --git a/builtin/branch.c b/builtin/branch.c\n> index 2ec190b14a..938c40bfaa 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> @@ -518,11 +518,11 @@ static void reject_rebase_or_bisect_branch(struct worktree **worktrees,\n>                         continue;\n>\n>                 if (is_worktree_being_rebased(wt, target))\n> -                       die(_(\"Branch %s is being rebased at %s\"),\n> +                       die(_(\"branch %s is being rebased at %s\"),\n>                             target, wt->path);\n>\n>                 if (is_worktree_being_bisected(wt, target))\n> -                       die(_(\"Branch %s is being bisected at %s\"),\n> +                       die(_(\"branch %s is being bisected at %s\"),\n>                             target, wt->path);\n>         }\n>  }\n> @@ -578,7 +578,7 @@ static void copy_or_rename_branch(const char *oldname, const char *newname, int\n>                 if (ref_exists(oldref.buf))\n>                         recovery = 1;\n>                 else\n> -                       die(_(\"Invalid branch name: '%s'\"), oldname);\n> +                       die(_(\"invalid branch name: '%s'\"), oldname);\n>         }\n>\n>         for (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>         if ((copy || !(oldref_usage & IS_HEAD)) && !ref_exists(oldref.buf)) {\n>                 if (oldref_usage & IS_HEAD)\n> -                       die(_(\"No commit on branch '%s' yet.\"), oldname);\n> +                       die(_(\"no commit on branch '%s' yet\"), oldname);\n>                 else\n> -                       die(_(\"No branch named '%s'.\"), oldname);\n> +                       die(_(\"no branch named '%s'\"), oldname);\n>         }\n>\n>         /*\n> @@ -624,32 +624,32 @@ static void copy_or_rename_branch(const char *oldname, const char *newname, int\n>\n>         if (!copy && !(oldref_usage & IS_ORPHAN) &&\n>             rename_ref(oldref.buf, newref.buf, logmsg.buf))\n> -               die(_(\"Branch rename failed\"));\n> +               die(_(\"branch rename failed\"));\n>         if (copy && copy_existing_ref(oldref.buf, newref.buf, logmsg.buf))\n> -               die(_(\"Branch copy failed\"));\n> +               die(_(\"branch copy failed\"));\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>         strbuf_addf(&oldsection, \"branch.%s\", interpreted_oldname);\n>         strbuf_addf(&newsection, \"branch.%s\", interpreted_newname);\n>         if (!copy && git_config_rename_section(oldsection.buf, newsection.buf) < 0)\n> -               die(_(\"Branch is renamed, but update of config-file failed\"));\n> +               die(_(\"branch is renamed, but update of config-file failed\"));\n>         if (copy && strcmp(interpreted_oldname, interpreted_newname) && git_config_copy_section(oldsection.buf, newsection.buf) < 0)\n> -               die(_(\"Branch is copied, but update of config-file failed\"));\n> +               die(_(\"branch is copied, but update of config-file failed\"));\n>         strbuf_release(&oldref);\n>         strbuf_release(&newref);\n>         strbuf_release(&oldsection);\n> @@ -773,7 +773,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)\n>\n>         head = resolve_refdup(\"HEAD\", 0, &head_oid, NULL);\n>         if (!head)\n> -               die(_(\"Failed to resolve HEAD as a valid ref.\"));\n> +               die(_(\"failed to resolve HEAD as a valid ref\"));\n>         if (!strcmp(head, \"HEAD\"))\n>                 filter.detached = 1;\n>         else 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>                 if (!argc) {\n>                         if (filter.detached)\n> -                               die(_(\"Cannot give description to detached HEAD\"));\n> +                               die(_(\"cannot give description to detached HEAD\"));\n>                         branch_name = head;\n>                 } else if (argc == 1) {\n>                         strbuf_branchname(&buf, argv[0], INTERPRET_BRANCH_LOCAL);\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> @@ -892,8 +892,8 @@ int cmd_branch(int argc, const char **argv, const char *prefix)\n>                 if (!argc)\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> +                       die(copy? _(\"cannot copy 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> @@ -916,14 +916,14 @@ int cmd_branch(int argc, const char **argv, const char *prefix)\n>                 if (!branch) {\n>                         if (!argc || !strcmp(argv[0], \"HEAD\"))\n>                                 die(_(\"could not set upstream of HEAD to %s when \"\n> -                                     \"it does not point to any branch.\"),\n> +                                     \"it does not point to any branch\"),\n>                                     new_upstream);\n>                         die(_(\"no such branch '%s'\"), argv[0]);\n>                 }\n>\n>                 if (!ref_exists(branch->refname)) {\n>                         if (!argc || branch_checked_out(branch->refname))\n> -                               die(_(\"No commit on branch '%s' yet.\"), branch->name);\n> +                               die(_(\"no commit on branch '%s' yet\"), branch->name);\n>                         die(_(\"branch '%s' does not exist\"), branch->name);\n>                 }\n>\n> @@ -946,12 +946,12 @@ int cmd_branch(int argc, const char **argv, const char *prefix)\n>                 if (!branch) {\n>                         if (!argc || !strcmp(argv[0], \"HEAD\"))\n>                                 die(_(\"could not unset upstream of HEAD when \"\n> -                                     \"it does not point to any branch.\"));\n> +                                     \"it does not point to any branch\"));\n>                         die(_(\"no such branch '%s'\"), argv[0]);\n>                 }\n>\n>                 if (!branch_has_merge_config(branch))\n> -                       die(_(\"Branch '%s' has no upstream information\"), branch->name);\n> +                       die(_(\"branch '%s' has no upstream information\"), branch->name);\n>\n>                 strbuf_reset(&buf);\n>                 strbuf_addf(&buf, \"branch.%s.remote\", branch->name);\n> @@ -965,11 +965,11 @@ 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> -                       die(_(\"the '--set-upstream' option is no longer supported. Please use '--track' or '--set-upstream-to' instead.\"));\n> +                       die(_(\"the '--set-upstream' option is no longer supported. Please use '--track' or '--set-upstream-to' instead\"));\n>\n>                 if (recurse_submodules) {\n>                         create_branches_recursively(the_repository, branch_name,\n> --\n> 2.42.0.346.g24618a8a3e.dirty\n>\n"}]}