4 static struct lock_file index_lock
;
6 int cmd_main(int argc
, const char **argv
)
8 int i
, cnt
= 1, lockfd
;
10 cnt
= strtol(argv
[1], NULL
, 0);
11 setup_git_directory();
13 for (i
= 0; i
< cnt
; i
++) {
14 lockfd
= hold_locked_index(&index_lock
, LOCK_DIE_ON_ERROR
);
16 write_locked_index(&the_index
, &index_lock
, COMMIT_LOCK
);
18 rollback_lock_file(&index_lock
);