Commit Diff


commit - bb787f0904b277323c9eed7a015bad19b89caad3
commit + a698f62e1bd91bd51649d4d59a2a1dbddf871d2b
blob - 6bfe01e0cf9d122e717e568966eb3ac3f555b1f9
blob + 2c291f507939edc02c7fa308c8261ffdbf9def39
--- got/got.1
+++ got/got.1
@@ -703,7 +703,7 @@ character are ignored entirely.
 The available commands are as follows:
 .Bl -column YXZ pick-commit
 .It pick Ar commit Ta Use the specified commit as it is.
-.It edit Ar commit Ta Use the specfified commit but once changes have been
+.It edit Ar commit Ta Use the specified commit but once changes have been
 merged into the work tree interrupt the histedit operation for amending.
 .It fold Ar commit Ta Combine the specified commit with the next commit
 listed further below that will be used.
@@ -758,11 +758,11 @@ path prefix, the work tree cannot be used to edit the 
 .Pp
 The
 .Cm got update
-and
+command will refuse to run while a histedit operation is in progress.
+Other commands which manipulate the work tree may be used, and the
 .Cm got commit
-commands will refuse to run while a histedit operation is in progress.
-Other commands which manipulate the work tree may be used for
-conflict resolution purposes.
+command may be used to commit arbitrary changes to the temporary branch
+while the histedit operation is interrupted.
 .Pp
 The options for
 .Cm got histedit
blob - 809cd0f8e06311739a9dcc37dbc9064641b509b9
blob + 88bc0e3e86d51e3e1346018b678162df6f6958ce
--- got/got.c
+++ got/got.c
@@ -3176,7 +3176,7 @@ cmd_commit(int argc, char *argv[])
 	const char *got_author = getenv("GOT_AUTHOR");
 	struct collect_commit_logmsg_arg cl_arg;
 	char *editor = NULL;
-	int ch;
+	int ch, rebase_in_progress;
 
 	while ((ch = getopt(argc, argv, "m:")) != -1) {
 		switch (ch) {
@@ -3222,9 +3222,13 @@ cmd_commit(int argc, char *argv[])
 	if (error)
 		goto done;
 
-	error = check_rebase_or_histedit_in_progress(worktree);
+	error = got_worktree_rebase_in_progress(&rebase_in_progress, worktree);
 	if (error)
+		goto done;
+	if (rebase_in_progress) {
+		error = got_error(GOT_ERR_REBASING);
 		goto done;
+	}
 
 	error = got_repo_open(&repo, got_worktree_get_repo_path(worktree));
 	if (error != NULL)