Skip to content

pr-2323/marinelay/fast-import-inline-eof-v2

tagged this 24 Nov 05:12
From: Wonseok Oh <marinelay7@gmail.com>

After "M <mode> inline <path>", fast-import expects a "data" command.
If the input ends there, file_change_m() leaves its read loop without
reading any data and writes an uninitialized object ID into the tree.
fast-import then exits 0, and "git fsck" reports a missing blob.

Die when read_next_command() returns EOF in that loop, just as
parse_data() already dies on any command other than "data".

Signed-off-by: Wonseok Oh <marinelay7@gmail.com>

Submitted-As: https://lore.kernel.org/git/pull.2323.v2.git.1795497145494.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.2323.git.1795246845186.gitgitgadget@gmail.com
Assets 2
Loading