update-index: be specific what part of the index has changed
[gitweb.git] / builtin / name-rev.c
index 23daaa7d99b40e1bbd38a2743bc0d9ed0c38eda9..c824d4ec5f1c076e4833c690dad378125dde6da9 100644 (file)
@@ -87,7 +87,7 @@ static int subpath_matches(const char *path, const char *filter)
        const char *subpath = path;
 
        while (subpath) {
-               if (!fnmatch(filter, subpath, 0))
+               if (!wildmatch(filter, subpath, 0, NULL))
                        return subpath - path;
                subpath = strchr(subpath, '/');
                if (subpath)
@@ -100,9 +100,9 @@ static const char *name_ref_abbrev(const char *refname, int shorten_unambiguous)
 {
        if (shorten_unambiguous)
                refname = shorten_unambiguous_ref(refname, 0);
-       else if (!prefixcmp(refname, "refs/heads/"))
+       else if (starts_with(refname, "refs/heads/"))
                refname = refname + 11;
-       else if (!prefixcmp(refname, "refs/"))
+       else if (starts_with(refname, "refs/"))
                refname = refname + 5;
        return refname;
 }
@@ -148,7 +148,7 @@ static int name_ref(const char *path, const unsigned char *sha1, int flags, void
        int can_abbreviate_output = data->tags_only && data->name_only;
        int deref = 0;
 
-       if (data->tags_only && prefixcmp(path, "refs/tags/"))
+       if (data->tags_only && !starts_with(path, "refs/tags/"))
                return 0;
 
        if (data->ref_filter) {