diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-11-07 16:29:34 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-11-09 10:29:42 -0800 |
commit | fab47d057559301c74d6642576694fd251a3fd11 (patch) | |
tree | fc15537de16edab4ae239e86c509ad3fc05c716c /builtin | |
parent | commit: copy merged signed tags to headers of merge commit (diff) | |
download | tgif-fab47d057559301c74d6642576694fd251a3fd11.tar.xz |
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>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/merge.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/builtin/merge.c b/builtin/merge.c index 7158e8e2d2..99f1429b35 100644 --- a/builtin/merge.c +++ b/builtin/merge.c @@ -1253,6 +1253,12 @@ int cmd_merge(int argc, const char **argv, const char *prefix) sha1_to_hex(commit->object.sha1)); setenv(buf.buf, argv[i], 1); 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) { |