{"thread":{"id":"43908","subject":"Re: git-svn bridge and line endings","startedAt":"2016-08-23T00:04:57Z","lastAt":"2016-08-23T19:17:03Z","messageCount":12,"participants":["Lucian Smith","Eric Wong","Alfred Perlstein","Torsten Bögershausen","Junio C Hamano","Julian Phillips"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"299888","messageId":"CAHLmBr1JHjjp66Er-2e6Yu+3zjrhT82Da-O8fj6_OoPtEPz8eg@mail.gmail.com","threadId":"43908","inReplyTo":"CAHLmBr2CRzt58RB+_YmnXcyost-R5=Ff51tALf1xh0kGk+frDw@mail.gmail.com","subject":"Re: git-svn bridge and line endings","fromName":"Lucian Smith","fromEmail":"lucianoelsmitho@gmail.com","sentAt":"2016-08-23T00:04:47Z","receivedAt":"2016-08-23T00:04:57Z","isPatch":false,"sender":{"key":"lucianoelsmitho@gmail.com","avatar":"https://gravatar.com/avatar/6581c7d4a526dc523c0703a068ce7ae536917ed5268cb4b2421c402fe4ed99ac?d=mp&s=160"},"body":"I'm attempting to use the git-svn bridge, and am having problems with\nline endings on Windows.\n\nThe setup is that we have a git repository on github, and I've checked\nout a branch on my Windows machine using Tortoise svn.  I make\nchanges, commit them, and the branch is updated.  In general, this\nworks fine.\n\nIf this was just SVN, I could set the 'eol-style' for files to\n'native' to let it know to expect Windows/linux/mac line endings for\nparticular files.  This seems to be handled in git by using the\n'.gitattributes' file instead.  Unfortunately, the git/svn bridge\ndoesn't seem to be translate the information in the .gitattributes\nfile to appropriate eol-style settings in SVN.  Checking out a file\nusing SVN on Windows leaves me with a file without CRLF's, and if I\ncheck in a CRLF file, that's the way it goes into the repository.\nDifferences in CRLF alone show up as 'real' differences that can be\nchecked in, and, if this happens, this causes problems with other\npeople's repositories.\n\nAm I doing something wrong; is there another way to handle this; or\ncan I file this as a bug report/feature request?\n\nThank you!\n\n-Lucian Smith\n"},{"id":"299892","messageId":"20160823030721.GA32181@starla","threadId":"43908","inReplyTo":"CAHLmBr1JHjjp66Er-2e6Yu+3zjrhT82Da-O8fj6_OoPtEPz8eg@mail.gmail.com","subject":"Re: git-svn bridge and line endings","fromName":"Eric Wong","fromEmail":"e@80x24.org","sentAt":"2016-08-23T03:07:21Z","receivedAt":"2016-08-23T03:07:43Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Adding Alfred to the Cc:, more below...\n\nLucian Smith <lucianoelsmitho@gmail.com> wrote:\n> I'm attempting to use the git-svn bridge, and am having problems with\n> line endings on Windows.\n> \n> The setup is that we have a git repository on github, and I've checked\n> out a branch on my Windows machine using Tortoise svn.  I make\n> changes, commit them, and the branch is updated.  In general, this\n> works fine.\n> \n> If this was just SVN, I could set the 'eol-style' for files to\n> 'native' to let it know to expect Windows/linux/mac line endings for\n> particular files.  This seems to be handled in git by using the\n> '.gitattributes' file instead.  Unfortunately, the git/svn bridge\n> doesn't seem to be translate the information in the .gitattributes\n> file to appropriate eol-style settings in SVN.  Checking out a file\n> using SVN on Windows leaves me with a file without CRLF's, and if I\n> check in a CRLF file, that's the way it goes into the repository.\n> Differences in CRLF alone show up as 'real' differences that can be\n> checked in, and, if this happens, this causes problems with other\n> people's repositories.\n> \n> Am I doing something wrong; is there another way to handle this; or\n> can I file this as a bug report/feature request?\n> \n> Thank you!\n> \n> -Lucian Smith\n\nLucian: Which version of git are you using?\n\nAs of git v2.3.0 and thanks to Alfred, the \"git svn propset\"\ncommand exists for setting new props via git; however it\nonly got documented recently in v2.9.1.\n\nIt also seems to support setting props via \"svn-properties\"\nin the .gitattributes file based on reading the code;\nbut I'm not familiar with this area, so I defer to Alfred.\n\nAlfred: \"svn-properties\" isn't documented anywhere, yet;\nis this something that should/could be documented?\n\nThanks.\n\ncf. commit 83c9433e679635f8fbf8961081ea3581c93ca778\n    (\"git-svn: support for git-svn propset\")\n    https://bogomips.org/git-svn.git/commit/?id=83c9433e6796\n\n    commit 19a7f24b6f8aa89ea5899c928c2fa350f4b1521e\n    (\"git-svn: document the 'git svn propset' command\")\n    https://bogomips.org/git-svn.git/commit/?id=19a7f24b6f8a\n\n    https://public-inbox.org/git/?q=s:%22git-svn+propset%22\n\nAnyways I've never used SVN props much myself, so don't much\nhave experience in this area; nor do I have much experience\nwith git-side gitattributes.\n"},{"id":"299894","messageId":"5e17164f-f669-70c2-de78-25287ab59759@freebsd.org","threadId":"43908","inReplyTo":"20160823030721.GA32181@starla","subject":"Re: git-svn bridge and line endings","fromName":"Alfred Perlstein","fromEmail":"alfred@freebsd.org","sentAt":"2016-08-23T04:58:31Z","receivedAt":"2016-08-23T05:05:43Z","isPatch":false,"sender":{"key":"alfred@freebsd.org","avatar":"https://avatars.githubusercontent.com/u/629072?v=4"},"body":"\n\nOn 8/22/16 8:07 PM, Eric Wong wrote:\n> Adding Alfred to the Cc:, more below...\n>\n> Lucian Smith <lucianoelsmitho@gmail.com> wrote:\n>> I'm attempting to use the git-svn bridge, and am having problems with\n>> line endings on Windows.\n>>\n>> The setup is that we have a git repository on github, and I've checked\n>> out a branch on my Windows machine using Tortoise svn.  I make\n>> changes, commit them, and the branch is updated.  In general, this\n>> works fine.\n>>\n>> If this was just SVN, I could set the 'eol-style' for files to\n>> 'native' to let it know to expect Windows/linux/mac line endings for\n>> particular files.  This seems to be handled in git by using the\n>> '.gitattributes' file instead.  Unfortunately, the git/svn bridge\n>> doesn't seem to be translate the information in the .gitattributes\n>> file to appropriate eol-style settings in SVN.  Checking out a file\n>> using SVN on Windows leaves me with a file without CRLF's, and if I\n>> check in a CRLF file, that's the way it goes into the repository.\n>> Differences in CRLF alone show up as 'real' differences that can be\n>> checked in, and, if this happens, this causes problems with other\n>> people's repositories.\n>>\n>> Am I doing something wrong; is there another way to handle this; or\n>> can I file this as a bug report/feature request?\n>>\n>> Thank you!\n>>\n>> -Lucian Smith\n> Lucian: Which version of git are you using?\n>\n> As of git v2.3.0 and thanks to Alfred, the \"git svn propset\"\n> command exists for setting new props via git; however it\n> only got documented recently in v2.9.1.\n>\n> It also seems to support setting props via \"svn-properties\"\n> in the .gitattributes file based on reading the code;\n> but I'm not familiar with this area, so I defer to Alfred.\n>\n> Alfred: \"svn-properties\" isn't documented anywhere, yet;\n> is this something that should/could be documented?\n>\n> Thanks.\n>\n> cf. commit 83c9433e679635f8fbf8961081ea3581c93ca778\n>      (\"git-svn: support for git-svn propset\")\n>      https://bogomips.org/git-svn.git/commit/?id=83c9433e6796\n>\n>      commit 19a7f24b6f8aa89ea5899c928c2fa350f4b1521e\n>      (\"git-svn: document the 'git svn propset' command\")\n>      https://bogomips.org/git-svn.git/commit/?id=19a7f24b6f8a\n>\n>      https://public-inbox.org/git/?q=s:%22git-svn+propset%22\n>\n> Anyways I've never used SVN props much myself, so don't much\n> have experience in this area; nor do I have much experience\n> with git-side gitattributes.\n>\nThank you.  I'm going to need some time to look into this.  The addition \nof svn-properties support was mostly to facilitate those that needed \nattributes set for other svn consumers or \"repo meister\" (the person \nthat runs VCS).  An example being FreeBSD's 'Keyword expansion' on \ncheckout facility, that says whether or not to expand $FreeBSD$.\n\nI hadn't anticipated there be to translation between svn props and \n.gitattributes, it sounds a bit messy but possible, that said, is it not \npossible to commit .gitattribute files to the svn repo?  Even in FreeBSD \nland such small token files are permitted.\n\nAs far as documenting svn-properties, most of the properties are used on \nthe Subversion side either by subversion itself, or by scripts in the \nsubversion repository.  Perhaps a blurb \"see the subversion \ndocumentation and/or your local subversion administrator's guide for \nproperties and their uses.\" would suffice?\n\nOpinions?  Happy to look into it.\n\n-Alfred\n\n\n\n\n\n\n"},{"id":"299895","messageId":"20160823055418.GA5990@whir","threadId":"43908","inReplyTo":"5e17164f-f669-70c2-de78-25287ab59759@freebsd.org","subject":"Re: git-svn bridge and line endings","fromName":"Eric Wong","fromEmail":"e@80x24.org","sentAt":"2016-08-23T05:54:18Z","receivedAt":"2016-08-23T05:54:24Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Alfred Perlstein <alfred@freebsd.org> wrote:\n> I hadn't anticipated there be to translation between svn props and\n> .gitattributes, it sounds a bit messy but possible, that said, is it\n> not possible to commit .gitattribute files to the svn repo?  Even in\n> FreeBSD land such small token files are permitted.\n\nI'm not sure if an automatic translation is necessary or\ndesired (because of a corruption risk).\n\nPerhaps Lucian can clarify the situation for his repo.\n\n> As far as documenting svn-properties, most of the properties are\n> used on the Subversion side either by subversion itself, or by\n> scripts in the subversion repository.  Perhaps a blurb \"see the\n> subversion documentation and/or your local subversion\n> administrator's guide for properties and their uses.\" would suffice?\n\nYes, perhaps with a workable example Lucian can use today with\nany git v2.3.0 or later.\n\nThanks for the quick response!\n\n> Opinions?  Happy to look into it.\n"},{"id":"299953","messageId":"CAHLmBr3Yn1tVhijmgRwd8hyxgasdc2VtfNi6pYP5FbEHjjb3Vw@mail.gmail.com","threadId":"43908","inReplyTo":"20160823055418.GA5990@whir","subject":"Re: git-svn bridge and line endings","fromName":"Lucian Smith","fromEmail":"lucianoelsmitho@gmail.com","sentAt":"2016-08-23T16:14:23Z","receivedAt":"2016-08-23T16:14:30Z","isPatch":false,"sender":{"key":"lucianoelsmitho@gmail.com","avatar":"https://gravatar.com/avatar/6581c7d4a526dc523c0703a068ce7ae536917ed5268cb4b2421c402fe4ed99ac?d=mp&s=160"},"body":"Thanks for the quick responses!\n\nMy situation is that the git side is entirely whatever github.org is\nrunning; presumably the latest stable version?  They provide a URL for\nrepositories hosted there that can be accessed by an SVN\nclient--somewhere on github is the 'git-svn bridge' (as I understand\nit): something that receives SVN requests, translates them to\ngit-speak, and replies with what SVN expects.\n\nThere is indeed a .gitattributes file in the repository, but the SVN\nclient doesn't know what to do with it.  My hope was that something in\nthe bridge code, that translated SVN requests to git and back, could\ntake the SVN request, \"Please give me this file; I'm on Windows\" look\nat the .gitattributes file in the repository, and hand out a file with\nCR/LF's in it.  Conversely, when SVN tells git \"Here is the new\nversion of the file to check in,\" the bridge could look at the file,\nrealize it had CR/LF's in it, look at the .gitattributes file to know\nif it needed to be converted, and then convert it appropriately.\n\nI can imagine a full-blown bridge that could even translate the SVN\nEOL propset back and forth appropriately, but I'm not sure if going\nthat far is necessary and/or helpful.\n\nI don't know if this is the right mailing list for that particular bit\nof software, but it at least seemed like a good place to start.  Thank\nyou!\n\n-Lucian\n\nOn Mon, Aug 22, 2016 at 10:54 PM, Eric Wong <e@80x24.org> wrote:\n> Alfred Perlstein <alfred@freebsd.org> wrote:\n>> I hadn't anticipated there be to translation between svn props and\n>> .gitattributes, it sounds a bit messy but possible, that said, is it\n>> not possible to commit .gitattribute files to the svn repo?  Even in\n>> FreeBSD land such small token files are permitted.\n>\n> I'm not sure if an automatic translation is necessary or\n> desired (because of a corruption risk).\n>\n> Perhaps Lucian can clarify the situation for his repo.\n>\n>> As far as documenting svn-properties, most of the properties are\n>> used on the Subversion side either by subversion itself, or by\n>> scripts in the subversion repository.  Perhaps a blurb \"see the\n>> subversion documentation and/or your local subversion\n>> administrator's guide for properties and their uses.\" would suffice?\n>\n> Yes, perhaps with a workable example Lucian can use today with\n> any git v2.3.0 or later.\n>\n> Thanks for the quick response!\n>\n>> Opinions?  Happy to look into it.\n"},{"id":"299961","messageId":"20160823164326.GA22168@tb-raspi","threadId":"43908","inReplyTo":"CAHLmBr1JHjjp66Er-2e6Yu+3zjrhT82Da-O8fj6_OoPtEPz8eg@mail.gmail.com","subject":"Re: git-svn bridge and line endings","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2016-08-23T16:43:26Z","receivedAt":"2016-08-23T16:43:53Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On Mon, Aug 22, 2016 at 05:04:47PM -0700, Lucian Smith wrote:\n> I'm attempting to use the git-svn bridge, and am having problems with\n> line endings on Windows.\n> \n> The setup is that we have a git repository on github, and I've checked\n> out a branch on my Windows machine using Tortoise svn.  I make\n> changes, commit them, and the branch is updated.  In general, this\n> works fine.\n\nJust to make sure:\nThe repo is in git format.\nIs it a public repo ?\nOr could you make a piblic demo repo ?\nDo I understand it right: Tortoise SVN talks directly to the Git server ?\nIsn't Tortoise SVN a client to talk to SVN server?\nWhat goes over the wire to the remote Git server, git or SVN ?\n\nTo my understanding, \"git svn\" can use Git locally, and talk to an SVN server.\nWhat do I miss ?\n\n> \n> If this was just SVN, I could set the 'eol-style' for files to\n> 'native' to let it know to expect Windows/linux/mac line endings for\n> particular files.  This seems to be handled in git by using the\n> '.gitattributes' file instead.  Unfortunately, the git/svn bridge\n> doesn't seem to be translate the information in the .gitattributes\n> file to appropriate eol-style settings in SVN.  Checking out a file\n> using SVN on Windows leaves me with a file without CRLF's, and if I\n> check in a CRLF file, that's the way it goes into the repository.\n> Differences in CRLF alone show up as 'real' differences that can be\n> checked in, and, if this happens, this causes problems with other\n> people's repositories.\n> \n> Am I doing something wrong; is there another way to handle this; or\n> can I file this as a bug report/feature request?\n\n"},{"id":"299964","messageId":"CAHLmBr0gZNnQ7ycDqTSJ-f6YpgSr7Yfjjqd21P5KjQRyC88K8Q@mail.gmail.com","threadId":"43908","inReplyTo":"20160823164326.GA22168@tb-raspi","subject":"Re: git-svn bridge and line endings","fromName":"Lucian Smith","fromEmail":"lucianoelsmitho@gmail.com","sentAt":"2016-08-23T17:08:37Z","receivedAt":"2016-08-23T17:09:26Z","isPatch":false,"sender":{"key":"lucianoelsmitho@gmail.com","avatar":"https://gravatar.com/avatar/6581c7d4a526dc523c0703a068ce7ae536917ed5268cb4b2421c402fe4ed99ac?d=mp&s=160"},"body":"On Tue, Aug 23, 2016 at 9:43 AM, Torsten Bögershausen <tboegi@web.de> wrote:\n> On Mon, Aug 22, 2016 at 05:04:47PM -0700, Lucian Smith wrote:\n>> I'm attempting to use the git-svn bridge, and am having problems with\n>> line endings on Windows.\n>>\n>> The setup is that we have a git repository on github, and I've checked\n>> out a branch on my Windows machine using Tortoise svn.  I make\n>> changes, commit them, and the branch is updated.  In general, this\n>> works fine.\n>\n> Just to make sure:\n> The repo is in git format.\n> Is it a public repo ?\n\nYes, it is.  In fact, it's https://github.com/sbmlteam/sbml-test-suite\n\n> Or could you make a piblic demo repo ?\n> Do I understand it right: Tortoise SVN talks directly to the Git server ?\n\nThis is the part that is a little bit of black magic for me, but yes:\nI point TortoiseSVN at\nhttps://github.com/sbmlteam/test-suite.git/branches/develop and tell\nit to check that out, update, commit, etc.\n\n> Isn't Tortoise SVN a client to talk to SVN server?\n> What goes over the wire to the remote Git server, git or SVN ?\n\nThat's a good question ;-)  I think SVN!\n\n> To my understanding, \"git svn\" can use Git locally, and talk to an SVN server.\n> What do I miss ?\n\nI assume something is using \"git svn\" on the github side of things,\nbut I don't know for sure, and I'm not sure who's in charge of that,\neither.\n\n-Lucian\n\n>> If this was just SVN, I could set the 'eol-style' for files to\n>> 'native' to let it know to expect Windows/linux/mac line endings for\n>> particular files.  This seems to be handled in git by using the\n>> '.gitattributes' file instead.  Unfortunately, the git/svn bridge\n>> doesn't seem to be translate the information in the .gitattributes\n>> file to appropriate eol-style settings in SVN.  Checking out a file\n>> using SVN on Windows leaves me with a file without CRLF's, and if I\n>> check in a CRLF file, that's the way it goes into the repository.\n>> Differences in CRLF alone show up as 'real' differences that can be\n>> checked in, and, if this happens, this causes problems with other\n>> people's repositories.\n>>\n>> Am I doing something wrong; is there another way to handle this; or\n>> can I file this as a bug report/feature request?\n>\n"},{"id":"299967","messageId":"xmqqh9abwg4j.fsf@gitster.mtv.corp.google.com","threadId":"43908","inReplyTo":"CAHLmBr1JHjjp66Er-2e6Yu+3zjrhT82Da-O8fj6_OoPtEPz8eg@mail.gmail.com","subject":"Re: git-svn bridge and line endings","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-08-23T17:26:52Z","receivedAt":"2016-08-23T17:27:00Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Lucian Smith <lucianoelsmitho@gmail.com> writes:\n\n> The setup is that we have a git repository on github, and I've checked\n> out a branch on my Windows machine using Tortoise svn.  I make\n> changes, commit them, and the branch is updated.  In general, this\n> works fine.\n\nHmph, doesn't Windows port ship with core.autocrlf these days?\n"},{"id":"299968","messageId":"CAHLmBr3+3WccbYTm1v2_jd+hR6rygJQfPtH6+MMP-xPLjEy72w@mail.gmail.com","threadId":"43908","inReplyTo":"xmqqh9abwg4j.fsf@gitster.mtv.corp.google.com","subject":"Re: git-svn bridge and line endings","fromName":"Lucian Smith","fromEmail":"lucianoelsmitho@gmail.com","sentAt":"2016-08-23T17:31:23Z","receivedAt":"2016-08-23T17:32:11Z","isPatch":false,"sender":{"key":"lucianoelsmitho@gmail.com","avatar":"https://gravatar.com/avatar/6581c7d4a526dc523c0703a068ce7ae536917ed5268cb4b2421c402fe4ed99ac?d=mp&s=160"},"body":"Windows doesn't have any problem reading files with any form of crlf.\nThe main issue we have run into thus far is that if I create a new\nfile in Windows, it's going to have crlf, and if I check it in that\nway through this svn process, the file is then stored with crlfs,\nwhich git does not expect.  A wide variety of problems results.\n\n-Lucian\n\nOn Tue, Aug 23, 2016 at 10:26 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Lucian Smith <lucianoelsmitho@gmail.com> writes:\n>\n>> The setup is that we have a git repository on github, and I've checked\n>> out a branch on my Windows machine using Tortoise svn.  I make\n>> changes, commit them, and the branch is updated.  In general, this\n>> works fine.\n>\n> Hmph, doesn't Windows port ship with core.autocrlf these days?\n"},{"id":"299973","messageId":"CAHLmBr1Cd_JimZEsLUjG=+v4CgsXGGzkyFizZ1U5YSSMqjsEvw@mail.gmail.com","threadId":"43908","inReplyTo":"501dc45544c5582379df21a758d3be6c@quantumfyre.co.uk","subject":"Re: git-svn bridge and line endings","fromName":"Lucian Smith","fromEmail":"lucianoelsmitho@gmail.com","sentAt":"2016-08-23T17:50:52Z","receivedAt":"2016-08-23T17:51:00Z","isPatch":false,"sender":{"key":"lucianoelsmitho@gmail.com","avatar":"https://gravatar.com/avatar/6581c7d4a526dc523c0703a068ce7ae536917ed5268cb4b2421c402fe4ed99ac?d=mp&s=160"},"body":"On Tue, Aug 23, 2016 at 10:36 AM, Julian Phillips\n<julian@quantumfyre.co.uk> wrote:\n> On 23/08/2016 17:14, Lucian Smith wrote:\n>>\n>> Thanks for the quick responses!\n>>\n>> My situation is that the git side is entirely whatever github.org is\n>> running; presumably the latest stable version?  They provide a URL for\n>> repositories hosted there that can be accessed by an SVN\n>> client--somewhere on github is the 'git-svn bridge' (as I understand\n>> it): something that receives SVN requests, translates them to\n>> git-speak, and replies with what SVN expects.\n>\n>\n> The ability to use a Subversion client is functionality provided by GitHub,\n> and not native to git itself.  So unless someone for the appropriate GitHub\n> team happens to read this thread I expect there isn't much we can do to\n> help.  I don't know if they've even provided any real detail of how they\n> implemented the bridge.\n\nAll right, that makes sense.  And yeah, it was hard to find any\ninformation about the bridge, which is why I ended up here...\n\n>> There is indeed a .gitattributes file in the repository, but the SVN\n>> client doesn't know what to do with it.  My hope was that something in\n>> the bridge code, that translated SVN requests to git and back, could\n>> take the SVN request, \"Please give me this file; I'm on Windows\" look\n>> at the .gitattributes file in the repository, and hand out a file with\n>> CR/LF's in it.  Conversely, when SVN tells git \"Here is the new\n>> version of the file to check in,\" the bridge could look at the file,\n>> realize it had CR/LF's in it, look at the .gitattributes file to know\n>> if it needed to be converted, and then convert it appropriately.\n>>\n>> I can imagine a full-blown bridge that could even translate the SVN\n>> EOL propset back and forth appropriately, but I'm not sure if going\n>> that far is necessary and/or helpful.\n>>\n>> I don't know if this is the right mailing list for that particular bit\n>> of software, but it at least seemed like a good place to start.  Thank\n>> you!\n>\n>\n> Supported properties are listed here:\n> https://help.github.com/articles/subversion-properties-supported-by-github/\n>\n> You'll need to ask GitHub to implement support for the svn:eol-style\n> property I expect.\n\nThanks for finding that!  That even has an 'ask a human' button, which\nI expect is my next step.\n\n> Might be easier to just use Tortoise Git?\n\nIt may be!  But thanks for the responses anyway.\n\n-Lucian\n"},{"id":"299976","messageId":"501dc45544c5582379df21a758d3be6c@quantumfyre.co.uk","threadId":"43908","inReplyTo":"CAHLmBr3Yn1tVhijmgRwd8hyxgasdc2VtfNi6pYP5FbEHjjb3Vw@mail.gmail.com","subject":"Re: git-svn bridge and line endings","fromName":"Julian Phillips","fromEmail":"julian@quantumfyre.co.uk","sentAt":"2016-08-23T17:36:03Z","receivedAt":"2016-08-23T17:59:18Z","isPatch":false,"sender":{"key":"julian@quantumfyre.co.uk","avatar":"https://avatars.githubusercontent.com/u/948888?v=4"},"body":"On 23/08/2016 17:14, Lucian Smith wrote:\n> Thanks for the quick responses!\n> \n> My situation is that the git side is entirely whatever github.org is\n> running; presumably the latest stable version?  They provide a URL for\n> repositories hosted there that can be accessed by an SVN\n> client--somewhere on github is the 'git-svn bridge' (as I understand\n> it): something that receives SVN requests, translates them to\n> git-speak, and replies with what SVN expects.\n\nThe ability to use a Subversion client is functionality provided by \nGitHub, and not native to git itself.  So unless someone for the \nappropriate GitHub team happens to read this thread I expect there isn't \nmuch we can do to help.  I don't know if they've even provided any real \ndetail of how they implemented the bridge.\n\n> There is indeed a .gitattributes file in the repository, but the SVN\n> client doesn't know what to do with it.  My hope was that something in\n> the bridge code, that translated SVN requests to git and back, could\n> take the SVN request, \"Please give me this file; I'm on Windows\" look\n> at the .gitattributes file in the repository, and hand out a file with\n> CR/LF's in it.  Conversely, when SVN tells git \"Here is the new\n> version of the file to check in,\" the bridge could look at the file,\n> realize it had CR/LF's in it, look at the .gitattributes file to know\n> if it needed to be converted, and then convert it appropriately.\n> \n> I can imagine a full-blown bridge that could even translate the SVN\n> EOL propset back and forth appropriately, but I'm not sure if going\n> that far is necessary and/or helpful.\n> \n> I don't know if this is the right mailing list for that particular bit\n> of software, but it at least seemed like a good place to start.  Thank\n> you!\n\nSupported properties are listed here: \nhttps://help.github.com/articles/subversion-properties-supported-by-github/\n\nYou'll need to ask GitHub to implement support for the svn:eol-style \nproperty I expect.\n\nMight be easier to just use Tortoise Git?\n\n> -Lucian\n> \n> On Mon, Aug 22, 2016 at 10:54 PM, Eric Wong <e@80x24.org> wrote:\n>> Alfred Perlstein <alfred@freebsd.org> wrote:\n>>> I hadn't anticipated there be to translation between svn props and\n>>> .gitattributes, it sounds a bit messy but possible, that said, is it\n>>> not possible to commit .gitattribute files to the svn repo?  Even in\n>>> FreeBSD land such small token files are permitted.\n>> \n>> I'm not sure if an automatic translation is necessary or\n>> desired (because of a corruption risk).\n>> \n>> Perhaps Lucian can clarify the situation for his repo.\n>> \n>>> As far as documenting svn-properties, most of the properties are\n>>> used on the Subversion side either by subversion itself, or by\n>>> scripts in the subversion repository.  Perhaps a blurb \"see the\n>>> subversion documentation and/or your local subversion\n>>> administrator's guide for properties and their uses.\" would suffice?\n>> \n>> Yes, perhaps with a workable example Lucian can use today with\n>> any git v2.3.0 or later.\n>> \n>> Thanks for the quick response!\n>> \n>>> Opinions?  Happy to look into it.\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n\n-- \nJulian\n"},{"id":"299979","messageId":"cfb712ee-ff0e-0f62-0477-6edf483d4101@web.de","threadId":"43908","inReplyTo":"CAHLmBr1Cd_JimZEsLUjG=+v4CgsXGGzkyFizZ1U5YSSMqjsEvw@mail.gmail.com","subject":"Re: git-svn bridge and line endings","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2016-08-23T19:07:33Z","receivedAt":"2016-08-23T19:17:03Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 23.08.16 19:50, Lucian Smith wrote:\n> On Tue, Aug 23, 2016 at 10:36 AM, Julian Phillips\n> <julian@quantumfyre.co.uk> wrote:\n>> On 23/08/2016 17:14, Lucian Smith wrote:\n>>>\n>>> Thanks for the quick responses!\n>>>\n>>> My situation is that the git side is entirely whatever github.org is\n>>> running; presumably the latest stable version?  They provide a URL for\n>>> repositories hosted there that can be accessed by an SVN\n>>> client--somewhere on github is the 'git-svn bridge' (as I understand\n>>> it): something that receives SVN requests, translates them to\n>>> git-speak, and replies with what SVN expects.\n>>\n>>\n>> The ability to use a Subversion client is functionality provided by GitHub,\n>> and not native to git itself.  So unless someone for the appropriate GitHub\n>> team happens to read this thread I expect there isn't much we can do to\n>> help.  I don't know if they've even provided any real detail of how they\n>> implemented the bridge.\n> \n> All right, that makes sense.  And yeah, it was hard to find any\n> information about the bridge, which is why I ended up here...\n> \n>>> There is indeed a .gitattributes file in the repository, but the SVN\n>>> client doesn't know what to do with it.  My hope was that something in\n>>> the bridge code, that translated SVN requests to git and back, could\n>>> take the SVN request, \"Please give me this file; I'm on Windows\" look\n>>> at the .gitattributes file in the repository, and hand out a file with\n>>> CR/LF's in it.  Conversely, when SVN tells git \"Here is the new\n>>> version of the file to check in,\" the bridge could look at the file,\n>>> realize it had CR/LF's in it, look at the .gitattributes file to know\n>>> if it needed to be converted, and then convert it appropriately.\n>>>\n>>> I can imagine a full-blown bridge that could even translate the SVN\n>>> EOL propset back and forth appropriately, but I'm not sure if going\n>>> that far is necessary and/or helpful.\n>>>\n>>> I don't know if this is the right mailing list for that particular bit\n>>> of software, but it at least seemed like a good place to start.  Thank\n>>> you!\n>>\n>>\n>> Supported properties are listed here:\n>> https://help.github.com/articles/subversion-properties-supported-by-github/\n>>\n>> You'll need to ask GitHub to implement support for the svn:eol-style\n>> property I expect.\n> \n> Thanks for finding that!  That even has an 'ask a human' button, which\n> I expect is my next step.\n> \n>> Might be easier to just use Tortoise Git?\n> \n> It may be!  But thanks for the responses anyway.\nMost text-files have been commited with LF:\n/tmp/ttt/sbml-test-suite> git ls-files --eol | grep \"i/lf\" | wc -l\n   10266\nSome have been commited with CRLF:\n/tmp/ttt/sbml-test-suite> git ls-files --eol | grep \"i/crlf\" | wc -l\n    1620\n\n\nThe whole repo deserves to be normalized and equipped with a .gitattributes file,\nsee\n\nhttps://www.kernel.org/pub/software/scm/git/docs/gitattributes.html\n\n\n"}]}