{"thread":{"id":"8982","subject":"cg switch -l doesn't work when branches point to the same commit","startedAt":"2007-07-11T12:59:57Z","lastAt":"2007-07-11T20:44:21Z","messageCount":4,"participants":["Bradford Smith","Alex Riesen","Sean","Bill Lear"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"47030","messageId":"f158199e0707110559q43c290b4x2caee13cac46cf29@mail.gmail.com","threadId":"8982","inReplyTo":null,"subject":"cg switch -l doesn't work when branches point to the same commit","fromName":"Bradford Smith","fromEmail":"bradford.carl.smith@gmail.com","sentAt":"2007-07-11T12:59:57Z","receivedAt":"2007-07-11T12:59:57Z","isPatch":false,"sender":{"key":"bradford.carl.smith@gmail.com","avatar":"https://gravatar.com/avatar/699930ad8ca562e38156ee60270b2fee830cc0cb5d94c2f70c6db4a705723c54?d=mp&s=160"},"body":"The message below applies to software versions:\n\ngit version 1.4.4.2\ncogito-0.18.2\n\nWhy doesn't cg switch -l save local changes when you switch to a\nbranch that points at the same commit you're already on?  Here's the\ncase I ran into.\n\n1. On my master branch I was part of the way through making a fairly\ncomplex change when I discovered an unrelated bug.  So, I wanted to:\n     a. move my partial changes to a topical branch\n     b. fix the bug on master\n     c. finish my changes on the topical branch\n     d. merge the topical branch back into master\n\n2. I didn't really want to _commit_ my partial changes yet, though,\nbecause I was really in mid-thought there, so I wanted to do it this\nway:\n\n# create the topical branch, carrying my local changes along with me\ncg switch -c topical-branch\n# switch back to master, leaving my local changes with the topical branch\ncg switch -l master\n# fix bug on master then\ncg commit\n# switch back to topical branch\ncg switch topical-branch\n# continue with changes and eventually\ncg commit\ncg switch master\ncg merge topical-branch\n\nUnfortunately, I found that 'cg switch -l master' did NOT save my\nlocal changes.  I had to switch back to the branch, commit my partial\nchanges, then back to master to fix the bug.  So, I was able to work\naround this, but I still found the behavior surprising.  If this is\nexpected behavior, shouldn't it be documented in the cg-switch man\npage?\n\nBTW, in a test repository/working directory I was able to confirm that\ncg switch -l worked as documented when the two branches involved\npointed to different commits.\n\nThanks,\n\nBradford C. Smith\n"},{"id":"47031","messageId":"81b0412b0707110636u77b56f1biccb221489933972a@mail.gmail.com","threadId":"8982","inReplyTo":"f158199e0707110559q43c290b4x2caee13cac46cf29@mail.gmail.com","subject":"Re: cg switch -l doesn't work when branches point to the same commit","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-07-11T13:36:39Z","receivedAt":"2007-07-11T13:36:39Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On 7/11/07, Bradford Smith <bradford.carl.smith@gmail.com> wrote:\n> The message below applies to software versions:\n>\n> git version 1.4.4.2\n\nIt is fixed sometime between your version and git-1.5.2.2.\nUse git checkout.\n\n> cogito-0.18.2\n\nCogito is unmaintained ATM.\n"},{"id":"47071","messageId":"20070711163446.cb8d9c52.seanlkml@sympatico.ca","threadId":"8982","inReplyTo":"81b0412b0707110636u77b56f1biccb221489933972a@mail.gmail.com","subject":"Re: cg switch -l doesn't work when branches point to the same commit","fromName":"Sean","fromEmail":"seanlkml@sympatico.ca","sentAt":"2007-07-11T20:34:46Z","receivedAt":"2007-07-11T20:34:46Z","isPatch":false,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"On Wed, 11 Jul 2007 15:36:39 +0200\n\"Alex Riesen\" <raa.lkml@gmail.com> wrote:\n\n> Cogito is unmaintained ATM.\n\nWonder who maintains the http://git.kernel.org site?  The front page\nthere still suggests the use of Cogito.\n\nSean\n"},{"id":"47072","messageId":"18069.16677.594854.584712@lisa.zopyra.com","threadId":"8982","inReplyTo":"20070711163446.cb8d9c52.seanlkml@sympatico.ca","subject":"Re: cg switch -l doesn't work when branches point to the same commit","fromName":"Bill Lear","fromEmail":"rael@zopyra.com","sentAt":"2007-07-11T20:44:21Z","receivedAt":"2007-07-11T20:44:21Z","isPatch":false,"sender":{"key":"rael@zopyra.com","avatar":"https://gravatar.com/avatar/c4f2d2790ca3828d3b4e7dfebabf61d2fe94fd82fa49cdac2a5295dd2d46a874?d=mp&s=160"},"body":"On Wednesday, July 11, 2007 at 16:34:46 (-0400) Sean writes:\n>On Wed, 11 Jul 2007 15:36:39 +0200\n>\"Alex Riesen\" <raa.lkml@gmail.com> wrote:\n>\n>> Cogito is unmaintained ATM.\n>\n>Wonder who maintains the http://git.kernel.org site?  The front page\n>there still suggests the use of Cogito.\n\nPetr Baudis, CCd here.\n\n\nBill\n"}]}