On Wed, Apr 13, 2016 at 8:54 AM, Nguyễn Thái Ngọc Duy <[email protected]> wrote:
> upload-pack: use skip_prefix() instead of starts_with()
>
> Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]>
> ---
> diff --git a/upload-pack.c b/upload-pack.c
> @@ -403,8 +405,8 @@ static int get_common_commits(void)
> -               if (starts_with(line, "have ")) {
> -                       switch (got_sha1(line+5, sha1)) {
> +               if (skip_prefix(line, "have ", &arg)) {
> +                       switch (got_sha1(arg, sha1)) {

There's one more instance of starts_with() in upload-pack.c:main()
which could be given the same treatment:

    if (starts_with(arg, "--timeout=")) {
        timeout = atoi(arg+10);
        daemon_mode = 1;
        continue;
    }

Was its omission an oversight or intentional since it's not related to
the others?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to