Commit Diff


commit - a698f62e1bd91bd51649d4d59a2a1dbddf871d2b
commit + ff6aa2066572b63f8a0e3a8df060f9b2baceca38
blob - 88bc0e3e86d51e3e1346018b678162df6f6958ce
blob + 4cbbcf13878ea9a4b0c7d57bbfe05dccd973bb7a
--- got/got.c
+++ got/got.c
@@ -4669,7 +4669,8 @@ histedit_check_script(struct got_histedit_list *histed
 	char *id_str;
 
 	if (TAILQ_EMPTY(histedit_cmds))
-		return got_error(GOT_ERR_EMPTY_HISTEDIT);
+		return got_error_msg(GOT_ERR_EMPTY_HISTEDIT,
+		    "histedit script contains no commands");
 
 	SIMPLEQ_FOREACH(qid, commits, entry) {
 		TAILQ_FOREACH(hle, histedit_cmds, entry) {
blob - d0bace45d8f76abfa251a30f171c1a71a9d76aab
blob + 37595c5216a30ac7f817772e3493b9b38e9fa5c7
--- include/got_error.h
+++ include/got_error.h
@@ -215,7 +215,8 @@ static const struct got_error {
 	{ GOT_ERR_REBASE_PATH,	"cannot rebase branch which contains "
 	    "changes outside of this work tree's path prefix" },
 	{ GOT_ERR_NOT_HISTEDIT,	"histedit operation not in progress" },
-	{ GOT_ERR_EMPTY_HISTEDIT,"no commits to edit" },
+	{ GOT_ERR_EMPTY_HISTEDIT,"no commits to edit; perhaps the work tree "
+	    "must be updated to an older commit first" },
 	{ GOT_ERR_NO_HISTEDIT_CMD,"no histedit commands provided" },
 	{ GOT_ERR_HISTEDIT_SYNTAX,"syntax error in histedit command list" },
 	{ GOT_ERR_HISTEDIT_CANCEL,"histedit operation cancelled" },