summaryrefslogtreecommitdiff
path: root/builtin/update-index.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-05-25 16:23:26 -0700
committerJunio C Hamano <gitster@pobox.com>2011-05-25 16:23:26 -0700
commit5cfe4256d98af22a570c78c5e3048391a90f5f98 (patch)
tree2a168e5e4c4f52e0c58c6078304c9757f728c4e6 /builtin/update-index.c
parent84da3e21dc008fe7ba18811e8b7f7614ede33079 (diff)
parent4dd1fbc7b1df0030f813a05cee19cad2c7a9cbf9 (diff)
downloadgit-5cfe4256d98af22a570c78c5e3048391a90f5f98.tar.gz
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 'builtin/update-index.c')
-rw-r--r--builtin/update-index.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/update-index.c b/builtin/update-index.c
index d7850c6309..f14bc90830 100644
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@ -99,7 +99,8 @@ static int add_one_path(struct cache_entry *old, const char *path, int len, stru
fill_stat_cache_info(ce, st);
ce->ce_mode = ce_mode_from_stat(old, st->st_mode);
- if (index_path(ce->sha1, path, st, !info_only))
+ if (index_path(ce->sha1, path, st,
+ info_only ? 0 : HASH_WRITE_OBJECT))
return -1;
option = allow_add ? ADD_CACHE_OK_TO_ADD : 0;
option |= allow_replace ? ADD_CACHE_OK_TO_REPLACE : 0;