{"thread":{"id":"1739","subject":"cg-update (cogito-0.13) bug: changed heads","startedAt":"2005-09-06T21:01:25Z","lastAt":"2005-09-07T02:17:29Z","messageCount":5,"participants":["H. Peter Anvin","Petr Baudis","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"8141","messageId":"431E03A5.6060709@zytor.com","threadId":"1739","inReplyTo":null,"subject":"cg-update (cogito-0.13) bug: changed heads","fromName":"H. Peter Anvin","fromEmail":"hpa@zytor.com","sentAt":"2005-09-06T21:01:25Z","receivedAt":"2005-09-06T21:01:25Z","isPatch":false,"sender":{"key":"hpa@zytor.com","avatar":null},"body":"I just found a bug in cogito-0.13, at least to the best of my \nunderstanding of the situation.\n\nSimplified, the problem looks like this: two sides, A and B, pull from \nrepository C.  The head of this pull we call 0.\n\nNow commit 1 is added to A.  B pulls commit 1 from A, not though C. \nLater, A pushes commit 1 to C.\n\nNext time B tries to pull from C, cg-update will not advance \nrefs/heads/origin, even though C now has a new head.  Thus, B will think \nthat C is in a different state than it actually is.\n\nThis has, for me, broken safeguards of the form \"make sure you're merged \nbefore you pull.\"\n\n\t-hpa\n"},{"id":"8150","messageId":"20050906231756.GC26934@pasky.ji.cz","threadId":"1739","inReplyTo":"431E03A5.6060709@zytor.com","subject":"Re: cg-update (cogito-0.13) bug: changed heads","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2005-09-06T23:17:56Z","receivedAt":"2005-09-06T23:17:56Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Tue, Sep 06, 2005 at 11:01:25PM CEST, I got a letter\nwhere \"H. Peter Anvin\" <hpa@zytor.com> told me that...\n> I just found a bug in cogito-0.13, at least to the best of my \n> understanding of the situation.\n> \n> Simplified, the problem looks like this: two sides, A and B, pull from \n> repository C.  The head of this pull we call 0.\n> \n> Now commit 1 is added to A.  B pulls commit 1 from A, not though C. \n> Later, A pushes commit 1 to C.\n> \n> Next time B tries to pull from C, cg-update will not advance \n> refs/heads/origin, even though C now has a new head.  Thus, B will think \n> that C is in a different state than it actually is.\n\nSo, C surely has its head updated? Does cg-update \"fail\" silently, or\ndoes it utter anything?\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nIf you want the holes in your knowledge showing up try teaching\nsomeone.  -- Alan Cox\n"},{"id":"8152","messageId":"431E24FF.2000700@zytor.com","threadId":"1739","inReplyTo":"20050906231756.GC26934@pasky.ji.cz","subject":"Re: cg-update (cogito-0.13) bug: changed heads","fromName":"H. Peter Anvin","fromEmail":"hpa@zytor.com","sentAt":"2005-09-06T23:23:43Z","receivedAt":"2005-09-06T23:23:43Z","isPatch":false,"sender":{"key":"hpa@zytor.com","avatar":null},"body":"Petr Baudis wrote:\n> Dear diary, on Tue, Sep 06, 2005 at 11:01:25PM CEST, I got a letter\n> where \"H. Peter Anvin\" <hpa@zytor.com> told me that...\n> \n>>I just found a bug in cogito-0.13, at least to the best of my \n>>understanding of the situation.\n>>\n>>Simplified, the problem looks like this: two sides, A and B, pull from \n>>repository C.  The head of this pull we call 0.\n>>\n>>Now commit 1 is added to A.  B pulls commit 1 from A, not though C. \n>>Later, A pushes commit 1 to C.\n>>\n>>Next time B tries to pull from C, cg-update will not advance \n>>refs/heads/origin, even though C now has a new head.  Thus, B will think \n>>that C is in a different state than it actually is.\n> \n> \n> So, C surely has its head updated? Does cg-update \"fail\" silently, or\n> does it utter anything?\n> \n\nC has its head updated, yes.  cg-update says \"Branches already fully \nmerged.\"\n\n\t-hpa\n"},{"id":"8155","messageId":"431E4409.50307@zytor.com","threadId":"1739","inReplyTo":"431E24FF.2000700@zytor.com","subject":"Re: cg-update (cogito-0.13) bug: changed heads","fromName":"H. Peter Anvin","fromEmail":"hpa@zytor.com","sentAt":"2005-09-07T01:36:09Z","receivedAt":"2005-09-07T01:36:09Z","isPatch":false,"sender":{"key":"hpa@zytor.com","avatar":null},"body":"H. Peter Anvin wrote:\n>>\n>> So, C surely has its head updated? Does cg-update \"fail\" silently, or\n>> does it utter anything?\n> \n> C has its head updated, yes.  cg-update says \"Branches already fully \n> merged.\"\n> \n\nOK, now later in the day I could not reproduce this on another box. \nEither the situation was different enough, or I did something else wrong.\n\n\t-hpa\n"},{"id":"8156","messageId":"7vhdcxbozq.fsf@assigned-by-dhcp.cox.net","threadId":"1739","inReplyTo":"431E4409.50307@zytor.com","subject":"Re: cg-update (cogito-0.13) bug: changed heads","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-09-07T02:17:29Z","receivedAt":"2005-09-07T02:17:29Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"H. Peter Anvin\" <hpa@zytor.com> writes:\n\n> H. Peter Anvin wrote:\n>>>\n> OK, now later in the day I could not reproduce this on another box. \n> Either the situation was different enough, or I did something else wrong.\n\nOne thing that comes to mind, which may or may not be relevant\nto your situation, is which branch you were on when you ran\ncg-update.  I cannot speak for Pasky and I do not use Cogito,\nbut the 'git fetch' and 'git pull' commands that come with core\nGIT used to have a funny interaction of fetch attempting to\nupdate the branch head ref if your working tree happened to be\non that branch, which was fixed some time ago.\n"}]}