{"thread":{"id":"45519","subject":"--no-commit option does not work.","startedAt":"2017-03-26T23:58:18Z","lastAt":"2017-03-27T05:44:35Z","messageCount":2,"participants":["BongHo Lee","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"315490","messageId":"CY4PR14MB1238D2E5D35E99405AA8BF61CB300@CY4PR14MB1238.namprd14.prod.outlook.com","threadId":"45519","inReplyTo":"CY4PR14MB1238A8AC2BFECB56B9B68056CB300@CY4PR14MB1238.namprd14.prod.outlook.com","subject":"--no-commit option does not work.","fromName":"BongHo Lee","fromEmail":"techcap@live.com","sentAt":"2017-03-26T23:57:07Z","receivedAt":"2017-03-26T23:58:18Z","isPatch":false,"sender":{"key":"techcap@live.com","avatar":null},"body":"Setup\nVersion : git version 2.12.1.windows.1\n\nOS Version : Microsoft Windows [Version 10.0.14393]\n\nOptions \n$ cat /etc/install-options.txt\nPath Option: Cmd\nSSH Option: OpenSSH\nCURL Option: OpenSSL\nCRLF Option: CRLFCommitAsIs\nBash Terminal Option: MinTTY\nPerformance Tweaks FSCache: Enabled\nUse Credential Manager: Enabled\nEnable Symlinks: Disabled\n\n\nGit Command : git merge --no-commit origin/workingBranch\n\n. What did you expect to occur after running these commands?\nmerge but no commit.\n. What actually happened instead?\ncommited\n\nReference URL : https://github.com/techcap/nf-interpreter\n\nDetails\nI tried to merge from MergeTest to master.\nAfter checking out master, I run below command.\n\nC:\\work\\nf-interpreter-techcap>git branch\n  MergeTest\n  TemplateModification\n  UpdateBuildInstruction\n* master\n\nC:\\work\\nf-interpreter-techcap>git merge --no-commit origin/MergeTest\nUpdating 197ad33..028f9f5\nFast-forward\nmergeTest.txt | 1 +\n1 file changed, 1 insertion(+)\ncreate mode 100644 mergeTest.txt\n\nC:\\work\\nf-interpreter-techcap>git status\nOn branch master\nYour branch is ahead of 'origin/master' by 1 commit.\n  (use \"git push\" to publish your local commits)\nnothing to commit, working tree clean\n\nIf I add --no-ff option, it works properly.\nI think --no-commit option should be worked without --no-ff.\n\nhttps://github.com/git-for-windows/git/issues/1102#issuecomment-289206961\n"},{"id":"315500","messageId":"xmqqfuhz2s0a.fsf@gitster.mtv.corp.google.com","threadId":"45519","inReplyTo":"CY4PR14MB1238D2E5D35E99405AA8BF61CB300@CY4PR14MB1238.namprd14.prod.outlook.com","subject":"Re: --no-commit option does not work.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-03-27T05:44:21Z","receivedAt":"2017-03-27T05:44:35Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"BongHo Lee <techcap@live.com> writes:\n\n> If I add --no-ff option, it works properly.\n> I think --no-commit option should be worked without --no-ff.\n\nIt is understandable that this is confusing, but --no-commit is an\ninstruction not to create a new commit object.  As fast-forwarding\nto the commit that is a strict descendant of your old tip does not\ninvolve creation of any new commit, the command is working exactly\nas instructed.  If you say \"--no-ff\", you are explicitly forbidding\nthe command to fast-forward, so the command attempts to create a\n(needless) new commit that is a merge, and then --no-commit stops\nthe command after it prepared the tree state ready to be committed.\n\nSo with or without --no-ff, the option and the command are working\ncorrectly.\n\nHaving said all that, my gut feeling is that a backward incompatible\nchange to make --no-commit \"imply\" --no-ff may not hurt too many\nexisting users, but I am saying this without thinking things through.\nI may very well be missing a valid use case where --no-commit that\ndoes not fail but does fast-forward when the user does not give --no-ff\nis useful, so if that is the case, such a change will be breaking\nthose users.\n\n"}]}