Re: [PATCHv6 5/6] commit: --squash option for use with rebase --autosquash
"Pat Notz" <patnotz@gmail.com> writes:
Show 18 quoted lines
> diff --git a/builtin/commit.c b/builtin/commit.c
> index c82108c..0608b76 100644
> --- a/builtin/commit.c
> +++ b/builtin/commit.c
> @@ -567,6 +568,23 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
> if (!no_verify && run_hook(index_file, "pre-commit", NULL))
> return 0;
>
> + if (squash_message) {
> + /*
> + * Insert the proper subject line before other commit
> + * message options add their content.
> + */
> + struct pretty_print_context ctx = {0};
> + struct commit *commit;
> + const char *out_enc;
> + commit = lookup_commit_reference_by_name(squash_message);
> + out_enc = get_commit_output_encoding();Same comment as the one for 3/6 applies here.