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 wrote: > On Fri, Oct 4, 2013 at 9:20 PM, Stefan Beller > wrote: >> I think we should emit a warning additionally? >> >> Signed-off-by: Stefan Beller > > I think it's nice to credit Robert for reporting the fault in the > commit message (something like "

[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 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) { >>> - if (opti

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 > wrote: >> I think we should emit a warning additionally? >> >> Signed-off-by: Stefan Beller > > I think it's nice to credit Robert for reporting the fault in the > commit message (something like "reported

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 wrote: > I think we should emit a warning additionally? > > Signed-off-by: Stefan Beller I think it's nice to credit Robert for reporting the fault in the commit message (something like "reported-by:" or "noticed-by:"...) > --- > builtin/clone.c |

[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 --- 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 +++ b/builtin/clone.c @@ -688,7 +688,7 @@ stat