]> git.ipfire.org Git - thirdparty/git.git/commit
xprepare: simplify error handling
authorPhillip Wood <phillip.wood@dunelm.org.uk>
Mon, 4 May 2026 14:06:20 +0000 (15:06 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 5 May 2026 07:20:05 +0000 (16:20 +0900)
commitc8eb18f58607057a812654bdfca3e6b47bd0ffe4
tree80180f90454d4d92026406c5ccc5fbbdc00e1914
parent53d13887b8581d46dffc1f4ee2622c977b65ecb5
xprepare: simplify error handling

If either of the two allocations fail we want to take the same action
so use a single if statement. This saves a few lines and makes it
easier for the next commit to add a couple more allocations.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
xdiff/xprepare.c