commit 543bec4ff9437a6e01b7e86770938007190e52df from: Stefan Sperling date: Fri Jul 22 20:58:45 2022 UTC make 'got histedit' fetch author info from Git configuration as a fallback commit - 50e7a649ac62e04706162f1e9b7b37e7485fc7ca commit + 543bec4ff9437a6e01b7e86770938007190e52df blob - 802e8d33b5cc2470f76a85b5a09648dfdcaceed3 blob + 8546c7cf32d663cd5a666d40d2f858885cac2483 --- got/got.c +++ got/got.c @@ -11260,7 +11260,7 @@ cmd_histedit(int argc, char *argv[]) struct got_worktree *worktree = NULL; struct got_fileindex *fileindex = NULL; struct got_repository *repo = NULL; - char *cwd = NULL, *committer = NULL; + char *cwd = NULL, *committer = NULL, *gitconfig_path = NULL; struct got_reference *branch = NULL; struct got_reference *tmp_branch = NULL; struct got_object_id *resume_commit_id = NULL; @@ -11435,8 +11435,11 @@ cmd_histedit(int argc, char *argv[]) goto done; /* nothing else to do */ } + error = get_gitconfig_path(&gitconfig_path); + if (error) + goto done; error = got_repo_open(&repo, got_worktree_get_repo_path(worktree), - NULL, pack_fds); + gitconfig_path, pack_fds); if (error != NULL) goto done; @@ -11795,6 +11798,7 @@ cmd_histedit(int argc, char *argv[]) done: free(cwd); free(committer); + free(gitconfig_path); got_object_id_queue_free(&commits); histedit_free_list(&histedit_cmds); free(head_commit_id);