{"thread":{"id":"42094","subject":"[PATCH] Update git-p4 to be compatible with git-lfs 1.2","startedAt":"2016-04-20T18:28:34Z","lastAt":"2016-04-28T06:09:20Z","messageCount":10,"participants":["Ben Woosley","Luke Diamand","Lars Schneider","SZEDER Gábor","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"283975","messageId":"0102015434ee502d-d91a9a46-299f-47b0-a583-104b540200bc-000000@eu-west-1.amazonses.com","threadId":"42094","inReplyTo":null,"subject":"[PATCH] Update git-p4 to be compatible with git-lfs 1.2","fromName":"Ben Woosley","fromEmail":"ben.woosley@gmail.com","sentAt":"2016-04-20T18:28:34Z","receivedAt":"2016-04-20T18:28:34Z","isPatch":true,"sender":{"key":"ben.woosley@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5470?v=4"},"body":"From: Ben Woosley <ben.woosley@gmail.com>\n\nThe git lfs pointer output was changed in:\nhttps://github.com/github/git-lfs/pull/1105\n\nThis was causing Mac Travis runs to fail, as homebrew had updated to 1.2\nwhile Linux was pinned at 1.1 via GIT_LFS_VERSION.\n\nThe travis builds against 1.1 and 1.2 both on linux. Mac can't do the same as\nit takes the latest homebrew version regardless.\n---\n .travis.yml | 9 ++++++++-\n git-p4.py   | 7 ++++++-\n 2 files changed, 14 insertions(+), 2 deletions(-)\n\ndiff --git a/.travis.yml b/.travis.yml\nindex 78e433b..71510ee 100644\n--- a/.travis.yml\n+++ b/.travis.yml\n@@ -23,7 +23,6 @@ env:\n   global:\n     - DEVELOPER=1\n     - P4_VERSION=\"15.2\"\n-    - GIT_LFS_VERSION=\"1.1.0\"\n     - DEFAULT_TEST_TARGET=prove\n     - GIT_PROVE_OPTS=\"--timer --jobs 3 --state=failed,slow,save\"\n     - GIT_TEST_OPTS=\"--verbose --tee\"\n@@ -31,6 +30,14 @@ env:\n     # t9810 occasionally fails on Travis CI OS X\n     # t9816 occasionally fails with \"TAP out of sequence errors\" on Travis CI OS X\n     - GIT_SKIP_TESTS=\"t9810 t9816\"\n+  matrix:\n+    - GIT_LFS_VERSION=\"1.2.0\"\n+    - GIT_LFS_VERSION=\"1.1.0\"\n+\n+matrix:\n+  exclude:\n+    - os: osx\n+      env: GIT_LFS_VERSION=\"1.1.0\"\n \n before_install:\n   - >\ndiff --git a/git-p4.py b/git-p4.py\nindex 527d44b..6c06d17 100755\n--- a/git-p4.py\n+++ b/git-p4.py\n@@ -1064,7 +1064,12 @@ def generatePointer(self, contentFile):\n         if pointerProcess.wait():\n             os.remove(contentFile)\n             die('git-lfs pointer command failed. Did you install the extension?')\n-        pointerContents = [i+'\\n' for i in pointerFile.split('\\n')[2:][:-1]]\n+        pointerLines = pointerFile.split('\\n')\n+        # In git-lfs < 1.2, the pointer output included some extraneous information\n+        # this was removed in https://github.com/github/git-lfs/pull/1105\n+        if pointerLines[0].startswith('Git LFS pointer for'):\n+            pointerLines = pointerLines[2:]\n+        pointerContents = [i+'\\n' for i in pointerLines[:-1]]\n         oid = pointerContents[1].split(' ')[1].split(':')[1][:-1]\n         localLargeFile = os.path.join(\n             os.getcwd(),\n\n--\nhttps://github.com/git/git/pull/231\n"},{"id":"283980","messageId":"CAE5ih79A2D8xTi9MuOYJ=dU12P5hOsLbw+XXptcnhAATwZvBCQ@mail.gmail.com","threadId":"42094","inReplyTo":"0102015434ee502d-d91a9a46-299f-47b0-a583-104b540200bc-000000@eu-west-1.amazonses.com","subject":"Re: [PATCH] Update git-p4 to be compatible with git-lfs 1.2","fromName":"Luke Diamand","fromEmail":"luke@diamand.org","sentAt":"2016-04-20T19:00:36Z","receivedAt":"2016-04-20T19:00:36Z","isPatch":true,"sender":{"key":"luke@diamand.org","avatar":"https://avatars.githubusercontent.com/u/5330967?v=4"},"body":"On 20 April 2016 at 19:28, Ben Woosley <Ben.Woosley@gmail.com> wrote:\n> From: Ben Woosley <ben.woosley@gmail.com>\n>\n> The git lfs pointer output was changed in:\n> https://github.com/github/git-lfs/pull/1105\n>\n> This was causing Mac Travis runs to fail, as homebrew had updated to 1.2\n> while Linux was pinned at 1.1 via GIT_LFS_VERSION.\n>\n> The travis builds against 1.1 and 1.2 both on linux. Mac can't do the same as\n> it takes the latest homebrew version regardless.\n\nIs this related to the very similar thread going on here:\n\nhttp://thread.gmane.org/gmane.comp.version-control.git/291917/focus=291926\n\nThanks\nLuke\n\n\n\n> ---\n>  .travis.yml | 9 ++++++++-\n>  git-p4.py   | 7 ++++++-\n>  2 files changed, 14 insertions(+), 2 deletions(-)\n>\n> diff --git a/.travis.yml b/.travis.yml\n> index 78e433b..71510ee 100644\n> --- a/.travis.yml\n> +++ b/.travis.yml\n> @@ -23,7 +23,6 @@ env:\n>    global:\n>      - DEVELOPER=1\n>      - P4_VERSION=\"15.2\"\n> -    - GIT_LFS_VERSION=\"1.1.0\"\n>      - DEFAULT_TEST_TARGET=prove\n>      - GIT_PROVE_OPTS=\"--timer --jobs 3 --state=failed,slow,save\"\n>      - GIT_TEST_OPTS=\"--verbose --tee\"\n> @@ -31,6 +30,14 @@ env:\n>      # t9810 occasionally fails on Travis CI OS X\n>      # t9816 occasionally fails with \"TAP out of sequence errors\" on Travis CI OS X\n>      - GIT_SKIP_TESTS=\"t9810 t9816\"\n> +  matrix:\n> +    - GIT_LFS_VERSION=\"1.2.0\"\n> +    - GIT_LFS_VERSION=\"1.1.0\"\n> +\n> +matrix:\n> +  exclude:\n> +    - os: osx\n> +      env: GIT_LFS_VERSION=\"1.1.0\"\n>\n>  before_install:\n>    - >\n> diff --git a/git-p4.py b/git-p4.py\n> index 527d44b..6c06d17 100755\n> --- a/git-p4.py\n> +++ b/git-p4.py\n> @@ -1064,7 +1064,12 @@ def generatePointer(self, contentFile):\n>          if pointerProcess.wait():\n>              os.remove(contentFile)\n>              die('git-lfs pointer command failed. Did you install the extension?')\n> -        pointerContents = [i+'\\n' for i in pointerFile.split('\\n')[2:][:-1]]\n> +        pointerLines = pointerFile.split('\\n')\n> +        # In git-lfs < 1.2, the pointer output included some extraneous information\n> +        # this was removed in https://github.com/github/git-lfs/pull/1105\n> +        if pointerLines[0].startswith('Git LFS pointer for'):\n> +            pointerLines = pointerLines[2:]\n> +        pointerContents = [i+'\\n' for i in pointerLines[:-1]]\n>          oid = pointerContents[1].split(' ')[1].split(':')[1][:-1]\n>          localLargeFile = os.path.join(\n>              os.getcwd(),\n>\n> --\n> https://github.com/git/git/pull/231\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"},{"id":"283982","messageId":"CAC5gnOx1ZbNnYzMYYfD5TkXkgHAz7qgOTVCEiu2D0PA-MZLrvQ@mail.gmail.com","threadId":"42094","inReplyTo":"CAE5ih79A2D8xTi9MuOYJ=dU12P5hOsLbw+XXptcnhAATwZvBCQ@mail.gmail.com","subject":"Re: [PATCH] Update git-p4 to be compatible with git-lfs 1.2","fromName":"Ben Woosley","fromEmail":"ben.woosley@gmail.com","sentAt":"2016-04-20T19:13:21Z","receivedAt":"2016-04-20T19:13:21Z","isPatch":true,"sender":{"key":"ben.woosley@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5470?v=4"},"body":"Yep it's addressing the same problem - I developed this independently\nafter having only viewed the github repo:\nhttps://github.com/git/git/pull/231\n\nThings I like about my patch:\n1) it maintains ongoing support for git-lfs 1.1 by retaining it in the travis CI\n2) it's a fairly minimal intervention into the existing behavior\n\nLars how about adding my Travis changes to your patch?\nHere's a look at the CI output: https://travis-ci.org/git/git/builds/124105972\n\nBest,\nBen\n\nOn Wed, Apr 20, 2016 at 12:00 PM, Luke Diamand <luke@diamand.org> wrote:\n> On 20 April 2016 at 19:28, Ben Woosley <Ben.Woosley@gmail.com> wrote:\n>> From: Ben Woosley <ben.woosley@gmail.com>\n>>\n>> The git lfs pointer output was changed in:\n>> https://github.com/github/git-lfs/pull/1105\n>>\n>> This was causing Mac Travis runs to fail, as homebrew had updated to 1.2\n>> while Linux was pinned at 1.1 via GIT_LFS_VERSION.\n>>\n>> The travis builds against 1.1 and 1.2 both on linux. Mac can't do the same as\n>> it takes the latest homebrew version regardless.\n>\n> Is this related to the very similar thread going on here:\n>\n> http://thread.gmane.org/gmane.comp.version-control.git/291917/focus=291926\n>\n> Thanks\n> Luke\n>\n>\n>\n>> ---\n>>  .travis.yml | 9 ++++++++-\n>>  git-p4.py   | 7 ++++++-\n>>  2 files changed, 14 insertions(+), 2 deletions(-)\n>>\n>> diff --git a/.travis.yml b/.travis.yml\n>> index 78e433b..71510ee 100644\n>> --- a/.travis.yml\n>> +++ b/.travis.yml\n>> @@ -23,7 +23,6 @@ env:\n>>    global:\n>>      - DEVELOPER=1\n>>      - P4_VERSION=\"15.2\"\n>> -    - GIT_LFS_VERSION=\"1.1.0\"\n>>      - DEFAULT_TEST_TARGET=prove\n>>      - GIT_PROVE_OPTS=\"--timer --jobs 3 --state=failed,slow,save\"\n>>      - GIT_TEST_OPTS=\"--verbose --tee\"\n>> @@ -31,6 +30,14 @@ env:\n>>      # t9810 occasionally fails on Travis CI OS X\n>>      # t9816 occasionally fails with \"TAP out of sequence errors\" on Travis CI OS X\n>>      - GIT_SKIP_TESTS=\"t9810 t9816\"\n>> +  matrix:\n>> +    - GIT_LFS_VERSION=\"1.2.0\"\n>> +    - GIT_LFS_VERSION=\"1.1.0\"\n>> +\n>> +matrix:\n>> +  exclude:\n>> +    - os: osx\n>> +      env: GIT_LFS_VERSION=\"1.1.0\"\n>>\n>>  before_install:\n>>    - >\n>> diff --git a/git-p4.py b/git-p4.py\n>> index 527d44b..6c06d17 100755\n>> --- a/git-p4.py\n>> +++ b/git-p4.py\n>> @@ -1064,7 +1064,12 @@ def generatePointer(self, contentFile):\n>>          if pointerProcess.wait():\n>>              os.remove(contentFile)\n>>              die('git-lfs pointer command failed. Did you install the extension?')\n>> -        pointerContents = [i+'\\n' for i in pointerFile.split('\\n')[2:][:-1]]\n>> +        pointerLines = pointerFile.split('\\n')\n>> +        # In git-lfs < 1.2, the pointer output included some extraneous information\n>> +        # this was removed in https://github.com/github/git-lfs/pull/1105\n>> +        if pointerLines[0].startswith('Git LFS pointer for'):\n>> +            pointerLines = pointerLines[2:]\n>> +        pointerContents = [i+'\\n' for i in pointerLines[:-1]]\n>>          oid = pointerContents[1].split(' ')[1].split(':')[1][:-1]\n>>          localLargeFile = os.path.join(\n>>              os.getcwd(),\n>>\n>> --\n>> https://github.com/git/git/pull/231\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"},{"id":"283983","messageId":"E90E5734-C130-42A4-9230-9C95A466C919@gmail.com","threadId":"42094","inReplyTo":"CAC5gnOx1ZbNnYzMYYfD5TkXkgHAz7qgOTVCEiu2D0PA-MZLrvQ@mail.gmail.com","subject":"Re: [PATCH] Update git-p4 to be compatible with git-lfs 1.2","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-04-20T19:36:16Z","receivedAt":"2016-04-20T19:36:16Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"\n> On Wed, Apr 20, 2016 at 12:00 PM, Luke Diamand <luke@diamand.org> wrote:\n>> On 20 April 2016 at 19:28, Ben Woosley <Ben.Woosley@gmail.com> wrote:\n>>> From: Ben Woosley <ben.woosley@gmail.com>\n>>> \n>>> The git lfs pointer output was changed in:\n>>> https://github.com/github/git-lfs/pull/1105\n>>> \n>>> This was causing Mac Travis runs to fail, as homebrew had updated to 1.2\n>>> while Linux was pinned at 1.1 via GIT_LFS_VERSION.\n>>> \n>>> The travis builds against 1.1 and 1.2 both on linux. Mac can't do the same as\n>>> it takes the latest homebrew version regardless.\n>> \n>> Is this related to the very similar thread going on here:\n>> \n>> http://thread.gmane.org/gmane.comp.version-control.git/291917/focus=291926\n>> \n>> Thanks\n>> Luke\n\n\nOn 20 Apr 2016, at 21:13, Ben Woosley <ben.woosley@gmail.com> wrote:\n\n> Yep it's addressing the same problem - I developed this independently\n> after having only viewed the github repo:\n> https://github.com/git/git/pull/231\n> \n> Things I like about my patch:\n> 1) it maintains ongoing support for git-lfs 1.1 by retaining it in the travis CI\n> 2) it's a fairly minimal intervention into the existing behavior\n> \n> Lars how about adding my Travis changes to your patch?\n> Here's a look at the CI output: https://travis-ci.org/git/git/builds/124105972\n> \n> Best,\n> Ben\n\n\nThanks a lot for your fix! It's great to see other people than\nme actually using this feature :)\n\nI already sent a v2 with LFS 1.x support, too:\nhttp://article.gmane.org/gmane.comp.version-control.git/291993\nWould you mind reviewing it, too?\nSorry for the duplicated work :-(\n\nYour Travis changes are 100% correct and a very nice way to ensure we \nsupport Git LFS 1.1 and Git LFS 1.2. Unfortunately we run all other Git\ntests twice which increases the overall build time a lot (because we\ncan only run 5 build jobs in parallel with the free Travis CI plan).\nI am not sure if testing an outdated LFS version justifies the increased\nbuild times...\n\nBest,\nLars\n\nPS: Please see Junio's comment regarding top posting:\nhttp://article.gmane.org/gmane.comp.version-control.git/291932\n\n>> \n>> \n>> \n>>> ---\n>>> .travis.yml | 9 ++++++++-\n>>> git-p4.py   | 7 ++++++-\n>>> 2 files changed, 14 insertions(+), 2 deletions(-)\n>>> \n>>> diff --git a/.travis.yml b/.travis.yml\n>>> index 78e433b..71510ee 100644\n>>> --- a/.travis.yml\n>>> +++ b/.travis.yml\n>>> @@ -23,7 +23,6 @@ env:\n>>>   global:\n>>>     - DEVELOPER=1\n>>>     - P4_VERSION=\"15.2\"\n>>> -    - GIT_LFS_VERSION=\"1.1.0\"\n>>>     - DEFAULT_TEST_TARGET=prove\n>>>     - GIT_PROVE_OPTS=\"--timer --jobs 3 --state=failed,slow,save\"\n>>>     - GIT_TEST_OPTS=\"--verbose --tee\"\n>>> @@ -31,6 +30,14 @@ env:\n>>>     # t9810 occasionally fails on Travis CI OS X\n>>>     # t9816 occasionally fails with \"TAP out of sequence errors\" on Travis CI OS X\n>>>     - GIT_SKIP_TESTS=\"t9810 t9816\"\n>>> +  matrix:\n>>> +    - GIT_LFS_VERSION=\"1.2.0\"\n>>> +    - GIT_LFS_VERSION=\"1.1.0\"\n>>> +\n>>> +matrix:\n>>> +  exclude:\n>>> +    - os: osx\n>>> +      env: GIT_LFS_VERSION=\"1.1.0\"\n>>> \n>>> before_install:\n>>>   - >\n>>> diff --git a/git-p4.py b/git-p4.py\n>>> index 527d44b..6c06d17 100755\n>>> --- a/git-p4.py\n>>> +++ b/git-p4.py\n>>> @@ -1064,7 +1064,12 @@ def generatePointer(self, contentFile):\n>>>         if pointerProcess.wait():\n>>>             os.remove(contentFile)\n>>>             die('git-lfs pointer command failed. Did you install the extension?')\n>>> -        pointerContents = [i+'\\n' for i in pointerFile.split('\\n')[2:][:-1]]\n>>> +        pointerLines = pointerFile.split('\\n')\n>>> +        # In git-lfs < 1.2, the pointer output included some extraneous information\n>>> +        # this was removed in https://github.com/github/git-lfs/pull/1105\n>>> +        if pointerLines[0].startswith('Git LFS pointer for'):\n>>> +            pointerLines = pointerLines[2:]\n>>> +        pointerContents = [i+'\\n' for i in pointerLines[:-1]]\n>>>         oid = pointerContents[1].split(' ')[1].split(':')[1][:-1]\n>>>         localLargeFile = os.path.join(\n>>>             os.getcwd(),\n>>> \n>>> --\n>>> https://github.com/git/git/pull/231\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"},{"id":"284002","messageId":"CAC5gnOx9W3S3f=92T_LNWBfFm71xe9uNY3O_exxetcf2Xjp+Ew@mail.gmail.com","threadId":"42094","inReplyTo":"E90E5734-C130-42A4-9230-9C95A466C919@gmail.com","subject":"Re: [PATCH] Update git-p4 to be compatible with git-lfs 1.2","fromName":"Ben Woosley","fromEmail":"ben.woosley@gmail.com","sentAt":"2016-04-20T21:10:03Z","receivedAt":"2016-04-20T21:10:03Z","isPatch":true,"sender":{"key":"ben.woosley@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5470?v=4"},"body":"Thanks! Some thoughts:\n\n* One option on the Travis front would be to just test one combination\nof the 1.1 build - e.g. linux + clang + 1.1, so you'll stay within the\n5 parallel builds while also having some coverage on lfs 1.1.\n* It might be risky to match on contentFile when looking for the\nprefix - there could be expansions or other modifications applied by\ngit-lfs between input and output. I would think it a bit safer to just\nmatch on the beginning of the line.\n* Have you guys thought about splitting out git-p4? It seems like a\ngood candidate for an extension / add-on, and would remove the soft\ngit-lfs dependency.\n\nBest,\nBen\n\nOn Wed, Apr 20, 2016 at 12:36 PM, Lars Schneider\n<larsxschneider@gmail.com> wrote:\n>\n>> On Wed, Apr 20, 2016 at 12:00 PM, Luke Diamand <luke@diamand.org> wrote:\n>>> On 20 April 2016 at 19:28, Ben Woosley <Ben.Woosley@gmail.com> wrote:\n>>>> From: Ben Woosley <ben.woosley@gmail.com>\n>>>>\n>>>> The git lfs pointer output was changed in:\n>>>> https://github.com/github/git-lfs/pull/1105\n>>>>\n>>>> This was causing Mac Travis runs to fail, as homebrew had updated to 1.2\n>>>> while Linux was pinned at 1.1 via GIT_LFS_VERSION.\n>>>>\n>>>> The travis builds against 1.1 and 1.2 both on linux. Mac can't do the same as\n>>>> it takes the latest homebrew version regardless.\n>>>\n>>> Is this related to the very similar thread going on here:\n>>>\n>>> http://thread.gmane.org/gmane.comp.version-control.git/291917/focus=291926\n>>>\n>>> Thanks\n>>> Luke\n>\n>\n> On 20 Apr 2016, at 21:13, Ben Woosley <ben.woosley@gmail.com> wrote:\n>\n>> Yep it's addressing the same problem - I developed this independently\n>> after having only viewed the github repo:\n>> https://github.com/git/git/pull/231\n>>\n>> Things I like about my patch:\n>> 1) it maintains ongoing support for git-lfs 1.1 by retaining it in the travis CI\n>> 2) it's a fairly minimal intervention into the existing behavior\n>>\n>> Lars how about adding my Travis changes to your patch?\n>> Here's a look at the CI output: https://travis-ci.org/git/git/builds/124105972\n>>\n>> Best,\n>> Ben\n>\n>\n> Thanks a lot for your fix! It's great to see other people than\n> me actually using this feature :)\n>\n> I already sent a v2 with LFS 1.x support, too:\n> http://article.gmane.org/gmane.comp.version-control.git/291993\n> Would you mind reviewing it, too?\n> Sorry for the duplicated work :-(\n>\n> Your Travis changes are 100% correct and a very nice way to ensure we\n> support Git LFS 1.1 and Git LFS 1.2. Unfortunately we run all other Git\n> tests twice which increases the overall build time a lot (because we\n> can only run 5 build jobs in parallel with the free Travis CI plan).\n> I am not sure if testing an outdated LFS version justifies the increased\n> build times...\n>\n> Best,\n> Lars\n>\n> PS: Please see Junio's comment regarding top posting:\n> http://article.gmane.org/gmane.comp.version-control.git/291932\n>\n>>>\n>>>\n>>>\n>>>> ---\n>>>> .travis.yml | 9 ++++++++-\n>>>> git-p4.py   | 7 ++++++-\n>>>> 2 files changed, 14 insertions(+), 2 deletions(-)\n>>>>\n>>>> diff --git a/.travis.yml b/.travis.yml\n>>>> index 78e433b..71510ee 100644\n>>>> --- a/.travis.yml\n>>>> +++ b/.travis.yml\n>>>> @@ -23,7 +23,6 @@ env:\n>>>>   global:\n>>>>     - DEVELOPER=1\n>>>>     - P4_VERSION=\"15.2\"\n>>>> -    - GIT_LFS_VERSION=\"1.1.0\"\n>>>>     - DEFAULT_TEST_TARGET=prove\n>>>>     - GIT_PROVE_OPTS=\"--timer --jobs 3 --state=failed,slow,save\"\n>>>>     - GIT_TEST_OPTS=\"--verbose --tee\"\n>>>> @@ -31,6 +30,14 @@ env:\n>>>>     # t9810 occasionally fails on Travis CI OS X\n>>>>     # t9816 occasionally fails with \"TAP out of sequence errors\" on Travis CI OS X\n>>>>     - GIT_SKIP_TESTS=\"t9810 t9816\"\n>>>> +  matrix:\n>>>> +    - GIT_LFS_VERSION=\"1.2.0\"\n>>>> +    - GIT_LFS_VERSION=\"1.1.0\"\n>>>> +\n>>>> +matrix:\n>>>> +  exclude:\n>>>> +    - os: osx\n>>>> +      env: GIT_LFS_VERSION=\"1.1.0\"\n>>>>\n>>>> before_install:\n>>>>   - >\n>>>> diff --git a/git-p4.py b/git-p4.py\n>>>> index 527d44b..6c06d17 100755\n>>>> --- a/git-p4.py\n>>>> +++ b/git-p4.py\n>>>> @@ -1064,7 +1064,12 @@ def generatePointer(self, contentFile):\n>>>>         if pointerProcess.wait():\n>>>>             os.remove(contentFile)\n>>>>             die('git-lfs pointer command failed. Did you install the extension?')\n>>>> -        pointerContents = [i+'\\n' for i in pointerFile.split('\\n')[2:][:-1]]\n>>>> +        pointerLines = pointerFile.split('\\n')\n>>>> +        # In git-lfs < 1.2, the pointer output included some extraneous information\n>>>> +        # this was removed in https://github.com/github/git-lfs/pull/1105\n>>>> +        if pointerLines[0].startswith('Git LFS pointer for'):\n>>>> +            pointerLines = pointerLines[2:]\n>>>> +        pointerContents = [i+'\\n' for i in pointerLines[:-1]]\n>>>>         oid = pointerContents[1].split(' ')[1].split(':')[1][:-1]\n>>>>         localLargeFile = os.path.join(\n>>>>             os.getcwd(),\n>>>>\n>>>> --\n>>>> https://github.com/git/git/pull/231\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"},{"id":"284102","messageId":"E230B4FD-79B5-4CA7-9F0D-A4F8F3470296@gmail.com","threadId":"42094","inReplyTo":"CAC5gnOx9W3S3f=92T_LNWBfFm71xe9uNY3O_exxetcf2Xjp+Ew@mail.gmail.com","subject":"Re: [PATCH] Update git-p4 to be compatible with git-lfs 1.2","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-04-22T08:10:56Z","receivedAt":"2016-04-22T08:10:56Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"\n> \n> \n> On Wed, Apr 20, 2016 at 12:36 PM, Lars Schneider\n> <larsxschneider@gmail.com> wrote:\n>> \n>>> On Wed, Apr 20, 2016 at 12:00 PM, Luke Diamand <luke@diamand.org> wrote:\n>>>> On 20 April 2016 at 19:28, Ben Woosley <Ben.Woosley@gmail.com> wrote:\n>>>>> From: Ben Woosley <ben.woosley@gmail.com>\n>>>>> \n>>>>> The git lfs pointer output was changed in:\n>>>>> https://github.com/github/git-lfs/pull/1105\n>>>>> \n>>>>> This was causing Mac Travis runs to fail, as homebrew had updated to 1.2\n>>>>> while Linux was pinned at 1.1 via GIT_LFS_VERSION.\n>>>>> \n>>>>> The travis builds against 1.1 and 1.2 both on linux. Mac can't do the same as\n>>>>> it takes the latest homebrew version regardless.\n>>>> \n>>>> Is this related to the very similar thread going on here:\n>>>> \n>>>> http://thread.gmane.org/gmane.comp.version-control.git/291917/focus=291926\n>>>> \n>>>> Thanks\n>>>> Luke\n>> \n>> \n>> On 20 Apr 2016, at 21:13, Ben Woosley <ben.woosley@gmail.com> wrote:\n>> \n>>> Yep it's addressing the same problem - I developed this independently\n>>> after having only viewed the github repo:\n>>> https://github.com/git/git/pull/231\n>>> \n>>> Things I like about my patch:\n>>> 1) it maintains ongoing support for git-lfs 1.1 by retaining it in the travis CI\n>>> 2) it's a fairly minimal intervention into the existing behavior\n>>> \n>>> Lars how about adding my Travis changes to your patch?\n>>> Here's a look at the CI output: https://travis-ci.org/git/git/builds/124105972\n>>> \n>>> Best,\n>>> Ben\n>> \n>> \n>> Thanks a lot for your fix! It's great to see other people than\n>> me actually using this feature :)\n>> \n>> I already sent a v2 with LFS 1.x support, too:\n>> http://article.gmane.org/gmane.comp.version-control.git/291993\n>> Would you mind reviewing it, too?\n>> Sorry for the duplicated work :-(\n>> \n>> Your Travis changes are 100% correct and a very nice way to ensure we\n>> support Git LFS 1.1 and Git LFS 1.2. Unfortunately we run all other Git\n>> tests twice which increases the overall build time a lot (because we\n>> can only run 5 build jobs in parallel with the free Travis CI plan).\n>> I am not sure if testing an outdated LFS version justifies the increased\n>> build times...\n>> \n>> Best,\n>> Lars\n>> \n>> PS: Please see Junio's comment regarding top posting:\n>> http://article.gmane.org/gmane.comp.version-control.git/291932\n\n> On 20 Apr 2016, at 23:10, Ben Woosley <Ben.Woosley@gmail.com> wrote:\n> \n> Thanks! Some thoughts:\nAgain, please see Junio's comment regarding top posting:\nhttp://article.gmane.org/gmane.comp.version-control.git/291932\n\n> \n> * One option on the Travis front would be to just test one combination\n> of the 1.1 build - e.g. linux + clang + 1.1, so you'll stay within the\n> 5 parallel builds while also having some coverage on lfs 1.1.\nTBH I still think testing an outdated Git LFS version does not justify\n+10 extra minutes of computing. Plus if we want to be consistent we would\nneed to do the same for LFS 1.0, 1.2, and for pretty much every other\ndependency...  \n\n\n> * It might be risky to match on contentFile when looking for the\n> prefix - there could be expansions or other modifications applied by\n> git-lfs between input and output. I would think it a bit safer to just\n> match on the beginning of the line.\nAgreed. I will incorporate this in my next version and CC you.\n\n\n> * Have you guys thought about splitting out git-p4? It seems like a\n> good candidate for an extension / add-on, and would remove the soft\n> git-lfs dependency.\nYes, this was previously discussed here:\nhttp://article.gmane.org/gmane.comp.version-control.git/276822/\n\n\nCheers,\nLars"},{"id":"284432","messageId":"20160425162502.31558-1-szeder@ira.uka.de","threadId":"42094","inReplyTo":"E230B4FD-79B5-4CA7-9F0D-A4F8F3470296@gmail.com","subject":"Re: [PATCH] Update git-p4 to be compatible with git-lfs 1.2","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2016-04-25T16:25:02Z","receivedAt":"2016-04-25T16:25:02Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"\n> > * One option on the Travis front would be to just test one combination\n> > of the 1.1 build - e.g. linux + clang + 1.1, so you'll stay within the\n> > 5 parallel builds while also having some coverage on lfs 1.1.\n> TBH I still think testing an outdated Git LFS version does not justify\n> +10 extra minutes of computing.\n\nI agree that checking compatibility with an older Git LFS version\ndoesn't worth the extra 10 minutes.  However, since Git LFS is only\ninvolved in two test scripts and for the rest of the test suite it\ndoesn't matter at all, doing a full build and running the whole test\nsuite for the sole sake of a different Git LFS version is definitely\nunnecessary.\n\nThe Bash completion and prompt scripts are in a similar situation:\nthere are only two test scripts involved and the rest of the test\nsuite couldn't care less.  However, we definitely want to support\nolder Bash versions as well, all the way back to v3.0, and there are a\nfew commits fixing breakages reported by users of old Bash versions.\n\nAs I somehow grew fond of those Bash scripts over the years, I put\ntogether a couple of patches allowing me to say 'cd t && make -j4\nfull-bash-test', which runs the completion and prompt tests with\nmultiple Bash versions.  For the seven major and minor releases\nincluding and after v3.0 it usually takes less than 8 seconds.  As far\nas runtime goes, I think that's well worth it.\n\nYou can have a look at these patches at\n\n  https://github.com/szeder/git completion-test-multiple-bash-versions\n\nand perhaps you could even adapt it to LFS and/or p4 somehow.\n\n> Plus if we want to be consistent we would\n> need to do the same for LFS 1.0, 1.2, and for pretty much every other\n> dependency...  \n\nI'm not sure we should be consistent in this case, at least not solely\nfor consistency's sake and not in git.git. Taking what I did for Bash\nand doing it for different versions of LFS, p4, etc. could perhaps\nkeep the runtime under control, but t/Makefile would surely get out\nof control rather quickly.  Putting these into a travis-ci matrix is\nso much simpler, but the runtime makes it infeasible, of course.\n\nI think the best we can do is to keep this out of git.git and let\n(hope?) developers interested in a particular subsystem do this\n\"multiple version compatibility\" tests as they see fit.\n"},{"id":"284451","messageId":"xmqq8u01mwji.fsf@gitster.mtv.corp.google.com","threadId":"42094","inReplyTo":"20160425162502.31558-1-szeder@ira.uka.de","subject":"Re: [PATCH] Update git-p4 to be compatible with git-lfs 1.2","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-04-25T17:24:17Z","receivedAt":"2016-04-25T17:24:17Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"SZEDER Gábor <szeder@ira.uka.de> writes:\n\n> You can have a look at these patches at\n>\n>   https://github.com/szeder/git completion-test-multiple-bash-versions\n>\n> and perhaps you could even adapt it to LFS and/or p4 somehow.\n>\n>> Plus if we want to be consistent we would\n>> need to do the same for LFS 1.0, 1.2, and for pretty much every other\n>> dependency...  \n>\n> I'm not sure we should be consistent in this case, at least not solely\n> for consistency's sake and not in git.git. Taking what I did for Bash\n> and doing it for different versions of LFS, p4, etc. could perhaps\n> keep the runtime under control, but t/Makefile would surely get out\n> of control rather quickly.  Putting these into a travis-ci matrix is\n> so much simpler, but the runtime makes it infeasible, of course.\n\nI took a brief look of your branch, and I like its approach.  If I\nunderstood your approach correctly, you:\n\n * Group selected tests in t/ as \"these are bash related tests I\n   care about\" in t/Makefile;\n\n * Add Travis test target to build Git with specific versions of\n   bash, and run the above target instead of the full test to\n   exercise the version of bash you are testing.\n\nAnd I agree that the same can be done for LFS versions and P4\nversions.  Only a handful tests in t/ are about these niches.\n\n> I think the best we can do is to keep this out of git.git and let\n> (hope?) developers interested in a particular subsystem do this\n> \"multiple version compatibility\" tests as they see fit.\n"},{"id":"284503","messageId":"20160426011056.Horde.yl47nWMpVGsuGDgrKiKb_nR@webmail.informatik.kit.edu","threadId":"42094","inReplyTo":"xmqq8u01mwji.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] Update git-p4 to be compatible with git-lfs 1.2","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2016-04-25T23:10:56Z","receivedAt":"2016-04-25T23:10:56Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"\nQuoting Junio C Hamano <gitster@pobox.com>:\n\n> SZEDER Gábor <szeder@ira.uka.de> writes:\n>\n>> You can have a look at these patches at\n>>\n>>   https://github.com/szeder/git completion-test-multiple-bash-versions\n>>\n>> and perhaps you could even adapt it to LFS and/or p4 somehow.\n>>\n>>> Plus if we want to be consistent we would\n>>> need to do the same for LFS 1.0, 1.2, and for pretty much every other\n>>> dependency...\n>>\n>> I'm not sure we should be consistent in this case, at least not solely\n>> for consistency's sake and not in git.git. Taking what I did for Bash\n>> and doing it for different versions of LFS, p4, etc. could perhaps\n>> keep the runtime under control, but t/Makefile would surely get out\n>> of control rather quickly.  Putting these into a travis-ci matrix is\n>> so much simpler, but the runtime makes it infeasible, of course.\n>\n> I took a brief look of your branch, and I like its approach.  If I\n> understood your approach correctly, you:\n>\n>  * Group selected tests in t/ as \"these are bash related tests I\n>    care about\" in t/Makefile;\n\nYes.\n\n>  * Add Travis test target to build Git with specific versions of\n>    bash, and run the above target instead of the full test to\n>    exercise the version of bash you are testing.\n\nNot quite.\n\n   * Add t/Makefile targets to run a Bash-related test script with a\n     specific Bash version, one target for each script-version pair,\n     and a target to run all Bash-related tests with all listed\n     Bash-versions.\n\n   * Extend the travis-ci config so that, after building Git as usual\n     and running the full test suite as usual, it additionaly runs all\n     Bash-related tests will all listed Bash versions on Linux builds.\n\n> And I agree that the same can be done for LFS versions and P4\n> versions.  Only a handful tests in t/ are about these niches.\n\nLuckily for me, running a test script with a specific Bash version is\nas trivial as '/path/to/bash-vX.Y t9902-completion.sh'.  No\nmodifications to the test scripts or to lib-bash.sh were necessary.\n\nOTOH, Git LFS and p4 tests, AFAICS, rely on git-lfs and p4 binaries\nbeing available in $PATH, and the p4 tests need two binaries.  So\nthere is more work that has to be done, as we would need a way to\noverride those binaries found in $PATH, either through an environment\nvariable or a command line option.  Bonus points for a solution that\nwould work equally well with LFS, p4 and Bash: then perhaps we could\nhave a single unified block of Makefile metaprogramming, which could\ngenerate  all those test targets from a list of dependency-specific\ntests and a list of paths to different versions of that dependency.\nThen it might even be suitable for inclusion in git.git.\n\n\n>> I think the best we can do is to keep this out of git.git and let\n>> (hope?) developers interested in a particular subsystem do this\n>> \"multiple version compatibility\" tests as they see fit.\n"},{"id":"284766","messageId":"09EB11F9-5254-4D03-BDBA-FD1C1B191F07@gmail.com","threadId":"42094","inReplyTo":"20160426011056.Horde.yl47nWMpVGsuGDgrKiKb_nR@webmail.informatik.kit.edu","subject":"Re: [PATCH] Update git-p4 to be compatible with git-lfs 1.2","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-04-28T06:09:20Z","receivedAt":"2016-04-28T06:09:20Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"\nOn 26 Apr 2016, at 01:10, SZEDER Gábor <szeder@ira.uka.de> wrote:\n\n> \n> Quoting Junio C Hamano <gitster@pobox.com>:\n> \n>> SZEDER Gábor <szeder@ira.uka.de> writes:\n>> \n>>> You can have a look at these patches at\n>>> \n>>>  https://github.com/szeder/git completion-test-multiple-bash-versions\n>>> \n>>> and perhaps you could even adapt it to LFS and/or p4 somehow.\n>>> \n>>>> Plus if we want to be consistent we would\n>>>> need to do the same for LFS 1.0, 1.2, and for pretty much every other\n>>>> dependency...\n>>> \n>>> I'm not sure we should be consistent in this case, at least not solely\n>>> for consistency's sake and not in git.git. Taking what I did for Bash\n>>> and doing it for different versions of LFS, p4, etc. could perhaps\n>>> keep the runtime under control, but t/Makefile would surely get out\n>>> of control rather quickly.  Putting these into a travis-ci matrix is\n>>> so much simpler, but the runtime makes it infeasible, of course.\n>> \n>> I took a brief look of your branch, and I like its approach.  If I\n>> understood your approach correctly, you:\n>> \n>> * Group selected tests in t/ as \"these are bash related tests I\n>>   care about\" in t/Makefile;\n> \n> Yes.\n> \n>> * Add Travis test target to build Git with specific versions of\n>>   bash, and run the above target instead of the full test to\n>>   exercise the version of bash you are testing.\n> \n> Not quite.\n> \n>  * Add t/Makefile targets to run a Bash-related test script with a\n>    specific Bash version, one target for each script-version pair,\n>    and a target to run all Bash-related tests with all listed\n>    Bash-versions.\n> \n>  * Extend the travis-ci config so that, after building Git as usual\n>    and running the full test suite as usual, it additionaly runs all\n>    Bash-related tests will all listed Bash versions on Linux builds.\n> \n>> And I agree that the same can be done for LFS versions and P4\n>> versions.  Only a handful tests in t/ are about these niches.\n> \n> Luckily for me, running a test script with a specific Bash version is\n> as trivial as '/path/to/bash-vX.Y t9902-completion.sh'.  No\n> modifications to the test scripts or to lib-bash.sh were necessary.\n> \n> OTOH, Git LFS and p4 tests, AFAICS, rely on git-lfs and p4 binaries\n> being available in $PATH, and the p4 tests need two binaries.  So\n> there is more work that has to be done, as we would need a way to\n> override those binaries found in $PATH, either through an environment\n> variable or a command line option.  Bonus points for a solution that\n> would work equally well with LFS, p4 and Bash: then perhaps we could\n> have a single unified block of Makefile metaprogramming, which could\n> generate  all those test targets from a list of dependency-specific\n> tests and a list of paths to different versions of that dependency.\n> Then it might even be suitable for inclusion in git.git.\n\nThanks for sharing this! It's awesome! I will try to find a generic\nsolution based on your work that handles bash versions, LFS versions,\nand P4 versions! Stay tuned :-)\n\nCheers,\nLars\n\n> \n> \n>>> I think the best we can do is to keep this out of git.git and let\n>>> (hope?) developers interested in a particular subsystem do this\n>>> \"multiple version compatibility\" tests as they see fit.\n> \n> \n"}]}