Merge branch 'maint'
authorJunio C Hamano <gitster@pobox.com>
Wed, 14 Dec 2011 06:18:00 +0000 (22:18 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 14 Dec 2011 06:18:00 +0000 (22:18 -0800)
* maint:
  Update draft release notes for 1.7.8.1
  Git 1.7.7.5
  Git 1.7.6.5
  blame: don't overflow time buffer
  fetch: create status table using strbuf

Conflicts:
RelNotes

1  2 
builtin/fetch.c

diff --cc builtin/fetch.c
index 494a7f9976f870a28dbbbcb4196954a827f6bfdb,8761a33b491ae8a9437d78247ef0808c0686486e..33ad3aad2c99116a237d7e7d11dab22fcf4295b1
@@@ -427,18 -436,17 +436,16 @@@ static int store_updated_refs(const cha
                if (4 < i && !strncmp(".git", url + i - 3, 4))
                        url_len = i - 3;
  
-               note_len = 0;
+               strbuf_reset(&note);
                if (*what) {
                        if (*kind)
-                               note_len += sprintf(note + note_len, "%s ",
-                                                   kind);
-                       note_len += sprintf(note + note_len, "'%s' of ", what);
+                               strbuf_addf(&note, "%s ", kind);
+                       strbuf_addf(&note, "'%s' of ", what);
                }
-               note[note_len] = '\0';
                fprintf(fp, "%s\t%s\t%s",
 -                      sha1_to_hex(commit ? commit->object.sha1 :
 -                                  rm->old_sha1),
 +                      sha1_to_hex(rm->old_sha1),
                        rm->merge ? "" : "not-for-merge",
-                       note);
+                       note.buf);
                for (i = 0; i < url_len; ++i)
                        if ('\n' == url[i])
                                fputs("\\n", fp);