Commit Diff


commit - 65db4ffb3adb537c4258731721f250ee99b9d13c
commit + 7ef62c4e3e891c47d0449ca61fcb3fa35a98ec51
blob - f40d55e304298e98916a2bc0e66a0f886ea171bb
blob + 97deeedc9651bb3ad1a7a5765d7e0b80c0b45c0d
--- got/got.1
+++ got/got.1
@@ -1119,7 +1119,8 @@ If the edited history contains changes to files outsid
 path prefix, the work tree cannot be used to edit the history of this branch.
 .Pp
 The
-.Cm got update
+.Cm got update ,
+.Cm got rebase ,
 and
 .Cm got integrate
 commands will refuse to run while a histedit operation is in progress.
blob - 29a1cd66bc29f275ce5a281897b333c512af0187
blob + e00e812e2ac5cde3d663337e128b71efcbdda330
--- got/got.c
+++ got/got.c
@@ -5362,6 +5362,7 @@ cmd_rebase(int argc, char *argv[])
 	struct got_object_id *branch_head_commit_id = NULL, *yca_id = NULL;
 	struct got_commit_object *commit = NULL;
 	int ch, rebase_in_progress = 0, abort_rebase = 0, continue_rebase = 0;
+	int histedit_in_progress = 0;
 	unsigned char rebase_status = GOT_STATUS_NO_CHANGE;
 	struct got_object_id_queue commits;
 	struct got_pathlist_head merged_paths;
@@ -5417,8 +5418,17 @@ cmd_rebase(int argc, char *argv[])
 
 	error = apply_unveil(got_repo_get_path(repo), 0,
 	    got_worktree_get_root_path(worktree));
+	if (error)
+		goto done;
+
+	error = got_worktree_histedit_in_progress(&histedit_in_progress,
+	    worktree);
 	if (error)
+		goto done;
+	if (histedit_in_progress) {
+		error = got_error(GOT_ERR_HISTEDIT_BUSY);
 		goto done;
+	}
 
 	error = got_worktree_rebase_in_progress(&rebase_in_progress, worktree);
 	if (error)