Re: [PATCH v2 3/9] unpack-trees: refuse to remove startup_info->original_cwd
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Nov 25, 2021, 10:56 UTC
- Message-ID
- <211125.867dcwjyeu.gmgdl@evledraar.gmail.com>
- In-Reply-To
- <e74975e83cc7a11b8f0378d59a8c2c4a97d3aa50.1637829556.git.gitgitgadget@gmail.com>
On Thu, Nov 25 2021, Elijah Newren via GitGitGadget wrote:
Show 13 quoted lines
> + /* 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?