1 #define USE_THE_INDEX_VARIABLE
7 int cmd__write_cache(int argc
, const char **argv
)
9 struct lock_file index_lock
= LOCK_INIT
;
12 cnt
= strtol(argv
[1], NULL
, 0);
13 setup_git_directory();
14 repo_read_index(the_repository
);
15 for (i
= 0; i
< cnt
; i
++) {
16 repo_hold_locked_index(the_repository
, &index_lock
,
18 if (write_locked_index(&the_index
, &index_lock
, COMMIT_LOCK
))
19 die("unable to write index file");