]> git.ipfire.org Git - thirdparty/git.git/commit - unpack-trees.c
unpack-trees: move checkout state into check_updates
authorStefan Beller <sbeller@google.com>
Mon, 9 Jan 2017 19:46:17 +0000 (11:46 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 10 Jan 2017 19:51:14 +0000 (11:51 -0800)
commit30ac275b1c893697e25abefbd872de534bb8c046
tree04d503fcb89556619da2df4dbd261f7f1a1124c7
parenta274e0a036ea886a31f8b216564ab1b4a3142f6c
unpack-trees: move checkout state into check_updates

The checkout state was introduced via 16da134b1f9
(read-trees: refactor the unpack_trees() part, 2006-07-30). An attempt to
refactor the checkout state was done in b56aa5b268e (unpack-trees: pass
checkout state explicitly to check_updates(), 2016-09-13), but we can
go even further.

The `struct checkout state` is not used in unpack_trees apart from
initializing it, so move it into the function that makes use of it,
which is `check_updates`.

Signed-off-by: Stefan Beller <sbeller@google.com>
Reviewed-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
unpack-trees.c