diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-12-16 13:14:47 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-12-16 13:14:47 -0800 |
commit | e3b72391d1ab9fb55a8c22a06501d7a8d7c5e02a (patch) | |
tree | 6580eb37bd226e3b5caca3799e057da23616546e /builtin | |
parent | Merge branch 'rs/archive-zip-code-cleanup' (diff) | |
parent | commit: use strbuf_add() to add a length-limited string (diff) | |
download | tgif-e3b72391d1ab9fb55a8c22a06501d7a8d7c5e02a.tar.xz |
Merge branch 'rs/commit-export-env-simplify'
Code cleanup.
* rs/commit-export-env-simplify:
commit: use strbuf_add() to add a length-limited string
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/commit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/commit.c b/builtin/commit.c index 2db2ad0de4..e48c1fd90a 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -554,7 +554,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); } |