]> git.99rst.org Git - git.git/commit
am: simplify building "show" argument list
authorRené Scharfe <redacted>
Sun, 30 Oct 2022 11:46:11 +0000 (12:46 +0100)
committerTaylor Blau <redacted>
Sun, 30 Oct 2022 18:04:33 +0000 (14:04 -0400)
commit75c92a0540dd866b1ccf5454c4cc540d926a6139
treea1397b259d9c284598b7fbd15df2da4b6c5ff641
parent53c4be3fd82208bde63c6f38556089428c4e5be5
am: simplify building "show" argument list

Build the string array av during initialization, without any magic
numbers or heap allocations.  Not duplicating the result of oid_to_hex()
is safe because run_command_v_opt() duplicates all arguments already.
(It would even be safe if it didn't, but that's a different story.)

Signed-off-by: René Scharfe <redacted>
Signed-off-by: Taylor Blau <redacted>
builtin/am.c
git clone https://git.99rst.org/PROJECT