Re: [PATCH 14/16] fetch-pack: refactor parsing in get_ack

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 18, 2014 at 3:56 PM, Jeff King <peff@xxxxxxxx> wrote:
> There are several uses of the magic number "line+45" when
> parsing ACK lines from the server, and it's rather unclear
> why 45 is the correct number. We can make this more clear by
> keeping a running pointer as we parse, using skip_prefix to
> jump past the first "ACK ", then adding 40 to jump past
> get_sha1_hex (which is still magical, but hopefully 40 is
> less magical to readers of git code).
>
> Note that this actually puts us at line+44. The original
> required some character between the sha1 and further ACK
> flags (it is supposed to be a space, but we never enforced
> that). We start our search for flags at line+44, which
> meanas we are slightly more liberal than the old code.

s/meanas/means/

> Signed-off-by: Jeff King <peff@xxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]