Re: [PATCH v2 03/21] Export parse_pathspec() and convert some get_pathspec() calls

2013-01-11 Thread Duy Nguyen
On Sat, Jan 12, 2013 at 12:56 AM, Matt Kraai  wrote:
> On Fri, Jan 11, 2013 at 06:20:57PM +0700, Nguyễn Thái Ngọc Duy wrote:
>> +#define PATHSPEC_FROMTOP(1<<0)
>
> The previous commit introduces a use of this macro in get_pathspec.
> Should this be defined by that commit instead?

This macro is already defined in setup.c when parse_pathspec is
introduced. I wanted to move it from setup.c to cache.h but forgot to
remove the original definition. Will fix.


>> @@ -266,9 +266,9 @@ static int pathspec_item_cmp(const void *a_, const void 
>> *b_)
>>   * Given command line arguments and a prefix, convert the input to
>>   * pathspec. die() if any magic other than ones in magic_mask.
>>   */
>> -static void parse_pathspec(struct pathspec *pathspec,
>> -unsigned magic_mask, unsigned flags,
>> -const char *prefix, const char **argv)
>> +void parse_pathspec(struct pathspec *pathspec,
>> + unsigned magic_mask, unsigned flags,
>
> The prototype for this function uses just "magic" instead of
> "magic_mask".  Should they be consistent?

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


Re: [PATCH v2 03/21] Export parse_pathspec() and convert some get_pathspec() calls

2013-01-11 Thread Matt Kraai
On Fri, Jan 11, 2013 at 06:20:57PM +0700, Nguyễn Thái Ngọc Duy wrote:
> +#define PATHSPEC_FROMTOP(1<<0)

The previous commit introduces a use of this macro in get_pathspec.
Should this be defined by that commit instead?

> @@ -266,9 +266,9 @@ static int pathspec_item_cmp(const void *a_, const void 
> *b_)
>   * Given command line arguments and a prefix, convert the input to
>   * pathspec. die() if any magic other than ones in magic_mask.
>   */
> -static void parse_pathspec(struct pathspec *pathspec,
> -unsigned magic_mask, unsigned flags,
> -const char *prefix, const char **argv)
> +void parse_pathspec(struct pathspec *pathspec,
> + unsigned magic_mask, unsigned flags,

The prototype for this function uses just "magic" instead of
"magic_mask".  Should they be consistent?

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