From: Elijah Newren Date: Fri, 26 Nov 2021 18:06:55 GMT Subject: Re: [PATCH v2 3/9] unpack-trees: refuse to remove startup_info->original_cwd Message-ID: In-Reply-To: <211125.867dcwjyeu.gmgdl@evledraar.gmail.com> On Thu, Nov 25, 2021 at 2:57 AM Ævar Arnfjörð Bjarmason wrote: > > On Thu, Nov 25 2021, Elijah Newren via GitGitGadget wrote: > > > + /* ERROR_CWD_IN_THE_WAY */ > > + "Refusing to remove '%s' since it is the current working directory.", > > + > > /* ERROR_WOULD_LOSE_UNTRACKED_OVERWRITTEN */ > > "Untracked working tree file '%s' would be overwritten by merge.", > > > > @@ -131,6 +134,9 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts, > > msgs[ERROR_NOT_UPTODATE_DIR] = > > _("Updating the following directories would lose untracked files in them:\n%s"); > > > > + msgs[ERROR_CWD_IN_THE_WAY] = > > + _("Refusing to remove the current working directory:\n%s"); > > + > > We end up capitalizing the first letter here, which isn't our usual > style, but I see we do it for all of unpack_plumbing_errors already, and > some related things like the error setup.c would emit. > > Still, perhaps it's better to not follow that convention for new > messages? If someone else wants to submit a patch afterwards to clean up all these error messages, that'd be fine, but I think being internally inconsistent is more jarring than not following the global rule. I'll leave it as is, and let someone else do the wider cleanup.