• Andrew Pimlott's avatar
    rebase -i: handle fixup! fixup! in --autosquash · 22c5b136
    Andrew Pimlott authored
    In rebase -i --autosquash, ignore all "fixup! " or "squash! " after the
    first.  This supports the case when a git commit --fixup/--squash referred
    to an earlier fixup/squash instead of the original commit (whether
    intentionally, as when the user expressly meant to note that the commit
    fixes an earlier fixup; or inadvertently, as when the user meant to refer to
    the original commit with :/msg; or out of laziness, as when the user could
    remember how to refer to the fixup but not the original).
    
    In the todo list, the full commit message is preserved, in case it provides
    useful cues to the user.  A test helper set_cat_todo_editor is introduced to
    check this.
    Helped-by: default avatarThomas Rast <trast@inf.ethz.ch>
    Helped-by: default avatarJunio C Hamano <gitster@pobox.com>
    Signed-off-by: default avatarAndrew Pimlott <andrew@pimlott.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    22c5b136
t3415-rebase-autosquash.sh 6.4 KB