Merge branches 'maint', 'jc/fix-co-candy' and 'jc/fix-rename-leak' into next
[git.git] / sha1_file.c
index f4b1089..a80d849 100644 (file)
@@ -564,7 +564,7 @@ static void prepare_packed_git_one(char *objdir, int local)
        dir = opendir(path);
        if (!dir) {
                if (errno != ENOENT)
-                       error("unable to open object pack directory: %s: %s\n",
+                       error("unable to open object pack directory: %s: %s",
                              path, strerror(errno));
                return;
        }
@@ -864,7 +864,7 @@ void packed_object_info_detail(struct pack_entry *e,
                               char *type,
                               unsigned long *size,
                               unsigned long *store_size,
-                              int *delta_chain_length,
+                              unsigned int *delta_chain_length,
                               unsigned char *base_sha1)
 {
        struct packed_git *p = e->p;
@@ -878,7 +878,7 @@ void packed_object_info_detail(struct pack_entry *e,
        if (kind != OBJ_DELTA)
                *delta_chain_length = 0;
        else {
-               int chain_length = 0;
+               unsigned int chain_length = 0;
                memcpy(base_sha1, pack, 20);
                do {
                        struct pack_entry base_ent;
@@ -1513,7 +1513,8 @@ int write_sha1_from_fd(const unsigned char *sha1, int fd, char *buffer,
 
        local = mkstemp(tmpfile);
        if (local < 0)
-               return error("Couldn't open %s for %s\n", tmpfile, sha1_to_hex(sha1));
+               return error("Couldn't open %s for %s",
+                            tmpfile, sha1_to_hex(sha1));
 
        memset(&stream, 0, sizeof(stream));
 
@@ -1561,7 +1562,7 @@ int write_sha1_from_fd(const unsigned char *sha1, int fd, char *buffer,
        }
        if (memcmp(sha1, real_sha1, 20)) {
                unlink(tmpfile);
-               return error("File %s has bad hash\n", sha1_to_hex(sha1));
+               return error("File %s has bad hash", sha1_to_hex(sha1));
        }
 
        return move_temp_to_file(tmpfile, sha1_file_name(sha1));