X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=read-cache.c;h=0a641034ce164fff91c9e8736b28cf98b6eba6bb;hb=139088b78b2b501d77a48d1d00b3b53ca16821e0;hp=f38471cac3ac57d8d52429cde2dcc4cf5b92557b;hpb=93446aa760041a5a6f55605d94cdfad7bcd5a2f1;p=git.git diff --git a/read-cache.c b/read-cache.c index f38471cac..0a641034c 100644 --- a/read-cache.c +++ b/read-cache.c @@ -92,7 +92,7 @@ static int ce_compare_data(struct cache_entry *ce, struct stat *st) if (fd >= 0) { unsigned char sha1[20]; - if (!index_fd(sha1, fd, st, 0, OBJ_BLOB, ce->name, 0)) + if (!index_fd(sha1, fd, st, OBJ_BLOB, ce->name, 0)) match = hashcmp(sha1, ce->sha1); /* index_fd() closed the file descriptor already */ } @@ -641,7 +641,7 @@ int add_to_index(struct index_state *istate, const char *path, struct stat *st, return 0; } if (!intent_only) { - if (index_path(ce->sha1, path, st, 1)) + if (index_path(ce->sha1, path, st, HASH_WRITE_OBJECT)) return error("unable to index file %s", path); } else record_intent_to_add(ce); @@ -1087,7 +1087,7 @@ static void show_file(const char * fmt, const char * name, int in_porcelain, { if (in_porcelain && *first && header_msg) { printf("%s\n", header_msg); - *first=0; + *first = 0; } printf(fmt, name); }