if (reflog) {
struct object_id oid;
- char nth_desc[256];
char *ref;
int base = 0;
unsigned int flags = 0;
for (i = 0; i < reflog; i++) {
char *logmsg;
+ char *nth_desc;
const char *msg;
unsigned long timestamp;
int tz;
show_date(timestamp, tz, 1),
msg);
free(logmsg);
- sprintf(nth_desc, "%s@{%d}", *av, base+i);
+
+ nth_desc = xstrfmt("%s@{%d}", *av, base+i);
append_ref(nth_desc, &oid, 1);
+ free(nth_desc);
}
free(ref);
}