From 1d14d0c9949c02260fe4f8b3a54a1b5c605823a2 Mon Sep 17 00:00:00 2001 From: Vishal Verma Date: Fri, 24 May 2019 12:36:17 -0600 Subject: merge: refuse --commit with --squash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Convert option_commit to tristate, representing the states of 'default/untouched', 'enabled-by-cli', 'disabled-by-cli'. With this in place, check whether option_commit was enabled by cli when squashing a merge. If so, error out, as this is not supported. Previously, when --squash was supplied, 'option_commit' was silently dropped. This could have been surprising to a user who tried to override the no-commit behavior of squash using --commit explicitly. Add a note to the --squash option for git-merge to clarify the incompatibility, and add a test case to t7600-merge.sh Cc: Junio C Hamano Cc: Rafael Ascensão Cc: Johannes Schindelin Signed-off-by: Vishal Verma Signed-off-by: Junio C Hamano --- Documentation/merge-options.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Documentation/merge-options.txt') diff --git a/Documentation/merge-options.txt b/Documentation/merge-options.txt index 63a3fc0954..a147d436ed 100644 --- a/Documentation/merge-options.txt +++ b/Documentation/merge-options.txt @@ -90,6 +90,8 @@ merge. + With --no-squash perform the merge and commit the result. This option can be used to override --squash. ++ +With --squash, --commit is not allowed, and will fail. -s :: --strategy=:: -- cgit v1.2.3