Re: [PATCH v14 05/16] Refactor write_name_quoted_relative, remove unused params
- From
Jiang Xin <worldhello.net@gmail.com>
- Date
- Jun 25, 2013, 11:51 UTC
- Message-ID
- <CANYiYbHTT=M7B3MWz4BvWf-8KGxJsfqhQfLbObgE2=v+stMx+A@mail.gmail.com>
- In-Reply-To
- <7v8v1z8gfu.fsf@alter.siamese.dyndns.org>
2013/6/25 Junio C Hamano <gitster@pobox.com>:
Show 18 quoted lines
> Jiang Xin <worldhello.net@gmail.com> writes:
>
>> -static void write_name(const char* name, size_t len)
>> +static void write_name(const char *name)
>> {
>> - write_name_quoted_relative(name, len, prefix, prefix_len, stdout,
>> - line_terminator);
>> +
>> + /* turn off prefix, if run with "--full-name" */
>> + write_name_quoted_relative(name, prefix_len ? prefix : NULL,
>> + stdout, line_terminator);
>
> Hmmm....
>
> Does this mean that ls-files has been broken in 03/16, because
> write_name_quoted_relative() was made to ignore prefix_len and
> measure the length of prefix with strlen(prefix), and this change
> fixes it?I will rewrite and move this chunk to patch 03/16, but leave others in this patch for clearity.
-- 蒋鑫 北京群英汇信息技术有限公司 邮件: worldhello.net@gmail.com 网址: http://www.ossxp.com/ 博客: http://www.worldhello.net/ 微博: http://weibo.com/gotgit/ 电话: 18601196889