Merge branch 'po/error-message-style' into maint
[gitweb.git] / http-push.c
index 34cb70f90ea14a18848bd270463f5a34dc2c8fd3..de00d1693af902713ab5562e9d87fe621b02f955 100644 (file)
@@ -64,8 +64,7 @@ enum XML_Status {
 #define LOCK_TIME 600
 #define LOCK_REFRESH 30
 
-/* bits #0-15 in revision.h */
-
+/* Remember to update object flag allocation in object.h */
 #define LOCAL    (1u<<16)
 #define REMOTE   (1u<<17)
 #define FETCHING (1u<<18)
@@ -771,7 +770,7 @@ static void handle_new_lock_ctx(struct xml_ctx *ctx, int tag_closed)
                        lock->owner = xmalloc(strlen(ctx->cdata) + 1);
                        strcpy(lock->owner, ctx->cdata);
                } else if (!strcmp(ctx->name, DAV_ACTIVELOCK_TIMEOUT)) {
-                       if (!prefixcmp(ctx->cdata, "Second-"))
+                       if (starts_with(ctx->cdata, "Second-"))
                                lock->timeout =
                                        strtol(ctx->cdata + 7, NULL, 10);
                } else if (!strcmp(ctx->name, DAV_ACTIVELOCK_TOKEN)) {
@@ -1579,7 +1578,7 @@ static void fetch_symref(const char *path, char **symref, unsigned char *sha1)
                return;
 
        /* If it's a symref, set the refname; otherwise try for a sha1 */
-       if (!prefixcmp((char *)buffer.buf, "ref: ")) {
+       if (starts_with((char *)buffer.buf, "ref: ")) {
                *symref = xmemdupz((char *)buffer.buf + 5, buffer.len - 6);
        } else {
                get_sha1_hex(buffer.buf, sha1);
@@ -1733,7 +1732,7 @@ int main(int argc, char **argv)
 
        git_extract_argv0_path(argv[0]);
 
-       repo = xcalloc(sizeof(*repo), 1);
+       repo = xcalloc(1, sizeof(*repo));
 
        argv++;
        for (i = 1; i < argc; i++, argv++) {