]> git.ipfire.org Git - thirdparty/git.git/blobdiff - sequencer.c
config.mak.uname: resolve FreeBSD iconv-related compilation warning
[thirdparty/git.git] / sequencer.c
index 560fc9b67d480069328d379421c606d800e82135..4034c0461b5022dad01b25d824cdc4f47ee09d13 100644 (file)
@@ -784,7 +784,7 @@ static int run_git_commit(const char *defmsg, struct replay_opts *opts,
        struct child_process cmd = CHILD_PROCESS_INIT;
        const char *value;
 
-       if (flags & CREATE_ROOT_COMMIT) {
+       if ((flags & CREATE_ROOT_COMMIT) && !(flags & AMEND_MSG)) {
                struct strbuf msg = STRBUF_INIT, script = STRBUF_INIT;
                const char *author = is_rebase_i(opts) ?
                        read_author_ident(&script) : NULL;
@@ -3792,7 +3792,7 @@ static const char *label_oid(struct object_id *oid, const char *label,
                                p[i] = save;
                        }
                }
-       } else if (((len = strlen(label)) == GIT_SHA1_RAWSZ &&
+       } else if (((len = strlen(label)) == the_hash_algo->hexsz &&
                    !get_oid_hex(label, &dummy)) ||
                   (len == 1 && *label == '#') ||
                   hashmap_get_from_hash(&state->labels,