t3901: Use ISO8859-1 instead of ISO-8859-1 for backward compatibility
[gitweb.git] / sha1_file.c
index 11969fc161bb56af410a76f0791dc9cb3bec0e1b..e5dec8d3c8d783a8f90b700e633fe07e818df1f7 100644 (file)
@@ -791,7 +791,7 @@ static int in_window(struct pack_window *win, off_t offset)
                && (offset + 20) <= (win_off + win->len);
 }
 
-unsigned charuse_pack(struct packed_git *p,
+unsigned char *use_pack(struct packed_git *p,
                struct pack_window **w_cursor,
                off_t offset,
                unsigned int *left)
@@ -2225,7 +2225,7 @@ int move_temp_to_file(const char *tmpfile, const char *filename)
 {
        int ret = 0;
 
-       if (unreliable_hardlinks)
+       if (object_creation_mode == OBJECT_CREATION_USES_RENAMES)
                goto try_rename;
        else if (link(tmpfile, filename))
                ret = errno;
@@ -2247,7 +2247,7 @@ int move_temp_to_file(const char *tmpfile, const char *filename)
                        goto out;
                ret = errno;
        }
-       unlink(tmpfile);
+       unlink_or_warn(tmpfile);
        if (ret) {
                if (ret != EEXIST) {
                        return error("unable to write sha1 filename %s: %s\n", filename, strerror(ret));