Re: [PATCH 2/5] safe_create_leading_directories(): reduce scope of local variable

2014-01-01 Thread Michael Haggerty
On 12/26/2013 10:55 PM, Jonathan Nieder wrote: Michael Haggerty wrote: Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- sha1_file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sha1_file.c b/sha1_file.c index c9245a6..cc9957e 100644 --- a/sha1_file.c

Re: [PATCH 3/5] safe_create_leading_directories(): add slash pointer

2014-01-01 Thread Michael Haggerty
On 12/26/2013 11:34 PM, Jonathan Nieder wrote: Michael Haggerty wrote: [Subject: safe_create_leading_directories(): add slash pointer] Is this a cleanup or improving the (internal) functionality of the function somehow? The above one-liner doesn't sum up for me in an obvious way why this

Re: [PATCH 4/5] safe_create_leading_directories(): fix a mkdir/rmdir race

2014-01-01 Thread Michael Haggerty
On 12/27/2013 12:02 AM, Jonathan Nieder wrote: Michael Haggerty wrote: It could be that some other process is trying to clean up empty directories at the same time that safe_create_leading_directories() is attempting to create them. In this case, it could happen that directory a/b was

[PATCH] drop unnecessary copying in credential_ask_one

2014-01-01 Thread Tay Ray Chuan
We were leaking memory in there, as after obtaining a string from git_getpass, we returned a copy of it, yet no one else held the original string, apart from credential_ask_one. Signed-off-by: Tay Ray Chuan rcta...@gmail.com --- credential.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH] drop unnecessary copying in credential_ask_one

2014-01-01 Thread Jeff King
On Thu, Jan 02, 2014 at 09:06:33AM +0800, Tay Ray Chuan wrote: We were leaking memory in there, as after obtaining a string from git_getpass, we returned a copy of it, yet no one else held the original string, apart from credential_ask_one. I don't think this change is correct by itself.

Re: [PATCH] drop unnecessary copying in credential_ask_one

2014-01-01 Thread Jeff King
On Wed, Jan 01, 2014 at 10:03:30PM -0500, Jeff King wrote: On Thu, Jan 02, 2014 at 09:06:33AM +0800, Tay Ray Chuan wrote: We were leaking memory in there, as after obtaining a string from git_getpass, we returned a copy of it, yet no one else held the original string, apart from