diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-12-17 19:43:06 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-02-03 14:08:30 -0800 |
commit | afe069d16618190a6f7e84ef8451970e274aedb4 (patch) | |
tree | 6e0e2b1aa98b8a576177a3804032974c76e21b26 /builtin/diff.c | |
parent | 61cf28204508c095a68e7a9cb6307ca2a27112c9 (diff) | |
download | git-afe069d16618190a6f7e84ef8451970e274aedb4.tar.gz |
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>
Diffstat (limited to 'builtin/diff.c')
-rw-r--r-- | builtin/diff.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/builtin/diff.c b/builtin/diff.c index a08c3240d5..d12de8f392 100644 --- a/builtin/diff.c +++ b/builtin/diff.c @@ -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; } /* |