]> git.ipfire.org Git - thirdparty/git.git/blobdiff - strbuf.c
test-ref-store: remove force-create argument for create-reflog
[thirdparty/git.git] / strbuf.c
index c8a5789694cf805799a288b66e517bedf786e479..b22e9816559cabc4f3d94f7f42cde5a50f32495a 100644 (file)
--- a/strbuf.c
+++ b/strbuf.c
@@ -1059,15 +1059,21 @@ 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 struct object_id *oid,
-                             int abbrev_len)
+void strbuf_repo_add_unique_abbrev(struct strbuf *sb, struct repository *repo,
+                                  const struct object_id *oid, int abbrev_len)
 {
        int r;
        strbuf_grow(sb, GIT_MAX_HEXSZ + 1);
-       r = find_unique_abbrev_r(sb->buf + sb->len, oid, abbrev_len);
+       r = repo_find_unique_abbrev_r(repo, sb->buf + sb->len, oid, abbrev_len);
        strbuf_setlen(sb, sb->len + r);
 }
 
+void strbuf_add_unique_abbrev(struct strbuf *sb, const struct object_id *oid,
+                             int abbrev_len)
+{
+       strbuf_repo_add_unique_abbrev(sb, the_repository, oid, abbrev_len);
+}
+
 /*
  * Returns the length of a line, without trailing spaces.
  *