{"thread":{"id":"50620","subject":"fast-import fails with case sensitive tags due to case insensitive lock files","startedAt":"2019-03-01T06:26:04Z","lastAt":"2019-03-05T06:25:30Z","messageCount":5,"participants":["Wendeborn, Jonathan","brian m. carlson","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"370408","messageId":"ceb9b34681c14d9ab2a33ba909b5ca75@bruexc101.brumgt.local","threadId":"50620","inReplyTo":null,"subject":"fast-import fails with case sensitive tags due to case insensitive lock files","fromName":"Wendeborn, Jonathan","fromEmail":"jonathan.wendeborn@bruker.com","sentAt":"2019-03-01T06:19:48Z","receivedAt":"2019-03-01T06:26:04Z","isPatch":false,"sender":{"key":"jonathan.wendeborn@bruker.com","avatar":null},"body":"Hi,\n\nI have a problem with fast-import on an NTFS drive: If I try to import tags which are identical apart from their casing a failure due to identical lock file names occurs.\n\nI am running git for windows 2.15.1.2 x64 on a Windows 10 machine (10.0.15063):\n$ git --version --build-options\ngit version 2.15.1.windows.2\nbuilt from commit: 5d5baf91824ec7750b103c8b7c4827ffac202feb\nsizeof-long: 4\nmachine: x86_64\n\nMCVE:\n (echo \"commit refs/heads/master\" && \n echo \"mark :1\" &&\n echo \"committer me <> 0 +0000\" &&\n echo \"data 0\" &&\n echo \"\" &&\n echo \"tag tag_A\" &&\n echo \"from :1\" &&\n echo \"tagger me <> 0 +0000\" &&\n echo \"data 0\" &&\n echo \"\" &&\n echo \"tag tag_a\" &&\n echo \"from :1\" &&\n echo \"tagger me <> 0 +0000\" &&\n echo \"data 0\" &&\n echo \"\") | git fast-import\n\nInstead of having 1 commit with two tags (\"tag_A\" and \"tag_a\") I get his error message:\nUnpacking objects: 100% (4/4), done.\nerror: cannot lock ref 'refs/tags/tag_a': Unable to create 'C:/tmp/.git/refs/tags/tag_a.lock': File exists.\n\nAnother git process seems to be running in this repository, e.g.\nan editor opened by 'git commit'. Please make sure all processes\nare terminated then try again. If it still fails, a git process\nmay have crashed in this repository earlier:\nremove the file manually to continue.\n\nBest regards,\nJonathan\n"},{"id":"370481","messageId":"20190303002542.GG601925@genre.crustytoothpaste.net","threadId":"50620","inReplyTo":"ceb9b34681c14d9ab2a33ba909b5ca75@bruexc101.brumgt.local","subject":"Re: fast-import fails with case sensitive tags due to case insensitive lock files","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2019-03-03T00:25:42Z","receivedAt":"2019-03-03T00:25:51Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On Fri, Mar 01, 2019 at 06:19:48AM +0000, Wendeborn, Jonathan wrote:\n> Hi,\n> \n> I have a problem with fast-import on an NTFS drive: If I try to import tags which are identical apart from their casing a failure due to identical lock file names occurs.\n> \n> I am running git for windows 2.15.1.2 x64 on a Windows 10 machine (10.0.15063):\n> $ git --version --build-options\n> git version 2.15.1.windows.2\n> built from commit: 5d5baf91824ec7750b103c8b7c4827ffac202feb\n> sizeof-long: 4\n> machine: x86_64\n> \n> MCVE:\n>  (echo \"commit refs/heads/master\" && \n>  echo \"mark :1\" &&\n>  echo \"committer me <> 0 +0000\" &&\n>  echo \"data 0\" &&\n>  echo \"\" &&\n>  echo \"tag tag_A\" &&\n>  echo \"from :1\" &&\n>  echo \"tagger me <> 0 +0000\" &&\n>  echo \"data 0\" &&\n>  echo \"\" &&\n>  echo \"tag tag_a\" &&\n>  echo \"from :1\" &&\n>  echo \"tagger me <> 0 +0000\" &&\n>  echo \"data 0\" &&\n>  echo \"\") | git fast-import\n> \n> Instead of having 1 commit with two tags (\"tag_A\" and \"tag_a\") I get his error message:\n> Unpacking objects: 100% (4/4), done.\n> error: cannot lock ref 'refs/tags/tag_a': Unable to create 'C:/tmp/.git/refs/tags/tag_a.lock': File exists.\n\nThe reason you're seeing this error is because refs can be stored in the\nfile system. In order to update a reference, Git takes a lock on it, and\nas you've seen, Git can't take a lock on the same reference twice.\n\nIt's known that multiple references that differ only in case can't be\nstored in a case-insensitive file system, and there is a design for a\ndifferent system (reftable) which nobody has yet implemented in Git but\ndoes not have this problem.\n\nEven if we accepted this situation in fast-import, we'd destroy one of\nyour tags, which would be undesirable.\n\nSometimes this happens to work because when we pack references, we store\nthem in a file instead, which does not suffer from case-sensitivity\nproblems.\n\nRight now, you have some choices:\n\n• Volunteer to implement reftable.\n• Since you're on Windows 10, set your Git repository directory as\n  case-sensitive.\n• Use Windows Subsystem for Linux, which is case sensitive and creates\n  directories with that flag (even on NTFS), to do your import.\n• If you control the fast-export output, adjust the arguments you pass\n  such that the output does not contain one of the offending tags.\n-- \nbrian m. carlson: Houston, Texas, US\nOpenPGP: https://keybase.io/bk2204\n"},{"id":"370580","messageId":"3dbce0f1c80e4e67b114f8c84e2106c8@bruexc101.brumgt.local","threadId":"50620","inReplyTo":"20190303002542.GG601925@genre.crustytoothpaste.net","subject":"AW: fast-import fails with case sensitive tags due to case insensitive lock files","fromName":"Wendeborn, Jonathan","fromEmail":"jonathan.wendeborn@bruker.com","sentAt":"2019-03-04T07:55:47Z","receivedAt":"2019-03-04T07:56:42Z","isPatch":false,"sender":{"key":"jonathan.wendeborn@bruker.com","avatar":null},"body":"> Right now, you have some choices: \n> • Volunteer to implement reftable. \n> • Since you're on Windows 10, set your Git repository directory as \n>   case-sensitive. \n> • Use Windows Subsystem for Linux, which is case sensitive and creates \n>   directories with that flag (even on NTFS), to do your import. \n> • If you control the fast-export output, adjust the arguments you pass \n>   such that the output does not contain one of the offending tags. \n\nHi Brian,\n\nThank you very much for your answer!\n\nUnfortunately I am stuck with Windows 10 1703 which neither supports case-sensitivity nor any Linux subsystem from the Microsoft Store :( Also, my employer unfortunately doesn’t allow me to invest the time to implement reftable, so I guess I go with manually leaving out the one conflicting label I found and tagging it manually afterward.\n\nOne thing I still would like to encourage to is to improve the error message which is really misleading in this case.\n\nBest regards and thanks again,\nJonathan\n"},{"id":"370610","messageId":"nycvar.QRO.7.76.6.1903041627230.45@tvgsbejvaqbjf.bet","threadId":"50620","inReplyTo":"3dbce0f1c80e4e67b114f8c84e2106c8@bruexc101.brumgt.local","subject":"Re: AW: fast-import fails with case sensitive tags due to case insensitive lock files","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-03-04T15:29:17Z","receivedAt":"2019-03-04T15:29:27Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Jonathan,\n\nOn Mon, 4 Mar 2019, Wendeborn, Jonathan wrote:\n\n> > Right now, you have some choices: \n> > • Volunteer to implement reftable. \n> > • Since you're on Windows 10, set your Git repository directory as \n> >   case-sensitive. \n> > • Use Windows Subsystem for Linux, which is case sensitive and creates \n> >   directories with that flag (even on NTFS), to do your import. \n> > • If you control the fast-export output, adjust the arguments you pass \n> >   such that the output does not contain one of the offending tags. \n> \n> Hi Brian,\n> \n> Thank you very much for your answer!\n> \n> Unfortunately I am stuck with Windows 10 1703 which neither supports\n> case-sensitivity nor any Linux subsystem from the Microsoft Store :(\n\nToo bad.\n\n> Also, my employer unfortunately doesn’t allow me to invest the time to\n> implement reftable,\n\nEven worse!\n\n> so I guess I go with manually leaving out the one conflicting label I\n> found and tagging it manually afterward.\n\nThat is a valid workaround.\n\n> One thing I still would like to encourage to is to improve the error\n> message which is really misleading in this case.\n\nWell, that is at least something you could do. After all, you use a\nvolunteer-driven project, so you could at least volunteer a little time to\nimproving it yourself.\n\nCiao,\nJohannes"},{"id":"370671","messageId":"b8976ee7d99547649cdded5a80ab118d@bruexc101.brumgt.local","threadId":"50620","inReplyTo":"nycvar.QRO.7.76.6.1903041627230.45@tvgsbejvaqbjf.bet","subject":"AW: AW: fast-import fails with case sensitive tags due to case insensitive lock files","fromName":"Wendeborn, Jonathan","fromEmail":"jonathan.wendeborn@bruker.com","sentAt":"2019-03-05T06:25:11Z","receivedAt":"2019-03-05T06:25:30Z","isPatch":false,"sender":{"key":"jonathan.wendeborn@bruker.com","avatar":null},"body":"Hi Johannes,\n\n>> One thing I still would like to encourage to is to improve the error \n>> message which is really misleading in this case.\n\n> Well, that is at least something you could do. After all, you use a volunteer-driven project, so you could at least volunteer a little time to improving it yourself.\n\nThat's true :)\n\nThank you!\nJonathan\n\n-----Ursprüngliche Nachricht-----\nVon: Johannes Schindelin <Johannes.Schindelin@gmx.de> \nGesendet: Montag, 4. März 2019 16:29\nAn: Wendeborn, Jonathan <Jonathan.Wendeborn@bruker.com>\nCc: brian m. carlson <sandals@crustytoothpaste.net>; git@vger.kernel.org\nBetreff: Re: AW: fast-import fails with case sensitive tags due to case insensitive lock files\n\nHi Jonathan,\n\nOn Mon, 4 Mar 2019, Wendeborn, Jonathan wrote:\n\n> > Right now, you have some choices: \n> > • Volunteer to implement reftable. \n> > • Since you're on Windows 10, set your Git repository directory as\n> >   case-sensitive. \n> > • Use Windows Subsystem for Linux, which is case sensitive and \n> > creates\n> >   directories with that flag (even on NTFS), to do your import. \n> > • If you control the fast-export output, adjust the arguments you \n> > pass\n> >   such that the output does not contain one of the offending tags. \n> \n> Hi Brian,\n> \n> Thank you very much for your answer!\n> \n> Unfortunately I am stuck with Windows 10 1703 which neither supports \n> case-sensitivity nor any Linux subsystem from the Microsoft Store :(\n\nToo bad.\n\n> Also, my employer unfortunately doesn’t allow me to invest the time to \n> implement reftable,\n\nEven worse!\n\n> so I guess I go with manually leaving out the one conflicting label I \n> found and tagging it manually afterward.\n\nThat is a valid workaround.\n\n> One thing I still would like to encourage to is to improve the error \n> message which is really misleading in this case.\n\nWell, that is at least something you could do. After all, you use a volunteer-driven project, so you could at least volunteer a little time to improving it yourself.\n\nCiao,\nJohannes\n"}]}