From: Junio C Hamano Date: Sun, 01 Feb 2009 00:55:49 GMT Subject: Re: [PATCH] http-push: refactor request url creation Message-ID: <7vmyd72cx6.fsf@gitster.siamese.dyndns.org> In-Reply-To: <4983929B.2010901@gmail.com> Tay Ray Chuan writes: > Currently, functions that deal with objects on the remote repository > have to allocate and do strcpys to generate the URL. > > This patch saves them this trouble, by providing two functions, > "append_remote_object_url" and "get_remote_object_url". > > Both generate a URL, with either the object's 2-digit hex directory > (eg. /objects/a1/), or the complete object location (eg. > /objects/a1/b2). > > However, they differ in that "append_remote_object_url" appends this > URL to a strbuf, while "get_remote_object_url" wraps around the former > and returns the URL directly in char*. Users usually would use > "get_remote_object_url", but may find "append_remote_object_url" > useful if they require further string operations on the URL. > > Signed-off-by: Tay Ray Chuan > Acked-by: Junio C Hamano Thanks, I'll queue this to 'pu' for now, but please stop randomly adding "Acked-by" from other people, unless you conferred with them on the exact version of your patch you are submitting. If somebody said "The version that I reviewed looked sensible", it becomes irrelevant after you changed your patch in response to people's comments, exactly because what you are sending is different from what they reviewed. It is up to them, not you, to see if the issues raised in their comments are addressed in the new patch to their satisfaction.