]> git.ipfire.org Git - thirdparty/git.git/blobdiff - strbuf.c
provide --color option for all ref-filter users
[thirdparty/git.git] / strbuf.c
index be3b9e37b1d969e86e913cc69ccab935f516a063..89d22e3b0903a220fa958b8d912607828ab2a9ba 100644 (file)
--- a/strbuf.c
+++ b/strbuf.c
@@ -204,13 +204,6 @@ void strbuf_addbuf(struct strbuf *sb, const struct strbuf *sb2)
        strbuf_setlen(sb, sb->len + sb2->len);
 }
 
-void strbuf_adddup(struct strbuf *sb, size_t pos, size_t len)
-{
-       strbuf_grow(sb, len);
-       memcpy(sb->buf + sb->len, sb->buf + pos, len);
-       strbuf_setlen(sb, sb->len + len);
-}
-
 void strbuf_addchars(struct strbuf *sb, int c, size_t n)
 {
        strbuf_grow(sb, n);
@@ -786,7 +779,7 @@ char *xstrfmt(const char *fmt, ...)
 }
 
 void strbuf_addftime(struct strbuf *sb, const char *fmt, const struct tm *tm,
-                    int tz_offset, const char *tz_name)
+                    int tz_offset, int suppress_tz_name)
 {
        struct strbuf munged_fmt = STRBUF_INIT;
        size_t hint = 128;
@@ -815,8 +808,7 @@ void strbuf_addftime(struct strbuf *sb, const char *fmt, const struct tm *tm,
                        fmt++;
                        break;
                case 'Z':
-                       if (tz_name) {
-                               strbuf_addstr(&munged_fmt, tz_name);
+                       if (suppress_tz_name) {
                                fmt++;
                                break;
                        }