{"thread":{"id":"11098","subject":"git-merge --no-commit commits","startedAt":"2007-12-02T16:57:38Z","lastAt":"2007-12-02T18:00:09Z","messageCount":4,"participants":["Vegard Nossum","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"61657","messageId":"19f34abd0712020857m757c57cfr358a81e47f38fac8@mail.gmail.com","threadId":"11098","inReplyTo":null,"subject":"git-merge --no-commit commits","fromName":"Vegard Nossum","fromEmail":"vegard.nossum@gmail.com","sentAt":"2007-12-02T16:57:38Z","receivedAt":"2007-12-02T16:57:38Z","isPatch":false,"sender":{"key":"vegard.nossum@gmail.com","avatar":null},"body":"Hi,\n\nI am using git 1.5.3.4 and just did the following (v1 and v2 are\nbranches; v1 is a parent of v2):\n\ngit checkout v1\ngit merge --no-commit v2\n\nIt simply fast-forwarded AND committed even though I explicitly told\nit not to. What gives?\n\nKind regards,\nVegard Nossum\n"},{"id":"61659","messageId":"m3bq99vx7t.fsf@roke.D-201","threadId":"11098","inReplyTo":"19f34abd0712020857m757c57cfr358a81e47f38fac8@mail.gmail.com","subject":"Re: git-merge --no-commit commits","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-12-02T17:10:51Z","receivedAt":"2007-12-02T17:10:51Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"\"Vegard Nossum\" <vegard.nossum@gmail.com> writes:\n\n> I am using git 1.5.3.4 and just did the following (v1 and v2 are\n> branches; v1 is a parent of v2):\n> \n> git checkout v1\n> git merge --no-commit v2\n> \n> It simply fast-forwarded AND committed even though I explicitly told\n> it not to. What gives?\n\nThe --no-commit option doesn't prevent fast-forward because\nfast-forward doesn't really _create_ a commit (and -no-commit is\nreally about commit creation). It just advanced ref (branch head).\n\nYou probably wanted to use\n\n  $ git merge --no-commit --no-ff v2\n\nHTH\n-- \nJakub Narebski\nShadeHawk on #git\nPoland\n"},{"id":"61660","messageId":"19f34abd0712020918w1640389kb0ca006b2051a678@mail.gmail.com","threadId":"11098","inReplyTo":"m3bq99vx7t.fsf@roke.D-201","subject":"Re: git-merge --no-commit commits","fromName":"Vegard Nossum","fromEmail":"vegard.nossum@gmail.com","sentAt":"2007-12-02T17:18:22Z","receivedAt":"2007-12-02T17:18:22Z","isPatch":false,"sender":{"key":"vegard.nossum@gmail.com","avatar":null},"body":"On Dec 2, 2007 6:10 PM, Jakub Narebski <jnareb@gmail.com> wrote:\n> \"Vegard Nossum\" <vegard.nossum@gmail.com> writes:\n>\n> > I am using git 1.5.3.4 and just did the following (v1 and v2 are\n> > branches; v1 is a parent of v2):\n> >\n> > git checkout v1\n> > git merge --no-commit v2\n> >\n> > It simply fast-forwarded AND committed even though I explicitly told\n> > it not to. What gives?\n>\n> The --no-commit option doesn't prevent fast-forward because\n> fast-forward doesn't really _create_ a commit (and -no-commit is\n> really about commit creation). It just advanced ref (branch head).\n>\n> You probably wanted to use\n>\n>   $ git merge --no-commit --no-ff v2\n>\n\nYes. Thanks. Isn't that counter-intuitive, though? The manpage says\nthat it lets you review the changes first. I assumed this would\ninclude fast-forwarding as well. There is no --no-ff in my git-merge\nmanpage. Maybe I need a newer version?\n\n> HTH\n> --\n> Jakub Narebski\n> ShadeHawk on #git\n> Poland\n>\n\nVegard\n"},{"id":"61665","messageId":"200712021900.10295.jnareb@gmail.com","threadId":"11098","inReplyTo":"19f34abd0712020918w1640389kb0ca006b2051a678@mail.gmail.com","subject":"Re: git-merge --no-commit commits","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-12-02T18:00:09Z","receivedAt":"2007-12-02T18:00:09Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"On Sun, 2 Dec 2007, Vegard Nossum wrote:\n> On Dec 2, 2007 6:10 PM, Jakub Narebski <jnareb@gmail.com> wrote:\n>> \"Vegard Nossum\" <vegard.nossum@gmail.com> writes:\n>>\n>>> I am using git 1.5.3.4 and just did the following (v1 and v2 are\n>>> branches; v1 is a parent of v2):\n>>>\n>>> git checkout v1\n>>> git merge --no-commit v2\n>>>\n>>> It simply fast-forwarded AND committed even though I explicitly told\n>>> it not to. What gives?\n>>\n>> The --no-commit option doesn't prevent fast-forward because\n>> fast-forward doesn't really _create_ a commit (and -no-commit is\n>> really about commit creation). It just advanced ref (branch head).\n>>\n>> You probably wanted to use\n>>\n>>   $ git merge --no-commit --no-ff v2\n> \n> Yes. Thanks. Isn't that counter-intuitive, though? The manpage says\n> that it lets you review the changes first. I assumed this would\n> include fast-forwarding as well. \n\nBut for fast-forward there are no \"changes\" to review. Just updating\nbranch head. Fast-forward means no new commit.\n\n> There is no --no-ff in my git-merge \n> manpage. Maybe I need a newer version?\n\nIt looks like it is not in any released version. I've found description\nin 'master' version of Documentation/merge-options.txt\n-- \nJakub Narebski\nPoland\n"}]}