Re: [PATCH] defaults for where to merge from (take 3, inline)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> please don't take my comments as insults or even strict rules. It is 
> purely for your consideration. (I say this because I haven't seen you so 
> often on this list, so you might not know that discussions about patches 
> are sometimes, erm, lively...)

I absolutely haven't taken any of these comments in the thread as insults (the only thing I found a little dubious, was some usage of uppercase), and I got a lot of constructive criticism that outweighed the "lively" tone.  And as a mistake on my part, I probably should have lurked a bit longer than I did.

>> +static void register_branch_pull (const char *name, const char *remote_name)
> 
> It is not yet remote_name, right? it is branch_name. You extract the 
> remote_name by finding the first slash.

Yeah, it's a remote_branch_name in fact.

> I'd use "char key[1024], value[1024]" instead, erroring out if one of the 
> buffers are too small. It's not like you have to be memory efficient, and 
> it is easier to read.

Ok.

>> +	remote_value[slash - remote_name] = 0;
> 
> You should check if slash == NULL and error out before using it.

remote_name is of the form "REMOTE/BRANCH", because it comes from dwim_ref's output after stripping "refs/remotes/" from the beginning.

> Yes, that is how I imagined it. The rest of your patch looks perfect to 
> me.

I will submit again with the requested changes.  I guess the body of this message is too long to become a "cover letter".

Paolo
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]