Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 19/17] merge: do not fast-forward when merging a tag

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:52:27
Subsystem: the rest · Maintainer: Linus Torvalds

Merging a signed or an annotated tag is meant to trigger the editor for
the integrator to leave a meaningful merge commit log in the history.
Disallow fast-forwarding the merge in such a case to ensure that a merge
commit is always recorded.

Signed-off-by: Junio C Hamano <redacted>
---
 builtin/merge.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/builtin/merge.c b/builtin/merge.c
index 3b3e374..99f1429 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -1255,8 +1255,10 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
 		strbuf_reset(&buf);
 		if (merge_remote_util(commit) &&
 		    merge_remote_util(commit)->obj &&
-		    merge_remote_util(commit)->obj->type == OBJ_TAG)
+		    merge_remote_util(commit)->obj->type == OBJ_TAG) {
 			option_edit = 1;
+			allow_fast_forward = 0;
+		}
 	}
 
 	if (!use_strategies) {
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help