Re: [PATCH] clone: do not segfault when specifying a nonexistent branch

2013-10-09 Thread Ralf Thielow
On Sat, Oct 5, 2013 at 1:55 AM, Duy Nguyen pclo...@gmail.com wrote: On Fri, Oct 4, 2013 at 9:20 PM, Stefan Beller stefanbel...@googlemail.com wrote: I think we should emit a warning additionally? Signed-off-by: Stefan Beller stefanbel...@googlemail.com I think it's nice to credit Robert for

[PATCH] clone: do not segfault when specifying a nonexistent branch

2013-10-08 Thread Stefan Beller
Actually I only wanted to change one line to prevent a crash, when you specify a non existing branch when cloning: - if (option_branch) { + if (option_branch our_head_points_at) { However it turns out this is not a good idea as we still want to setup

Re: [PATCH] clone: do not segfault when specifying a nonexistent branch

2013-10-07 Thread Duy Nguyen
On Sun, Oct 6, 2013 at 4:27 PM, Stefan Beller stefanbel...@googlemail.com wrote: @@ -688,7 +688,7 @@ static void write_refspec_config(const char* src_ref_prefix, if (option_mirror || !option_bare) { if (option_single_branch !option_mirror) { -

Re: [PATCH] clone: do not segfault when specifying a nonexistent branch

2013-10-06 Thread Stefan Beller
On 10/05/2013 01:55 AM, Duy Nguyen wrote: On Fri, Oct 4, 2013 at 9:20 PM, Stefan Beller stefanbel...@googlemail.com wrote: I think we should emit a warning additionally? Signed-off-by: Stefan Beller stefanbel...@googlemail.com I think it's nice to credit Robert for reporting the fault in

[PATCH] clone: do not segfault when specifying a nonexistent branch

2013-10-04 Thread Stefan Beller
I think we should emit a warning additionally? Signed-off-by: Stefan Beller stefanbel...@googlemail.com --- builtin/clone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/clone.c b/builtin/clone.c index 0aff974..b764ad0 100644 --- a/builtin/clone.c +++

Re: [PATCH] clone: do not segfault when specifying a nonexistent branch

2013-10-04 Thread Duy Nguyen
On Fri, Oct 4, 2013 at 9:20 PM, Stefan Beller stefanbel...@googlemail.com wrote: I think we should emit a warning additionally? Signed-off-by: Stefan Beller stefanbel...@googlemail.com I think it's nice to credit Robert for reporting the fault in the commit message (something like reported-by: