Merge branch 'jc/finalize-temp-file'

Long overdue micro clean-up.

* jc/finalize-temp-file:
  sha1_file.c: rename move_temp_to_file() to finalize_object_file()
This commit is contained in:
Junio C Hamano
2015-08-19 14:48:55 -07:00
5 changed files with 12 additions and 15 deletions

View File

@ -2908,11 +2908,8 @@ static void write_sha1_file_prepare(const void *buf, unsigned long len,
/*
* Move the just written object into its final resting place.
* 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.
*/
int move_temp_to_file(const char *tmpfile, const char *filename)
int finalize_object_file(const char *tmpfile, const char *filename)
{
int ret = 0;
@ -3085,7 +3082,7 @@ static int write_loose_object(const unsigned char *sha1, char *hdr, int hdrlen,
tmp_file, strerror(errno));
}
return move_temp_to_file(tmp_file, filename);
return finalize_object_file(tmp_file, filename);
}
static int freshen_loose_object(const unsigned char *sha1)