struct rev_info: convert prune_data to struct pathspec
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
61cf282045
commit
afe069d166
@ -371,14 +371,10 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
|
||||
}
|
||||
die("unhandled object '%s' given.", name);
|
||||
}
|
||||
if (rev.prune_data) {
|
||||
const char **pathspec = rev.prune_data;
|
||||
while (*pathspec) {
|
||||
if (!path)
|
||||
path = *pathspec;
|
||||
paths++;
|
||||
pathspec++;
|
||||
}
|
||||
if (rev.prune_data.nr) {
|
||||
if (!path)
|
||||
path = rev.prune_data.items[0].match;
|
||||
paths += rev.prune_data.nr;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user