Re: [PATCH v2 3/4] add--helper: implement interactive status command

2017-05-15 Thread Junio C Hamano
Daniel Ferreira writes: > + if (!q->nr) > + return; > + > + for (i = 0; i < q->nr; i++) { > + struct diff_filepair *p; > + p = q->queue[i]; > + diff_flush_stat(p, options, &stat); > + } Commenting just on the part that interacts with th

[PATCH v2 3/4] add--helper: implement interactive status command

2017-05-15 Thread Daniel Ferreira
Implement add--interactive's status command in the add--helper builtin. It prints a numstat comparing changed files between a) the worktree and the index; b) the index and the HEAD. To do so, we use run_diff_index() and run_diff_files() to get changed files, use the diffstat API on them to get the