#include "cache.h"
#include "refs.h"
-#include "string-list.h"
#include "utf8.h"
int starts_with(const char *str, const char *prefix)
return ret;
}
-void strbuf_add_separated_string_list(struct strbuf *str,
- const char *sep,
- struct string_list *slist)
-{
- struct string_list_item *item;
- int sep_needed = 0;
-
- for_each_string_list_item(item, slist) {
- if (sep_needed)
- strbuf_addstr(str, sep);
- strbuf_addstr(str, item->string);
- sep_needed = 1;
- }
-}
-
void strbuf_list_free(struct strbuf **sbs)
{
struct strbuf **s = sbs;
strbuf_setlen(sb, sb->len + len);
}
-void strbuf_add_unique_abbrev(struct strbuf *sb, const unsigned char *sha1,
+void strbuf_add_unique_abbrev(struct strbuf *sb, const struct object_id *oid,
int abbrev_len)
{
int r;
strbuf_grow(sb, GIT_SHA1_HEXSZ + 1);
- r = find_unique_abbrev_r(sb->buf + sb->len, sha1, abbrev_len);
+ r = find_unique_abbrev_r(sb->buf + sb->len, oid, abbrev_len);
strbuf_setlen(sb, sb->len + r);
}