author | Junio C Hamano <gitster@pobox.com> | |
Wed, 14 Dec 2011 06:18:00 +0000 (22:18 -0800) | ||
committer | Junio 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
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 | patch | | diff1 | | diff2 | | blob | history |
diff --cc builtin/fetch.c
index 494a7f9976f870a28dbbbcb4196954a827f6bfdb,8761a33b491ae8a9437d78247ef0808c0686486e..33ad3aad2c99116a237d7e7d11dab22fcf4295b1
--- 1/builtin/fetch.c
--- 2/builtin/fetch.c
+++ b/builtin/fetch.c
if (4 < i && !strncmp(".git", url + i - 3, 4))
url_len = i - 3;
- note_len = 0;
+ strbuf_reset(¬e);
if (*what) {
if (*kind)
- note_len += sprintf(note + note_len, "%s ",
- kind);
- note_len += sprintf(note + note_len, "'%s' of ", what);
+ strbuf_addf(¬e, "%s ", kind);
+ strbuf_addf(¬e, "'%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);