Commit c3022ba5fc09b6badac00b8c123aad9d45c2e039

Stefan Sperling 2019-07-27T22:15:05

rename "histedit list" to "histedit script" (on-disk filename changed)

diff --git a/got/got.c b/got/got.c
index c926775..2f130ca 100644
--- a/got/got.c
+++ b/got/got.c
@@ -4535,7 +4535,7 @@ histedit_save_list(struct got_histedit_list *histedit_cmds,
 	struct got_histedit_list_entry *hle;
 	struct got_commit_object *commit = NULL;
 
-	err = got_worktree_get_histedit_list_path(&path, worktree);
+	err = got_worktree_get_histedit_script_path(&path, worktree);
 	if (err)
 		return err;
 
@@ -4892,7 +4892,7 @@ cmd_histedit(int argc, char *argv[])
 			goto done;
 		}
 
-		error = got_worktree_get_histedit_list_path(&path, worktree);
+		error = got_worktree_get_histedit_script_path(&path, worktree);
 		if (error)
 			goto done;
 
diff --git a/include/got_worktree.h b/include/got_worktree.h
index 0a7f10b..105bebd 100644
--- a/include/got_worktree.h
+++ b/include/got_worktree.h
@@ -369,6 +369,6 @@ const struct got_error *got_worktree_histedit_abort(struct got_worktree *,
     struct got_fileindex *, struct got_repository *, struct got_reference *,
     struct got_object_id *, got_worktree_checkout_cb, void *);
 
-/* Get the path to this work tree's histedit command list file. */
-const struct got_error *got_worktree_get_histedit_list_path(char **,
+/* Get the path to this work tree's histedit script file. */
+const struct got_error *got_worktree_get_histedit_script_path(char **,
     struct got_worktree *);
diff --git a/lib/got_lib_worktree.h b/lib/got_lib_worktree.h
index 2a06260..f7db624 100644
--- a/lib/got_lib_worktree.h
+++ b/lib/got_lib_worktree.h
@@ -57,7 +57,7 @@ struct got_commitable {
 #define GOT_WORKTREE_LOCK		"lock"
 #define GOT_WORKTREE_FORMAT		"format"
 #define GOT_WORKTREE_UUID		"uuid"
-#define GOT_WORKTREE_HISTEDIT_LIST	"histedit-list"
+#define GOT_WORKTREE_HISTEDIT_SCRIPT	"histedit-script"
 
 #define GOT_WORKTREE_FORMAT_VERSION	1
 #define GOT_WORKTREE_INVALID_COMMIT_ID	GOT_SHA1_STRING_ZERO
diff --git a/lib/worktree.c b/lib/worktree.c
index 4f7c0c9..83d8f86 100644
--- a/lib/worktree.c
+++ b/lib/worktree.c
@@ -1465,10 +1465,11 @@ get_histedit_commit_ref_name(char **refname, struct got_worktree *worktree)
 }
 
 const struct got_error *
-got_worktree_get_histedit_list_path(char **path, struct got_worktree *worktree)
+got_worktree_get_histedit_script_path(char **path,
+    struct got_worktree *worktree)
 {
 	if (asprintf(path, "%s/%s/%s", worktree->root_path,
-	    GOT_WORKTREE_GOT_DIR, GOT_WORKTREE_HISTEDIT_LIST) == -1) {
+	    GOT_WORKTREE_GOT_DIR, GOT_WORKTREE_HISTEDIT_SCRIPT) == -1) {
 		*path = NULL;
 		return got_error_from_errno("asprintf");
 	}