Re: [PATCH v4 2/3] builtin/branch: give more useful error messages when renaming

2018-03-24 Thread Kaartic Sivaraam
On Friday 16 March 2018 02:03 AM, Junio C Hamano wrote: > Quite honestly, I am not sure if this amount of new code that > results in sentence lego is really worth it. Speaking specifically about the new code for the sentence lego: I currently lack knowledge of a better way to achieve the same

Re: [PATCH v4 2/3] builtin/branch: give more useful error messages when renaming

2018-03-15 Thread Junio C Hamano
Kaartic Sivaraam writes: > +static void get_error_msg(struct strbuf* error_msg, > + const char* oldname, enum > old_branch_validation_result old_branch_name_res, > + const char* newname, enum branch_validation_result >

[PATCH v4 2/3] builtin/branch: give more useful error messages when renaming

2018-03-10 Thread Kaartic Sivaraam
When trying to rename an "inexistent" branch name to a branch name that "already exists" the rename failed stating that the new branch name exists rather than stating that the branch trying to be renamed doesn't exist. $ git branch -m tset master fatal: A branch named 'master' already