diff --git a/builtin-show-ref.c b/builtin-show-ref.c
index a323633e296cef1797ab1d218cea83c891bc3b8d..add16004f11375b1ad2b97f9b1bf1ced5c437f81 100644 (file)
--- a/builtin-show-ref.c
+++ b/builtin-show-ref.c
#include "refs.h"
#include "object.h"
#include "tag.h"
#include "refs.h"
#include "object.h"
#include "tag.h"
-#include "path-list.h"
+#include "string-list.h"
static const char show_ref_usage[] = "git show-ref [-q|--quiet] [--verify] [-h|--head] [-d|--dereference] [-s|--hash[=<length>]] [--abbrev[=<length>]] [--tags] [--heads] [--] [pattern*] < ref-list";
static const char show_ref_usage[] = "git show-ref [-q|--quiet] [--verify] [-h|--head] [-d|--dereference] [-s|--hash[=<length>]] [--abbrev[=<length>]] [--tags] [--heads] [--] [pattern*] < ref-list";
static int add_existing(const char *refname, const unsigned char *sha1, int flag, void *cbdata)
{
static int add_existing(const char *refname, const unsigned char *sha1, int flag, void *cbdata)
{
- struct path_list *list = (struct path_list *)cbdata;
- path_list_insert(refname, list);
+ struct string_list *list = (struct string_list *)cbdata;
+ string_list_insert(refname, list);
return 0;
}
return 0;
}
@@ -114,7 +114,7 @@ static int add_existing(const char *refname, const unsigned char *sha1, int flag
*/
static int exclude_existing(const char *match)
{
*/
static int exclude_existing(const char *match)
{
- static struct path_list existing_refs = { NULL, 0, 0, 0 };
+ static struct string_list existing_refs = { NULL, 0, 0, 0 };
char buf[1024];
int matchlen = match ? strlen(match) : 0;
char buf[1024];
int matchlen = match ? strlen(match) : 0;
fprintf(stderr, "warning: ref '%s' ignored\n", ref);
continue;
}
fprintf(stderr, "warning: ref '%s' ignored\n", ref);
continue;
}
- if (!path_list_has_path(&existing_refs, ref)) {
+ if (!string_list_has_string(&existing_refs, ref)) {
printf("%s\n", buf);
}
}
printf("%s\n", buf);
}
}