]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/index-pack.c
sha1_file.c: rename move_temp_to_file() to finalize_object_file()
authorJunio C Hamano <gitster@pobox.com>
Fri, 7 Aug 2015 21:40:24 +0000 (14:40 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 10 Aug 2015 18:10:37 +0000 (11:10 -0700)
commitcb5add58681db299d22cdccd898f9924e740034a
tree3bd7c862331cc61bff36e4476b4df2a1dd066ac9
parent282616c72d1d08a77ca4fe1186cb708c38408d87
sha1_file.c: rename move_temp_to_file() to finalize_object_file()

Since 5a688fe4 ("core.sharedrepository = 0mode" should set, not
loosen, 2009-03-25), we kept reminding ourselves:

    NEEDSWORK: this should be renamed to finalize_temp_file() as
    "moving" is only a part of what it does, when no patch between
    master to pu changes the call sites of this function.

without doing anything about it.  Let's do so.

The purpose of this function was not to move but to finalize.  The
detail of the primarily implementation of finalizing was to link the
temporary file to its final name and then to unlink, which wasn't
even "moving".  The alternative implementation did "move" by calling
rename(2), which is a fun tangent.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/index-pack.c
cache.h
fast-import.c
http.c
sha1_file.c