rebase -i: set commit to null in exec commands
[gitweb.git] / sequencer.c
index 19dd575ed9b3b280a3fdabc9121a2e193d6984db..5033b049d995d95d9bee059f601223daf5271bfc 100644 (file)
@@ -438,7 +438,8 @@ static int do_recursive_merge(struct commit *base, struct commit *next,
        char **xopt;
        static struct lock_file index_lock;
 
-       hold_locked_index(&index_lock, LOCK_DIE_ON_ERROR);
+       if (hold_locked_index(&index_lock, LOCK_REPORT_ON_ERROR) < 0)
+               return -1;
 
        read_cache();
 
@@ -1267,6 +1268,7 @@ static int parse_insn_line(struct todo_item *item, const char *bol, char *eol)
        bol += padding;
 
        if (item->command == TODO_EXEC) {
+               item->commit = NULL;
                item->arg = bol;
                item->arg_len = (int)(eol - bol);
                return 0;