builtin/update-index.c: cleanup update_one
commit6bb69077b74b792ddef66e372c86e66dea8e449b
authorKarsten Blees <karsten.blees@gmail.com>
Thu, 14 Nov 2013 19:24:08 +0000 (14 20:24 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 18 Nov 2013 21:04:25 +0000 (18 13:04 -0800)
tree46625895a9bb3d10868ee93b0fe8c20a6f7f8790
parente837af61345344448346afef79d53a5ff95bb0b3
builtin/update-index.c: cleanup update_one

do_reupdate calls update_one with a cache_entry.name, there's no need for
the extra sanitation / normalization that happens in prefix_path.
cmd_update_index calls update_one with an already prefixed path, no need to
prefix_path twice.

Remove the extra prefix_path from update_one. Also remove the now unused
'prefix' and 'prefix_length' parameters.

As of d089eba "setup: sanitize absolute and funny paths in get_pathspec()",
prefix_path uncoditionally returns a copy, even if the passed in path isn't
changed. Lets unconditionally free() the result.

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/update-index.c