Nguyễn Thái Ngọc Duy writes:
> @@ -2717,17 +2729,19 @@ static int copy_msg(char *buf, const char *msg)
> return cp - buf;
> }
>
> -int log_ref_setup(const char *refname, char *logfile, int bufsize)
> +int log_ref_setup(const char *refname, struct strbuf *sb_logfile)
> {
> int log
Duy Nguyen writes:
> OK so your question was if there was a git_path() or mkpath() call
> earlier in update_refs_for_switch() and the result was expected to
> remain stable till the end of update_refs_for_switch(), then this
> conversion could ruin it, correct? I didn't think about that,...
Yeah
On Thu, Feb 20, 2014 at 10:41 AM, Junio C Hamano wrote:
> Duy Nguyen writes:
>
- }
+ if (old->path && old->name &&
+ !file_exists(git_path("%s", old->path)) &&
+ file_exists(git_path("logs/%s", old->path)))
+
Duy Nguyen writes:
>>> - }
>>> + if (old->path && old->name &&
>>> + !file_exists(git_path("%s", old->path)) &&
>>> + file_exists(git_path("logs/%s", old->path)))
>>> + remove_path(git_path("logs/%s", old->path));
>>
>>
On Thu, Feb 20, 2014 at 6:48 AM, Junio C Hamano wrote:
> Nguyễn Thái Ngọc Duy writes:
>
>> @@ -651,14 +653,10 @@ static void update_refs_for_switch(const struct
>> checkout_opts *opts,
>> new->name);
>> }
>> }
>> -
Nguyễn Thái Ngọc Duy writes:
> @@ -651,14 +653,10 @@ static void update_refs_for_switch(const struct
> checkout_opts *opts,
> new->name);
> }
> }
> - if (old->path && old->name) {
> - char
In the previous patch, git_snpath() is modified to take a strbuf
buffer from get_pathname() because vsnpath() needs that. But that
makes it awkward because git_snpath() receives a pre-allocated buffer
from outside and has to copy data back.
Rename it to strbuf_git_path() and make it receive strbuf
7 matches
Mail list logo