summaryrefslogtreecommitdiff
path: root/read-cache.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2011-05-25 16:23:26 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-05-25 16:23:26 -0700
commit5cfe4256d98af22a570c78c5e3048391a90f5f98 (patch)
tree2a168e5e4c4f52e0c58c6078304c9757f728c4e6 /read-cache.c
parentMerge branch 'js/log-abbrev-commit-config' (diff)
parentBigfile: teach "git add" to send a large file straight to a pack (diff)
downloadtgif-5cfe4256d98af22a570c78c5e3048391a90f5f98.tar.xz
Merge branch 'jc/bigfile'
* jc/bigfile: Bigfile: teach "git add" to send a large file straight to a pack index_fd(): split into two helper functions index_fd(): turn write_object and format_check arguments into one flag
Diffstat (limited to 'read-cache.c')
-rw-r--r--read-cache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/read-cache.c b/read-cache.c
index f38471cac3..4ac9a037f4 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);