rename "histedit list" to "histedit script" (on-disk filename changed)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
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");
}