René Scharfe <l.s.r@xxxxxx> writes: > This is shorter and simpler. > > Signed-off-by: René Scharfe <l.s.r@xxxxxx> > --- Ack (this was from me abck in 2012). > builtin/commit.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/builtin/commit.c b/builtin/commit.c > index 294dc574cd..35a1fb9ad6 100644 > --- a/builtin/commit.c > +++ b/builtin/commit.c > @@ -537,7 +537,7 @@ static void export_one(const char *var, const char *s, const char *e, int hack) > struct strbuf buf = STRBUF_INIT; > if (hack) > strbuf_addch(&buf, hack); > - strbuf_addf(&buf, "%.*s", (int)(e - s), s); > + strbuf_add(&buf, s, e - s); > setenv(var, buf.buf, 1); > strbuf_release(&buf); > } > -- > 2.24.0