{"thread":{"id":"6522","subject":"git merge FETCH_HEAD produced bad commit message","startedAt":"2007-01-25T14:52:29Z","lastAt":"2007-01-26T14:42:46Z","messageCount":5,"participants":["Michael S. Tsirkin","Alex Riesen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"32608","messageId":"20070125145229.GE25265@mellanox.co.il","threadId":"6522","inReplyTo":null,"subject":"git merge FETCH_HEAD produced bad commit message","fromName":"Michael S. Tsirkin","fromEmail":"mst@mellanox.co.il","sentAt":"2007-01-25T14:52:29Z","receivedAt":"2007-01-25T14:52:29Z","isPatch":false,"sender":{"key":"mst@kernel.org","avatar":null},"body":"Hi!\nI like to do\n\t$git fetch <URL>\n\n\t$git log FETCH_HEAD\n\t\n\t$git merge FETCH_HEAD\n\nI would expect this to be equivalent to\n\n\tgit pull <URL>\n\t\nHowever, the message that git merge produces in this case\nis less than informative:\n\ncommit 3c11f564846227d80aa76b579c974913c3602862\nMerge: 9871244... f5e6d63...\nAuthor: Michael S. Tsirkin <mst@mellanox.co.il>\nDate:   Thu Jan 25 16:46:51 2007 +0200\n\n    Merge commit 'FETCH_HEAD' into ofed_1_2\n\nI note that FETCH_HEAD actually has the information on where\nthe commit came from:\n$cat .git/FETCH_HEAD\nf5e6d63839970f4785c36b6be3835f037e74195c ssh://<hidden>/usr/src/ofed_1_2\n\nSo can not git merge be enhanced to put this data in commit log?\n\n-- \nMST\n"},{"id":"32699","messageId":"81b0412b0701260102j7d1c44d5nd5aa489cb8312722@mail.gmail.com","threadId":"6522","inReplyTo":"20070125145229.GE25265@mellanox.co.il","subject":"Re: git merge FETCH_HEAD produced bad commit message","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-01-26T09:02:17Z","receivedAt":"2007-01-26T09:02:17Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On 1/25/07, Michael S. Tsirkin <mst@mellanox.co.il> wrote:\n> Hi!\n> I like to do\n>         $git fetch <URL>\n>\n>         $git log FETCH_HEAD\n>\n>         $git merge FETCH_HEAD\n>\n> I would expect this to be equivalent to\n>\n>         git pull <URL>\n>\n> However, the message that git merge produces in this case\n> is less than informative:\n>\n> commit 3c11f564846227d80aa76b579c974913c3602862\n> Merge: 9871244... f5e6d63...\n> Author: Michael S. Tsirkin <mst@mellanox.co.il>\n> Date:   Thu Jan 25 16:46:51 2007 +0200\n>\n>     Merge commit 'FETCH_HEAD' into ofed_1_2\n>\n> I note that FETCH_HEAD actually has the information on where\n> the commit came from:\n> $cat .git/FETCH_HEAD\n> f5e6d63839970f4785c36b6be3835f037e74195c ssh://<hidden>/usr/src/ofed_1_2\n>\n> So can not git merge be enhanced to put this data in commit log?\n>\n\nDoes it need to?\nIs the below enough (could be line-wrapped):\n\ngit merge --no-commit FETCH_HEAD && \\\ngit commit -M \"Merge $(cut -d ' ' -f 2- < $(git rev-parse\n--git-dir)/FETCH_HEAD) \\\ninto $(git name-rev HEAD | cut -d ' ' -f 2-)\"\n\nIn the long run you'll almost certainly find this commit message\nuseless, though.\n"},{"id":"32739","messageId":"20070126142420.GO10812@mellanox.co.il","threadId":"6522","inReplyTo":"81b0412b0701260102j7d1c44d5nd5aa489cb8312722@mail.gmail.com","subject":"Re: git merge FETCH_HEAD produced bad commit message","fromName":"Michael S. Tsirkin","fromEmail":"mst@mellanox.co.il","sentAt":"2007-01-26T14:24:20Z","receivedAt":"2007-01-26T14:24:20Z","isPatch":false,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> Quoting Alex Riesen <raa.lkml@gmail.com>:\n> Subject: Re: git merge FETCH_HEAD produced bad commit message\n> \n> On 1/25/07, Michael S. Tsirkin <mst@mellanox.co.il> wrote:\n> > Hi!\n> > I like to do\n> >         $git fetch <URL>\n> >\n> >         $git log FETCH_HEAD\n> >\n> >         $git merge FETCH_HEAD\n> >\n> > I would expect this to be equivalent to\n> >\n> >         git pull <URL>\n> >\n> > However, the message that git merge produces in this case\n> > is less than informative:\n> >\n> > commit 3c11f564846227d80aa76b579c974913c3602862\n> > Merge: 9871244... f5e6d63...\n> > Author: Michael S. Tsirkin <mst@mellanox.co.il>\n> > Date:   Thu Jan 25 16:46:51 2007 +0200\n> >\n> >     Merge commit 'FETCH_HEAD' into ofed_1_2\n> >\n> > I note that FETCH_HEAD actually has the information on where\n> > the commit came from:\n> > $cat .git/FETCH_HEAD\n> > f5e6d63839970f4785c36b6be3835f037e74195c ssh://<hidden>/usr/src/ofed_1_2\n> >\n> > So can not git merge be enhanced to put this data in commit log?\n> >\n> \n> Does it need to?\n\nFETCH_HEAD is not a real head name, so I think the message above is a bug.\n\n> Is the below enough (could be line-wrapped):\n> \n> git merge --no-commit FETCH_HEAD && \\\n> git commit -M \"Merge $(cut -d ' ' -f 2- < $(git rev-parse\n> --git-dir)/FETCH_HEAD) \\\n> into $(git name-rev HEAD | cut -d ' ' -f 2-)\"\n\nOr I can just commit --amend and edit it manually.\nBut that's not the point.\n\n> In the long run you'll almost certainly find this commit message\n> useless, though.\n\nIsn't 'Merge ssh://<hidden>/usr/src/ofed_1_2 info ofed_1_2' much more\nuseful than Merge commit 'FETCH_HEAD'?\n\n-- \nMST\n"},{"id":"32742","messageId":"81b0412b0701260632l2181ef10i8d49ee9a795228b7@mail.gmail.com","threadId":"6522","inReplyTo":"20070126142420.GO10812@mellanox.co.il","subject":"Re: git merge FETCH_HEAD produced bad commit message","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-01-26T14:32:41Z","receivedAt":"2007-01-26T14:32:41Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On 1/26/07, Michael S. Tsirkin <mst@mellanox.co.il> wrote:\n> > Does it need to?\n>\n> FETCH_HEAD is not a real head name, so I think the message above is a bug.\n>\n\nFor whatever Git cares - it is a real reference.\n\n> > Is the below enough (could be line-wrapped):\n> >\n> > git merge --no-commit FETCH_HEAD && \\\n> > git commit -M \"Merge $(cut -d ' ' -f 2- < $(git rev-parse\n> > --git-dir)/FETCH_HEAD) \\\n> > into $(git name-rev HEAD | cut -d ' ' -f 2-)\"\n>\n> Or I can just commit --amend and edit it manually.\n> But that's not the point.\n\nWhat is the point then? It looked like you were\ncomplaining it were not done automatically.\nI showed you how to script it. The message can be\nmade to look exactly as it is for git-pull. So what's wrong?\n\n> > In the long run you'll almost certainly find this commit message\n> > useless, though.\n>\n> Isn't 'Merge ssh://<hidden>/usr/src/ofed_1_2 info ofed_1_2' much more\n> useful than Merge commit 'FETCH_HEAD'?\n\nWhat for?\nIsn't \"Merge origin/ofed_1_2 into ofed_1_2\" much more useful than\n\"Merge FETCH_HEAD\"?\n(IOW: Why don't you just save the fetch result somewhere and\nhave a \"source description\" from that?)\n"},{"id":"32743","messageId":"20070126144246.GQ10812@mellanox.co.il","threadId":"6522","inReplyTo":"81b0412b0701260632l2181ef10i8d49ee9a795228b7@mail.gmail.com","subject":"Re: git merge FETCH_HEAD produced bad commit message","fromName":"Michael S. Tsirkin","fromEmail":"mst@mellanox.co.il","sentAt":"2007-01-26T14:42:46Z","receivedAt":"2007-01-26T14:42:46Z","isPatch":false,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> What is the point then?\n\nThat\n\tgit fetch <url>\n\tgit merge FETCH_HEAD\nshould be equivalent to\n\tgit pull <url>\nand it isn't\n\n-- \nMST\n"}]}