mirror of
https://github.com/git/git
synced 2024-09-12 21:04:12 +00:00
merge: force edit and no-ff mode when merging a tag object
Now that we allow pulling a tag from the remote site to validate the authenticity, we should give the user the final chance to verify and edit the merge message. The integrator is expected to leave a meaningful merge commit log in the history. Disallow fast-forwarding in such a case to ensure that a merge commit is always recorded. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
5231c633f2
commit
fab47d0575
|
@ -1253,6 +1253,12 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
|
||||||
sha1_to_hex(commit->object.sha1));
|
sha1_to_hex(commit->object.sha1));
|
||||||
setenv(buf.buf, argv[i], 1);
|
setenv(buf.buf, argv[i], 1);
|
||||||
strbuf_reset(&buf);
|
strbuf_reset(&buf);
|
||||||
|
if (merge_remote_util(commit) &&
|
||||||
|
merge_remote_util(commit)->obj &&
|
||||||
|
merge_remote_util(commit)->obj->type == OBJ_TAG) {
|
||||||
|
option_edit = 1;
|
||||||
|
allow_fast_forward = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!use_strategies) {
|
if (!use_strategies) {
|
||||||
|
|
Loading…
Reference in a new issue