{"thread":{"id":"32570","subject":"git branch case insensitivity (Possible bug)","startedAt":"2013-01-09T15:46:34Z","lastAt":"2013-01-09T18:34:31Z","messageCount":5,"participants":["Alexander Gallego","Andreas Ericsson","Joshua Jensen","Johannes Sixt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"206384","messageId":"CAL+iW28LdnNiho4KksLX_S_-+bKX+77GPJ0zqQfkz4JpBJRskw@mail.gmail.com","threadId":"32570","inReplyTo":null,"subject":"git branch case insensitivity (Possible bug)","fromName":"Alexander Gallego","fromEmail":"gallego.alexx@gmail.com","sentAt":"2013-01-09T15:46:34Z","receivedAt":"2013-01-09T15:46:34Z","isPatch":false,"sender":{"key":"gallego.alexx@gmail.com","avatar":null},"body":"Hello,\n\nHere is a pastebin where I've reproduced the steps on a clean git repo.\n\nhttp://pastebin.com/0vQZEat0\n\n\n\nBrief description of the problem:\n\n\n\n1.Basically one creates a local branch call it 'imp_fix' (branch off\nmaster --> this doesn't matter)\n2.One does work, commit, etc\n3.One rebases imp_fix with master via: (inside imp_fix) git rebase master\n4.One checks out master via: git checkout master\n5.One merges an incorrect name \"imp_Fix\" (notice the capital F)\n6.The expected output is that git would say, silly you --> that branch\ndoes not exist.\n7. Instead it merges (what I think is incorrectly) imp_fix.\n\n\nKindly let me know if I can provide more details.\n\n\n\n\n\n\nFor your convenience here is the paste:\n\nagallego@agallego-macpro.local] /tmp\n$ git clone git@bitbucket.org/agallego/gitbug\nCloning into 'gitbug'...\nwarning: You appear to have cloned an empty repository.\n\n[agallego@agallego-macpro.local] /tmp\n$ cd gitbug\n\n[agallego@agallego-macpro.local] /tmp/gitbug\n$ ls\n\n[agallego@agallego-macpro.local] /tmp/gitbug\n$ echo \"Trying to reproduce a bug\" > README\n\n[agallego@agallego-macpro.local] /tmp/gitbug\n$ ls\nREADME\n\n[agallego@agallego-macpro.local] /tmp/gitbug\n$ git add .\n\n[agallego@agallego-macpro.local] /tmp/gitbug\n$ git commit -am \"adding readme\"\n[master (root-commit) 0bfd62a] adding readme\n 1 files changed, 1 insertions(+), 0 deletions(-)\n create mode 100644 README\n\n[agallego@agallego-macpro.local] /tmp/gitbug\n$ git push origin master\nCounting objects: 3, done.\nWriting objects: 100% (3/3), 230 bytes, done.\nTotal 3 (delta 0), reused 0 (delta 0)\nremote: bb/acl: agallego is allowed. accepted payload.\nTo git@bitbucket.org:agallego/gitbug\n * [new branch]      master -> master\n\n[agallego@agallego-macpro.local] /tmp/gitbug\n$ git checkout imp_fix\nerror: pathspec 'imp_fix' did not match any file(s) known to git.\n\n[agallego@agallego-macpro.local] /tmp/gitbug\n$ git branch imp_fix\n\n[agallego@agallego-macpro.local] /tmp/gitbug\n$ git checkout imp_fix\nSwitched to branch 'imp_fix'\n\n[agallego@agallego-macpro.local] /tmp/gitbug\n$ echo \"imp_fix\" >> README\n\n[agallego@agallego-macpro.local] /tmp/gitbug\n$ git commit -am \"step 2, create an imp_fix branch and then merge\"\n[imp_fix 178c8f3] step 2, create an imp_fix branch and then merge\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\n[agallego@agallego-macpro.local] /tmp/gitbug\n$ ls\nREADME\n\n[agallego@agallego-macpro.local] /tmp/gitbug\n$ git rebase master\nCurrent branch imp_fix is up to date.\n\n[agallego@agallego-macpro.local] /tmp/gitbug\n$ git checkout master\nSwitched to branch 'master'\n\n[agallego@agallego-macpro.local] /tmp/gitbug\n$ git merge imp_Fix\nMerge made by the 'recursive' strategy.\n README |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\n[agallego@agallego-macpro.local] /tmp/gitbug\n$ git push origin master\nCounting objects: 6, done.\nDelta compression using up to 4 threads.\nCompressing objects: 100% (2/2), done.\nWriting objects: 100% (4/4), 392 bytes, done.\nTotal 4 (delta 1), reused 0 (delta 0)\nremote: bb/acl: agallego is allowed. accepted payload.\nTo git@bitbucket.org:agallego/gitbug\n   0bfd62a..f99f8a1  master -> master\n\n\n\n\n\n\nSincerely,\nAlexander Gallego\n\n---*---\n------*\n*  *  *\n"},{"id":"206385","messageId":"50ED925B.2060402@op5.se","threadId":"32570","inReplyTo":"CAL+iW28LdnNiho4KksLX_S_-+bKX+77GPJ0zqQfkz4JpBJRskw@mail.gmail.com","subject":"Re: git branch case insensitivity (Possible bug)","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2013-01-09T15:52:59Z","receivedAt":"2013-01-09T15:52:59Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"On 01/09/2013 04:46 PM, Alexander Gallego wrote:\n> Hello,\n> \n> Here is a pastebin where I've reproduced the steps on a clean git repo.\n> \n> http://pastebin.com/0vQZEat0\n> \n> \n> \n> Brief description of the problem:\n> \n> \n> \n> 1.Basically one creates a local branch call it 'imp_fix' (branch off\n> master --> this doesn't matter)\n> 2.One does work, commit, etc\n> 3.One rebases imp_fix with master via: (inside imp_fix) git rebase master\n> 4.One checks out master via: git checkout master\n> 5.One merges an incorrect name \"imp_Fix\" (notice the capital F)\n> 6.The expected output is that git would say, silly you --> that branch\n> does not exist.\n> 7. Instead it merges (what I think is incorrectly) imp_fix.\n> \n> \n> Kindly let me know if I can provide more details.\n> \n\nAre you using Mac OSX?\nAre you using the HFS+ filesystem shipped with it?\nDid you use the filesystem's default settings rather than reinstall your\nsystem with sensible settings?\n\nIf you said \"yes\" to all of the above, this is a filesystem \"feature\",\ncourtesy of (cr)Apple, and you're screwed.\n\nYou can work around it by running \"git pack-refs\" every time you create\na branch or a tag though.\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n\nConsidering the successes of the wars on alcohol, poverty, drugs and\nterror, I think we should give some serious thought to declaring war\non peace.\n"},{"id":"206391","messageId":"CAL+iW2-eTtMnn65HN9zeFBFXubgkCA7RwVRZjkq7+tRpPk1TGg@mail.gmail.com","threadId":"32570","inReplyTo":"50ED925B.2060402@op5.se","subject":"Re: git branch case insensitivity (Possible bug)","fromName":"Alexander Gallego","fromEmail":"gallego.alexx@gmail.com","sentAt":"2013-01-09T17:03:15Z","receivedAt":"2013-01-09T17:03:15Z","isPatch":false,"sender":{"key":"gallego.alexx@gmail.com","avatar":null},"body":"On Wed, Jan 9, 2013 at 10:52 AM, Andreas Ericsson <ae@op5.se> wrote:\n> On 01/09/2013 04:46 PM, Alexander Gallego wrote:\n>> Hello,\n>>\n>> Here is a pastebin where I've reproduced the steps on a clean git repo.\n>>\n>> http://pastebin.com/0vQZEat0\n>>\n>>\n>>\n>> Brief description of the problem:\n>>\n>>\n>>\n>> 1.Basically one creates a local branch call it 'imp_fix' (branch off\n>> master --> this doesn't matter)\n>> 2.One does work, commit, etc\n>> 3.One rebases imp_fix with master via: (inside imp_fix) git rebase master\n>> 4.One checks out master via: git checkout master\n>> 5.One merges an incorrect name \"imp_Fix\" (notice the capital F)\n>> 6.The expected output is that git would say, silly you --> that branch\n>> does not exist.\n>> 7. Instead it merges (what I think is incorrectly) imp_fix.\n>>\n>>\n>> Kindly let me know if I can provide more details.\n>>\n>\n> Are you using Mac OSX?\n\nYes\n\n> Are you using the HFS+ filesystem shipped with it?\n\nLikely. I have not touched the fs settings.\n\n> Did you use the filesystem's default settings rather than reinstall your\n> system with sensible settings?\n\nYup. I use whatever was shipped with it.\n\n> If you said \"yes\" to all of the above, this is a filesystem \"feature\",\n> courtesy of (cr)Apple, and you're screwed.\n>\n> You can work around it by running \"git pack-refs\" every time you create\n> a branch or a tag though.\n\nThanks for the tips. I'll be sure to use this.\n\n\n> --\n> Andreas Ericsson                   andreas.ericsson@op5.se\n> OP5 AB                             www.op5.se\n> Tel: +46 8-230225                  Fax: +46 8-230231\n>\n> Considering the successes of the wars on alcohol, poverty, drugs and\n> terror, I think we should give some serious thought to declaring war\n> on peace.\n"},{"id":"206396","messageId":"50EDAD4A.4070108@workspacewhiz.com","threadId":"32570","inReplyTo":"50ED925B.2060402@op5.se","subject":"Re: git branch case insensitivity (Possible bug)","fromName":"Joshua Jensen","fromEmail":"jjensen@workspacewhiz.com","sentAt":"2013-01-09T17:47:54Z","receivedAt":"2013-01-09T17:47:54Z","isPatch":false,"sender":{"key":"jjensen@workspacewhiz.com","avatar":"https://avatars.githubusercontent.com/u/111687?v=4"},"body":"----- Original Message -----\nFrom: Andreas Ericsson\nDate: 1/9/2013 8:52 AM\n>\n> Are you using Mac OSX?\n> Are you using the HFS+ filesystem shipped with it?\n> Did you use the filesystem's default settings rather than reinstall your\n> system with sensible settings?\n>\n> If you said \"yes\" to all of the above, this is a filesystem \"feature\",\n> courtesy of (cr)Apple, and you're screwed.\n>\n> You can work around it by running \"git pack-refs\" every time you create\n> a branch or a tag though.\nThere are two popular default file systems that are case preserving, \ncase insensitive.  One is on Mac.  One is on Windows.\n\nSince Git relies on file system behavior to store the equivalent of \ndatabase entries like these refs, it cannot give a consistent user \nexperience across platforms or even file systems within platforms.\n\nThat sounds like a bug in Git to me.\n\nPerhaps pack-refs should be run automatically by any internal command \nthat updates a ref to ensure a non-confusing, consistent user experience.\n\nFurther, if refs are no longer entries on the disk, then this nasty \nnamespacing issue goes away.\n\nUser A:\n$ git branch render\n$ git push\n\nUser B:\n$ git pull\n$ git branch render/myfeature\n\nrender/myfeature can't be created, because Git assumes a filesystem \nstructure.  The render namespace is locked out forever.\n\n-Josh\n"},{"id":"206398","messageId":"50EDB837.2070106@kdbg.org","threadId":"32570","inReplyTo":"CAL+iW2-eTtMnn65HN9zeFBFXubgkCA7RwVRZjkq7+tRpPk1TGg@mail.gmail.com","subject":"Re: git branch case insensitivity (Possible bug)","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2013-01-09T18:34:31Z","receivedAt":"2013-01-09T18:34:31Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 09.01.2013 18:03, schrieb Alexander Gallego:\n> On Wed, Jan 9, 2013 at 10:52 AM, Andreas Ericsson <ae@op5.se> wrote:\n>> [about case-insensitivity of HFS+ and branch names]\n>> If you said \"yes\" to all of the above, this is a filesystem \"feature\",\n>> courtesy of (cr)Apple, and you're screwed.\n>>\n>> You can work around it by running \"git pack-refs\" every time you create\n>> a branch or a tag though.\n> \n> Thanks for the tips. I'll be sure to use this.\n\nNaah... that's unworkable. I'm sure the Andreas meant the suggestion\ntongue-in-cheek. The important part of his reply is \"you're screwed\".\n\n-- Hannes\n"}]}