[sheepdog] [PATCH v3 06/12] collie/farm: implement sha1_file
MORITA Kazutaka
morita.kazutaka at gmail.com
Tue May 14 17:57:26 CEST 2013
At Tue, 14 May 2013 15:51:51 +0800,
Kai Zhang wrote:
>
> moved sha1_file from sheep/farm to collie/farm and made minor modification.
>
> Signed-off-by: Kai Zhang <kyle at zelin.io>
> ---
> collie/Makefile.am | 2 +-
> collie/farm/farm.c | 24 ++++
> collie/farm/farm.h | 23 ++++
> collie/farm/sha1_file.c | 273 +++++++++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 321 insertions(+), 1 deletions(-)
> create mode 100644 collie/farm/farm.c
> create mode 100644 collie/farm/sha1_file.c
Can you delete sheep/farm/*.c and create collie/farm/*.c in the same commit, and
use 'git format-patch -M' to generate a patch? Then, git detects renames and
your 'minor modification' will be clearer.
> +
> +char *sha1_to_hex(const unsigned char *sha1)
> +{
> + static char buffer[50];
> + static const char hex[] = "0123456789abcdef";
> + char *buf = buffer;
> + int i;
> +
> + for (i = 0; i < SHA1_LEN; i++) {
> + unsigned int val = *sha1++;
> + *buf++ = hex[val >> 4];
> + *buf++ = hex[val & 0xf];
> + }
> + return buffer;
> +}
sha1_to_hex() is now defined in lib/sha1.c. Maybe, you need to rebase your
series onto the current master?
Thanks,
Kazutaka
More information about the sheepdog
mailing list