From: Junio C Hamano Date: Wed, 27 Oct 2010 22:35:59 GMT Subject: Re: [PATCHv6 5/6] commit: --squash option for use with rebase --autosquash Message-ID: <7veibbb6wg.fsf@alter.siamese.dyndns.org> In-Reply-To: <1287689637-95301-6-git-send-email-patnotz@gmail.com> "Pat Notz" writes: > 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.