]> git.ipfire.org Git - thirdparty/git.git/blobdiff - strbuf.c
t3404: check root commit in 'rebase -i --root reword root commit'
[thirdparty/git.git] / strbuf.c
index 013fc673fa421d6c5abdc40d3ce3c48528464724..43a840c67b30754c10f9d6a260882a863169c52c 100644 (file)
--- a/strbuf.c
+++ b/strbuf.c
@@ -1,6 +1,5 @@
 #include "cache.h"
 #include "refs.h"
-#include "string-list.h"
 #include "utf8.h"
 
 int starts_with(const char *str, const char *prefix)
@@ -172,21 +171,6 @@ struct strbuf **strbuf_split_buf(const char *str, size_t slen,
        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;
@@ -897,12 +881,12 @@ void strbuf_addftime(struct strbuf *sb, const char *fmt, const struct tm *tm,
        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);
 }