fast-export: make sure updated refs get updated
[gitweb.git] / sequencer.c
index dbef5cea027f61a8172c4889005c090f1d0df048..22604902aa4c4dd146f562c4841c344a773a9bda 100644 (file)
@@ -19,7 +19,7 @@
 
 const char sign_off_header[] = "Signed-off-by: ";
 
-void remove_sequencer_state(void)
+static void remove_sequencer_state(void)
 {
        struct strbuf seq_dir = STRBUF_INIT;
 
@@ -60,7 +60,7 @@ static int get_message(struct commit *commit, struct commit_message *out)
 
        out->reencoded_message = NULL;
        out->message = commit->buffer;
-       if (strcmp(encoding, git_commit_encoding))
+       if (same_encoding(encoding, git_commit_encoding))
                out->reencoded_message = reencode_string(commit->buffer,
                                        git_commit_encoding, encoding);
        if (out->reencoded_message)
@@ -191,7 +191,7 @@ static int fast_forward_to(const unsigned char *to, const unsigned char *from)
        struct ref_lock *ref_lock;
 
        read_cache();
-       if (checkout_fast_forward(from, to))
+       if (checkout_fast_forward(from, to, 1))
                exit(1); /* the callee should have complained already */
        ref_lock = lock_any_ref_for_update("HEAD", from, 0);
        return write_ref_sha1(ref_lock, to, "cherry-pick");