Thread (11 messages) flat view 11 messages, 2 authors, 2016-06-15

Re: [PATCHv6 5/6] commit: --squash option for use with rebase --autosquash

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:49:55

"Pat Notz" [off-list ref] writes:
quoted hunk ↗ jump to hunk
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help