summaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2015-08-19 14:48:55 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-08-19 14:48:55 -0700
commit51a22ce1477b991793c20d3143d72f0ae6e38c76 (patch)
treed771608f4ebc48a899196524534b5912632cd843 /sha1_file.c
parentMerge branch 'ps/guess-repo-name-at-root' (diff)
parentsha1_file.c: rename move_temp_to_file() to finalize_object_file() (diff)
downloadtgif-51a22ce1477b991793c20d3143d72f0ae6e38c76.tar.xz
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()
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sha1_file.c b/sha1_file.c
index 1cee438422..1081b95713 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -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)