diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2013-07-14 15:35:59 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-07-15 10:56:09 -0700 |
commit | 9a0872744315da67db3c81eb9270751e31fcc8f5 (patch) | |
tree | 92cd78dc92a8f8f482592e05f678e4a069c0fe33 /builtin/blame.c | |
parent | bd1928df1d1cc6a10a7b275694d3504d9a041fae (diff) | |
download | git-9a0872744315da67db3c81eb9270751e31fcc8f5.tar.gz |
remove init_pathspec() in favor of parse_pathspec()
While at there, move free_pathspec() to pathspec.c
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/blame.c')
-rw-r--r-- | builtin/blame.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/builtin/blame.c b/builtin/blame.c index 5bd721d2b9..56e3d6b7b4 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -408,7 +408,7 @@ static struct origin *find_origin(struct scoreboard *sb, paths[0] = origin->path; paths[1] = NULL; - init_pathspec(&diff_opts.pathspec, paths); + parse_pathspec(&diff_opts.pathspec, PATHSPEC_ALL_MAGIC, 0, "", paths); diff_setup_done(&diff_opts); if (is_null_sha1(origin->commit->object.sha1)) @@ -486,15 +486,12 @@ static struct origin *find_rename(struct scoreboard *sb, struct origin *porigin = NULL; struct diff_options diff_opts; int i; - const char *paths[2]; diff_setup(&diff_opts); DIFF_OPT_SET(&diff_opts, RECURSIVE); diff_opts.detect_rename = DIFF_DETECT_RENAME; diff_opts.output_format = DIFF_FORMAT_NO_OUTPUT; diff_opts.single_follow = origin->path; - paths[0] = NULL; - init_pathspec(&diff_opts.pathspec, paths); diff_setup_done(&diff_opts); if (is_null_sha1(origin->commit->object.sha1)) @@ -1064,7 +1061,6 @@ static int find_copy_in_parent(struct scoreboard *sb, int opt) { struct diff_options diff_opts; - const char *paths[1]; int i, j; int retval; struct blame_list *blame_list; @@ -1078,8 +1074,6 @@ static int find_copy_in_parent(struct scoreboard *sb, DIFF_OPT_SET(&diff_opts, RECURSIVE); diff_opts.output_format = DIFF_FORMAT_NO_OUTPUT; - paths[0] = NULL; - init_pathspec(&diff_opts.pathspec, paths); diff_setup_done(&diff_opts); /* Try "find copies harder" on new path if requested; |