Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-12-17 15:43:06 +0300
committerJunio C Hamano <gitster@pobox.com>2011-02-04 01:08:30 +0300
commitafe069d16618190a6f7e84ef8451970e274aedb4 (patch)
tree6e0e2b1aa98b8a576177a3804032974c76e21b26 /builtin/diff.c
parent61cf28204508c095a68e7a9cb6307ca2a27112c9 (diff)
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.c12
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;
}
/*