summaryrefslogtreecommitdiff
path: root/builtin-commit.c
diff options
context:
space:
mode:
authorClemens Buchacher <drizzd@aon.at>2009-01-14 14:54:35 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-01-15 03:18:44 (GMT)
commit0b50922abffb82c473182b03eb5bb47a978cceac (patch)
tree25dac912a5f695b9117162cc59087e68e915bbfc /builtin-commit.c
parent1c7c1d179e51f163c014353f33b406f5bae13922 (diff)
downloadgit-0b50922abffb82c473182b03eb5bb47a978cceac.zip
git-0b50922abffb82c473182b03eb5bb47a978cceac.tar.gz
git-0b50922abffb82c473182b03eb5bb47a978cceac.tar.bz2
remove pathspec_match, use match_pathspec instead
Both versions have the same functionality. This removes any redundancy. This also adds makes two extensions to match_pathspec: - If pathspec is NULL, return 1. This reflects the behavior of git commands, for which no paths usually means "match all paths". - If seen is NULL, do not use it. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-commit.c')
-rw-r--r--builtin-commit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-commit.c b/builtin-commit.c
index e88b78f..3d1867a 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -166,7 +166,7 @@ static int list_paths(struct string_list *list, const char *with_tree,
struct cache_entry *ce = active_cache[i];
if (ce->ce_flags & CE_UPDATE)
continue;
- if (!pathspec_match(pattern, m, ce->name, 0))
+ if (!match_pathspec(pattern, ce->name, ce_namelen(ce), 0, m))
continue;
string_list_insert(ce->name, list);
}