Re: [RFC PATCH v2 5/5] builtin/branch: give more useful error messages when renaming
- From
Stefan Beller <sbeller@google.com>
- Date
- Oct 23, 2017, 19:44 UTC
- Message-ID
- <CAGZ79kZJAYabHArHkPPyqUy7LKQXyk7kqqmrqRcirGXZ4FYHJQ@mail.gmail.com>
- In-Reply-To
- <20170925082024.2691-6-kaarticsivaraam91196@gmail.com>
On Mon, Sep 25, 2017 at 1:20 AM, Kaartic Sivaraam <kaartic.sivaraam@gmail.com> wrote:
> builtin/branch.c | 41 +++++++++++++++++++++++++++++++++++------ > 1 file changed, 35 insertions(+), 6 deletions(-)
The code of 4 and 5 looks good to me, though a small nit below.
Thanks, Stefan
> +static void get_error_msg(struct strbuf* error_msg, const char* oldname, unsigned old_branch_exists, > + const char* newname, int new_branch_validation_result)
nit here and in the return of validate_branch_creation: It would be clearer if this is not just 'int', but actually spelling out that it is the enum.