summaryrefslogtreecommitdiff
path: root/builtin/update-index.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2014-01-24 13:40:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-02-24 22:36:52 (GMT)
commit429bb40abdb5b42ffdde5b1a58f9a37da723d179 (patch)
tree62442107904393fa427b89bffc451dff3520c693 /builtin/update-index.c
parent017f804efc47234682fb0103a51ac453d96c56c1 (diff)
downloadgit-429bb40abdb5b42ffdde5b1a58f9a37da723d179.zip
git-429bb40abdb5b42ffdde5b1a58f9a37da723d179.tar.gz
git-429bb40abdb5b42ffdde5b1a58f9a37da723d179.tar.bz2
pathspec: convert some match_pathspec_depth() to ce_path_match()
This helps reduce the number of match_pathspec_depth() call sites and show how match_pathspec_depth() is used. 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/update-index.c')
-rw-r--r--builtin/update-index.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/update-index.c b/builtin/update-index.c
index e3a10d7..aaa6f78 100644
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@ -12,6 +12,7 @@
#include "resolve-undo.h"
#include "parse-options.h"
#include "pathspec.h"
+#include "dir.h"
/*
* Default to not allowing changes to the list of files. The
@@ -564,7 +565,7 @@ static int do_reupdate(int ac, const char **av,
struct cache_entry *old = NULL;
int save_nr;
- if (ce_stage(ce) || !ce_path_match(ce, &pathspec))
+ if (ce_stage(ce) || !ce_path_match(ce, &pathspec, NULL))
continue;
if (has_head)
old = read_one_ent(NULL, head_sha1,