Thread (14 messages) flat view 14 messages, 3 authors, 2016-06-15

Re: [PATCH 2/3] builtin/checkout: change -b from an OPTION_STRING to a OPTION_SET_INT

From: Tay Ray Chuan <hidden>
Date: 2016-06-15 22:48:59

Hi,

On Tue, Jun 22, 2010 at 7:04 AM, Erick Mattos [off-list ref] wrote:
Hi,

2010/6/21 Tay Ray Chuan [off-list ref]:
quoted
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 1994be9..e794e1e 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -32,7 +32,8 @@ struct checkout_opts {
       int writeout_stage;
       int writeout_error;

-       const char *new_branch;
+       int new_branch;
+       const char *new_branch_name;
The change of name of the existent variable creates more hassle than
helps.

As you are adding a new option I suggest you to create a new
variable named new_branch_forced or whatever.  This way you avoid
making a lot of changes as you did and minimize the possibility of
adding new bugs by not catching all the problems affected by the
name change.
Erick, thanks for the suggestion - I've a new iteration that takes
some of your points.

-- 
Cheers,
Ray Chuan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help