commit: use clear_commit_marks_many() in remove_redundant()
[gitweb.git] / http-push.c
index c91f40a610541d6201edf2a2c95b8fef203f3c2f..493ee7d719d488f25cd6c45bb4c7ce1d5a75977b 100644 (file)
@@ -11,6 +11,7 @@
 #include "list-objects.h"
 #include "sigchain.h"
 #include "argv-array.h"
+#include "packfile.h"
 
 #ifdef EXPAT_NEEDS_XMLPARSE_H
 #include <xmlparse.h>
@@ -1017,7 +1018,7 @@ static int get_oid_hex_from_objpath(const char *path, struct object_id *oid)
        memcpy(hex, path, 2);
        path += 2;
        path++; /* skip '/' */
-       memcpy(hex, path, GIT_SHA1_HEXSZ - 2);
+       memcpy(hex + 2, path, GIT_SHA1_HEXSZ - 2);
 
        return get_oid_hex(hex, oid);
 }
@@ -1522,6 +1523,7 @@ static int remote_exists(const char *path)
                break;
        case HTTP_ERROR:
                error("unable to access '%s': %s", url, curl_errorstr);
+               /* fallthrough */
        default:
                ret = -1;
        }