commit c5996fffdf906ace91b9ec3e51dcb23eb806e187 from: Stefan Sperling date: Wed Jan 29 12:47:13 2020 UTC perform the check for an empty histedit commit list earlier commit - ab20a43a2f9d75f0398a92f4d1f3eda36abb6d15 commit + c5996fffdf906ace91b9ec3e51dcb23eb806e187 blob - 4e1dee690e942d03c1cd480204e1b22fddfcd415 blob + 676510ca36e3cd77c409fb5ebb45aab2b990ea76 --- got/got.c +++ got/got.c @@ -6536,6 +6536,11 @@ cmd_histedit(int argc, char *argv[]) if (error) goto done; + if (SIMPLEQ_EMPTY(&commits)) { + error = got_error(GOT_ERR_EMPTY_HISTEDIT); + goto done; + } + error = got_worktree_histedit_prepare(&tmp_branch, &branch, &base_commit_id, &fileindex, worktree, repo); if (error)