diff-lib: accept option flags in run_diff_index()
In a future commit, we will teach run_diff_index() to accept more options via flag bits. For now, change `cached` into a flag in the `option` bitfield. The behaviour should remain exactly the same. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
308d7a7dc9
commit
4c3fe82ef1
@ -512,9 +512,10 @@ static int diff_cache(struct rev_info *revs,
|
||||
return unpack_trees(1, &t, &opts);
|
||||
}
|
||||
|
||||
int run_diff_index(struct rev_info *revs, int cached)
|
||||
int run_diff_index(struct rev_info *revs, unsigned int option)
|
||||
{
|
||||
struct object_array_entry *ent;
|
||||
int cached = !!(option & DIFF_INDEX_CACHED);
|
||||
|
||||
if (revs->pending.nr != 1)
|
||||
BUG("run_diff_index must be passed exactly one tree");
|
||||
|
Reference in New Issue
Block a user