Re: [PATCH 2/4] Implement a new patch identification scheme and id command

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

 



On 2008-07-13 12:40:35 +0100, Catalin Marinas wrote:

> The new scheme allows '[<branch>:]<patch>' and '[<branch>:]{base}'
> (the latter showing the base of a stack). The former format allows
> symbols like ^ and ^{...}.

You changed it, so s/The former format allows/You may append/ or
something.

> +    # The stack base
> +    if patch.startswith('{base}'):
> +        base_id = repository.get_stack(branch).base.sha1
> +        return repository.rev_parse(base_id + patch[6:])

We have a strip_prefix() function precisely so that we can avoid
error-prone and not-so-easy-to-read constants like that "6" ...

Hmm. I see that I feel strongly enough about this that I've defined no
less than two identical functions in utils.py to do this job:
strip_prefix() and strip_leading(). :-)

-- 
Karl Hasselström, kha@xxxxxxxxxxx
      www.treskal.com/kalle
--
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]

  Powered by Linux