From patchwork Thu Jan 23 12:28:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Derrick Stolee via GitGitGadget X-Patchwork-Id: 11347597 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7CFC117EF for ; Thu, 23 Jan 2020 12:28:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5A3422467B for ; Thu, 23 Jan 2020 12:28:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PWip/I2c" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727278AbgAWM2Y (ORCPT ); Thu, 23 Jan 2020 07:28:24 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:46043 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726232AbgAWM2Y (ORCPT ); Thu, 23 Jan 2020 07:28:24 -0500 Received: by mail-wr1-f67.google.com with SMTP id j42so2824245wrj.12 for ; Thu, 23 Jan 2020 04:28:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=Aa3LmM7G62Jt+wArrDG0N9AHHVYhry75OsxLe6GzWf0=; b=PWip/I2cOKMhCB5O0MKFrybxJjF83VN5cJ3sXIGmWZQmQx/S1mK8mCf7z1ZzCB+WZT lPAVl00PXqSnZK1Uez/oei+oJQ66dggkO+IdKoHvG8wAOKlVODaxPMseRvuuslaMTd5W IgQ419Qct5YdyaGPzdy4H6OrFL/0rQ8f3DtwE3DAoQKuQXf1K+DxzSMAKMCL8TfsZFkH l2QdJMAOiMgIMC/Vn3Y7hmxXhAkE8tLV/XoBPsmGgF6IIvvAGZUmL5sMADxcEMR19cKl GDkTGqLt2HIQyYhJ0kq9u7njEfRcpG5cWqUlC26NmWATrTfK+PHc4rtcKV7Qj3m3ymTF zZjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=Aa3LmM7G62Jt+wArrDG0N9AHHVYhry75OsxLe6GzWf0=; b=uRZ0l33sgL6v1EkM5gjivzRQu9heSUAi46ora+4Su5XGqb5vgcmWR/ssQb3kZ0CH+D zJoYBJ8RKdUx0oW/T6utSQ2oHLxBnGrjlZOu32/UBl57G9D21oSNILiB5fF/6FbuYz30 WagIWLb9qqzeaO5AYUBw9GbhI7OhjZ4wy5Mbbcj0KT30uqb+qHs1UGvhfYRBF+RgcCPw yH9ac8/GSb9BputEtZax8ULHlLGFeO88H+iJmtixThmjNUGZ+5jxAQQmMJzcsYhxTKrh kU4JYligyB2OHuohtONE/kLRiOnBnOepmLGd+yZYIIOFeqKn4S7xW7+oBswIg+G9Ki0c TPZQ== X-Gm-Message-State: APjAAAVGcftIStKdXhrxXajrrp6xAFIgKxWZIfvVJTcDx40199W8tr3O oKtjyVm2uewQzTOe6BnqFMbLtUTf X-Google-Smtp-Source: APXvYqzZ2Xn120Xegmfi5HaFjLI67mYJnuKJNgufrkbjoVxtxfZ4EaOlBme14kdwTFylMkcWYFJkQA== X-Received: by 2002:adf:ec0d:: with SMTP id x13mr17315003wrn.400.1579782501679; Thu, 23 Jan 2020 04:28:21 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id p5sm2753297wrt.79.2020.01.23.04.28.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jan 2020 04:28:21 -0800 (PST) Message-Id: <6f5c7b032524ed2510286caa0623fdbfa2b02eb3.1579782500.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Date: Thu, 23 Jan 2020 12:28:17 +0000 Subject: [PATCH v3 1/3] parse_insn_line(): improve error message when parsing failed Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: "brian m. carlson" , Alban Gruin , Eric Sunshine , Junio C Hamano , Johannes Schindelin , Johannes Schindelin Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin In the case that a `get_oid()` call failed, we showed some rather bogus part of the line instead of the precise string we sent to said function. That makes it rather hard for users to understand what is going wrong, so let's fix that. While at it, return a negative value from `parse_insn_line()` in case of an error, as per our convention. This function's only caller, `todo_list_parse_insn_buffer()`, cares only whether that return value is non-zero or not, i.e. does not need to be changed. Signed-off-by: Johannes Schindelin --- sequencer.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sequencer.c b/sequencer.c index b9dbf1adb0..7c30dad59c 100644 --- a/sequencer.c +++ b/sequencer.c @@ -2118,6 +2118,8 @@ static int parse_insn_line(struct repository *r, struct todo_item *item, saved = *end_of_object_name; *end_of_object_name = '\0'; status = get_oid(bol, &commit_oid); + if (status < 0) + error(_("could not parse '%s'"), bol); /* return later */ *end_of_object_name = saved; bol = end_of_object_name + strspn(end_of_object_name, " \t"); @@ -2125,11 +2127,10 @@ static int parse_insn_line(struct repository *r, struct todo_item *item, item->arg_len = (int)(eol - bol); if (status < 0) - return error(_("could not parse '%.*s'"), - (int)(end_of_object_name - bol), bol); + return status; item->commit = lookup_commit_reference(r, &commit_oid); - return !item->commit; + return item->commit ? 0 : -1; } int sequencer_get_last_command(struct repository *r, enum replay_action *action) From patchwork Thu Jan 23 12:28:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Derrick Stolee via GitGitGadget X-Patchwork-Id: 11347599 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 332A617EF for ; Thu, 23 Jan 2020 12:28:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0A0802467B for ; Thu, 23 Jan 2020 12:28:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ixhwYeyh" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727816AbgAWM20 (ORCPT ); Thu, 23 Jan 2020 07:28:26 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:40819 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726811AbgAWM2Z (ORCPT ); Thu, 23 Jan 2020 07:28:25 -0500 Received: by mail-wm1-f66.google.com with SMTP id t14so2328263wmi.5 for ; Thu, 23 Jan 2020 04:28:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=O+sjKwSxUvvqchvjwN8hJxSqhvyPfx8Q4HJ4ADFdrGc=; b=ixhwYeyhDgEFROj8r9t+aMVlfDgOr+lTlt+m0+5pKf1MYBeGdXvERjcXIroIG4Ddg3 Sol/cRUx//H+cOHwQJgNWfQ4TB2VqnQYP3dIFWxhNrTMtcwVWrHArPum474Nu2XIdY1u 4qlebpbJD1u15iXez38M2maC8YCEC0ONVVqtk7poXwYFUX489FhbqZnSejNFGyH1EEhz M9ZlGIZ36xJLilh/2+t8iZrEHpFvouDfUX1mf0PUmecOYvNhhTmQ2xLG9G+qn64tnvJE RiqWkscLk3zHJnS7Ud2pNVl6ZXu0t6Ip2zuBKSaSKjnaYgIiq/THFKPe2nvzpkCvWgHc 9wmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=O+sjKwSxUvvqchvjwN8hJxSqhvyPfx8Q4HJ4ADFdrGc=; b=iFWOjz3+EteZaZnYL3XRfS60dQVeC8stX+lf8maVhkuTe/M3baqzJWX5Cwo0K1+pt+ z5kEM5rO2yfPofYTV2Gx8whsHsg/I5FlKMxTYxlbloZZpMRcTE9WYQg1wC6rZbA2aDoM ycuvSvkfrj6mhDB/rzZrbo6SdrLOr/CzRsYbc2LRz7tkYiW0rQK1X3eON94mONTHP/yY j8ngBcYX+fzBTUAiDOtSR2Iyaoj6egFGOsuOt7hbjXwoRzLHesV/aXn8phjYkTKlU8Qf KXhuYcEGIEumqmOP2QR7pDTOW5gsgQoVi2y3Y+1Arm5r5FCZp/5ov4LAbR6L+UIITlQC WRCg== X-Gm-Message-State: APjAAAWjV69mHwn6Nac9v3jPzBaEt8ic5MjuogQOpkTS5jWZRrVZv11Q +ivCYdX3fgjYvtZ70GbMmVU5jwWS X-Google-Smtp-Source: APXvYqz15Vp3ft99Id4HadZ8Kh15T7iY92lRqqxhs5qQ8E6gpA5Qh+hd4fYXd+Ww/A0XWJjXWa9UCg== X-Received: by 2002:a05:600c:296:: with SMTP id 22mr3985531wmk.101.1579782502416; Thu, 23 Jan 2020 04:28:22 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id x10sm2815615wrv.60.2020.01.23.04.28.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jan 2020 04:28:21 -0800 (PST) Message-Id: <595ba81e0993b942370a2949867e5910e57fdd45.1579782500.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Date: Thu, 23 Jan 2020 12:28:18 +0000 Subject: [PATCH v3 2/3] rebase -i: re-fix short SHA-1 collision Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: "brian m. carlson" , Alban Gruin , Eric Sunshine , Junio C Hamano , Johannes Schindelin , Johannes Schindelin Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin In 66ae9a57b88 (t3404: rebase -i: demonstrate short SHA-1 collision, 2013-08-23), we added a test case that demonstrated how it is possible that a previously unambiguous short commit ID could become ambiguous *during* a rebase. In 75c69766554 (rebase -i: fix short SHA-1 collision, 2013-08-23), we fixed that problem simply by writing out the todo list with expanded commit IDs (except *right* before letting the user edit the todo list, in which case we shorten them, but we expand them right after the file was edited). However, the bug resurfaced as a side effect of 393adf7a6f6 (sequencer: directly call pick_commits() from complete_action(), 2019-11-24): as of this commit, the sequencer no longer re-reads the todo list after writing it out with expanded commit IDs. The only redeeming factor is that the todo list is already parsed at that stage, including all the commits corresponding to the commands, therefore the sequencer can continue even if the internal todo list has short commit IDs. That does not prevent problems, though: the sequencer writes out the `done` and `git-rebase-todo` files incrementally (i.e. overwriting the todo list with a version that has _short_ commit IDs), and if a merge conflict happens, or if an `edit` or a `break` command is encountered, a subsequent `git rebase --continue` _will_ re-read the todo list, opening an opportunity for the "short SHA-1 collision" bug again. To avoid that, let's make sure that we do expand the commit IDs in the todo list as soon as we have parsed it after letting the user edit it. Additionally, we improve the 'short SHA-1 collide' test case in t3404 to test specifically for the case where the rebase is resumed. We also hard-code the expected colliding short SHA-1s, to document the expectation (and to make it easier on future readers). Note that we specifically test that the short commit ID is used in the `git-rebase-todo.tmp` file: this file is created by the fake editor in the test script and reflects the state that would have been presented to the user to edit. Signed-off-by: Johannes Schindelin --- sequencer.c | 11 ++++++++++- t/t3404-rebase-interactive.sh | 15 +++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/sequencer.c b/sequencer.c index 7c30dad59c..5f69b47e32 100644 --- a/sequencer.c +++ b/sequencer.c @@ -5076,7 +5076,7 @@ int complete_action(struct repository *r, struct replay_opts *opts, unsigned fla { const char *shortonto, *todo_file = rebase_path_todo(); struct todo_list new_todo = TODO_LIST_INIT; - struct strbuf *buf = &todo_list->buf; + struct strbuf *buf = &todo_list->buf, buf2 = STRBUF_INIT; struct object_id oid = onto->object.oid; int res; @@ -5128,6 +5128,15 @@ int complete_action(struct repository *r, struct replay_opts *opts, unsigned fla return -1; } + /* Expand the commit IDs */ + todo_list_to_strbuf(r, &new_todo, &buf2, -1, 0); + strbuf_swap(&new_todo.buf, &buf2); + strbuf_release(&buf2); + new_todo.total_nr -= new_todo.nr; + if (todo_list_parse_insn_buffer(r, new_todo.buf.buf, &new_todo) < 0) + BUG("invalid todo list after expanding IDs:\n%s", + new_todo.buf.buf); + if (opts->allow_ff && skip_unnecessary_picks(r, &new_todo, &oid)) { todo_list_release(&new_todo); return error(_("could not skip unnecessary pick commands")); diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index ae6e55ce79..1cc9f36bc7 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -1264,13 +1264,24 @@ test_expect_success SHA1 'short SHA-1 setup' ' test_expect_success SHA1 'short SHA-1 collide' ' test_when_finished "reset_rebase && git checkout master" && git checkout collide && + colliding_sha1=6bcda37 && + test $colliding_sha1 = "$(git rev-parse HEAD | cut -c 1-7)" && ( unset test_tick && test_tick && set_fake_editor && FAKE_COMMIT_MESSAGE="collide2 ac4f2ee" \ - FAKE_LINES="reword 1 2" git rebase -i HEAD~2 - ) + FAKE_LINES="reword 1 break 2" git rebase -i HEAD~2 && + test $colliding_sha1 = "$(git rev-parse HEAD | cut -c 1-7)" && + grep "^pick $colliding_sha1 " \ + .git/rebase-merge/git-rebase-todo.tmp && + grep "^pick [0-9a-f]\{40\}" \ + .git/rebase-merge/git-rebase-todo && + git rebase --continue + ) && + collide2="$(git rev-parse HEAD~1 | cut -c 1-4)" && + collide3="$(git rev-parse collide3 | cut -c 1-4)" && + test "$collide2" = "$collide3" ' test_expect_success 'respect core.abbrev' ' From patchwork Thu Jan 23 12:28:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Derrick Stolee via GitGitGadget X-Patchwork-Id: 11347603 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 575C992A for ; Thu, 23 Jan 2020 12:28:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 349CA2467B for ; Thu, 23 Jan 2020 12:28:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eB0AdoBe" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727893AbgAWM22 (ORCPT ); Thu, 23 Jan 2020 07:28:28 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:34611 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726204AbgAWM2Z (ORCPT ); Thu, 23 Jan 2020 07:28:25 -0500 Received: by mail-wm1-f66.google.com with SMTP id s144so1766326wme.1 for ; Thu, 23 Jan 2020 04:28:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=2PIaZn0KayQC43WVBeYZByX/rsKSPSl2P8+lreCea30=; b=eB0AdoBeqtLbYDR089NLv5NgQjo4KbbJtmZYAPSET92Xy7kLKtflSB8I0r3T+EVDH0 7syvSaTK3klgmOJWfTuuo1z3B91hKlps+ttY0CG3iaLfdCNVAJndzhRLh7RMO4bMcdYk UlqzKcgyc5rSzVMQmLHsNqKyIuOqtmJeJh6nVFOrK8y86bRrtqvaXzTpvzlo13wURAUC PyGujZxsuaB+hXl8tJKeWO/ACIVQMpSwYq6wZ2jjrf7nIlGrGl2fVeTapZ9sRmyTj5Jo AHG7Q+tWFyoUTMC+U+fkP+tlEdGSHG+rAn/QdisfUFwzhoa1AJVEWDu46HRXjiH01T77 Z6uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=2PIaZn0KayQC43WVBeYZByX/rsKSPSl2P8+lreCea30=; b=DgoZHpz0fX039jrAPNNfwWKIawQSQRSrqLZims3Z246qz7oOIktyDrOb+c0XkIPuh6 fxn67bJPOg6wUDs1tWf5V7c2sbTQwzm+XLXk1y5/UPXQtL0lWtKQZZLYDlY1DrB9o1aZ BAOcjlmZeI6DxC483jCdzRXrLReQKmf9TSQv1xP03Q7JUfENbzIsWF+8KFz3LpsmhKpq YZzIbVKXZy7at1DOkXGQwiw7mZgsK7e3kiK5L/jZl8KqxS44GJuP9LErbKA1fGTmx1wj CTrhtazH4mKJum+L4KGXAjMXQRZ5bGcgqcGmd3DiwGgsBXu1M0O8IFlO78F24ogGb6/e 2w6g== X-Gm-Message-State: APjAAAWS0GTtYk8RJIm3mpgbMbsDytQtW6kp8ZnMosYYZuxx7LC8QtSU SaltyyjKJF19v+vAOFyunAofE28j X-Google-Smtp-Source: APXvYqzkBomktF/uAC2PmRax3283/gyeWqoK2QDNpbqcHP0linc65mU3tezm8Uw2ad9l645t5/3CCQ== X-Received: by 2002:a7b:cd87:: with SMTP id y7mr4050997wmj.61.1579782503099; Thu, 23 Jan 2020 04:28:23 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id d8sm2728804wrx.71.2020.01.23.04.28.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jan 2020 04:28:22 -0800 (PST) Message-Id: In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Date: Thu, 23 Jan 2020 12:28:19 +0000 Subject: [PATCH v3 3/3] rebase -i: also avoid SHA-1 collisions with missingCommitsCheck Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: "brian m. carlson" , Alban Gruin , Eric Sunshine , Junio C Hamano , Johannes Schindelin , Johannes Schindelin Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin When `rebase.missingCommitsCheck` is in effect, we use the backup of the todo list that was copied just before the user was allowed to edit it. That backup is, of course, just as susceptible to the hash collision as the todo list itself: a reworded commit could make a previously unambiguous short commit ID ambiguous all of a sudden. So let's not just copy the todo list, but let's instead write out the backup with expanded commit IDs. Signed-off-by: Johannes Schindelin --- rebase-interactive.c | 8 +++++--- t/t3404-rebase-interactive.sh | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/rebase-interactive.c b/rebase-interactive.c index aa18ae82b7..1259adc8ea 100644 --- a/rebase-interactive.c +++ b/rebase-interactive.c @@ -104,9 +104,11 @@ int edit_todo_list(struct repository *r, struct todo_list *todo_list, -1, flags | TODO_LIST_SHORTEN_IDS | TODO_LIST_APPEND_TODO_HELP)) return error_errno(_("could not write '%s'"), todo_file); - if (initial && copy_file(rebase_path_todo_backup(), todo_file, 0666)) - return error(_("could not copy '%s' to '%s'."), todo_file, - rebase_path_todo_backup()); + if (initial && + todo_list_write_to_file(r, todo_list, rebase_path_todo_backup(), + shortrevisions, shortonto, -1, + (flags | TODO_LIST_APPEND_TODO_HELP) & ~TODO_LIST_SHORTEN_IDS) < 0) + return error(_("could not write '%s'."), rebase_path_todo_backup()); if (launch_sequence_editor(todo_file, &new_todo->buf, NULL)) return -2; diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index 1cc9f36bc7..b90ea0fe44 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -1277,6 +1277,8 @@ test_expect_success SHA1 'short SHA-1 collide' ' .git/rebase-merge/git-rebase-todo.tmp && grep "^pick [0-9a-f]\{40\}" \ .git/rebase-merge/git-rebase-todo && + grep "^pick [0-9a-f]\{40\}" \ + .git/rebase-merge/git-rebase-todo.backup && git rebase --continue ) && collide2="$(git rev-parse HEAD~1 | cut -c 1-4)" &&