git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Update git-p4 to be compatible with git-lfs 1.2

From
Ben Woosley <ben.woosley@gmail.com>
Date
Apr 20, 2016, 19:13 UTC
Message-ID
<CAC5gnOx1ZbNnYzMYYfD5TkXkgHAz7qgOTVCEiu2D0PA-MZLrvQ@mail.gmail.com>
In-Reply-To
<CAE5ih79A2D8xTi9MuOYJ=dU12P5hOsLbw+XXptcnhAATwZvBCQ@mail.gmail.com>

Yep it's addressing the same problem - I developed this independently after having only viewed the github repo: https://github.com/git/git/pull/231

Things I like about my patch:
1) it maintains ongoing support for git-lfs 1.1 by retaining it in the travis CI
2) it's a fairly minimal intervention into the existing behavior

Lars how about adding my Travis changes to your patch? Here's a look at the CI output: https://travis-ci.org/git/git/builds/124105972

Best, Ben

On Wed, Apr 20, 2016 at 12:00 PM, Luke Diamand <luke@diamand.org> wrote:
Show 78 quoted lines
> On 20 April 2016 at 19:28, Ben Woosley <Ben.Woosley@gmail.com> wrote:
>> From: Ben Woosley <ben.woosley@gmail.com>
>>
>> The git lfs pointer output was changed in:
>> https://github.com/github/git-lfs/pull/1105
>>
>> This was causing Mac Travis runs to fail, as homebrew had updated to 1.2
>> while Linux was pinned at 1.1 via GIT_LFS_VERSION.
>>
>> The travis builds against 1.1 and 1.2 both on linux. Mac can't do the same as
>> it takes the latest homebrew version regardless.
>
> Is this related to the very similar thread going on here:
>
> http://thread.gmane.org/gmane.comp.version-control.git/291917/focus=291926
>
> Thanks
> Luke
>
>
>
>> ---
>>  .travis.yml | 9 ++++++++-
>>  git-p4.py   | 7 ++++++-
>>  2 files changed, 14 insertions(+), 2 deletions(-)
>>
>> diff --git a/.travis.yml b/.travis.yml
>> index 78e433b..71510ee 100644
>> --- a/.travis.yml
>> +++ b/.travis.yml
>> @@ -23,7 +23,6 @@ env:
>>    global:
>>      - DEVELOPER=1
>>      - P4_VERSION="15.2"
>> -    - GIT_LFS_VERSION="1.1.0"
>>      - DEFAULT_TEST_TARGET=prove
>>      - GIT_PROVE_OPTS="--timer --jobs 3 --state=failed,slow,save"
>>      - GIT_TEST_OPTS="--verbose --tee"
>> @@ -31,6 +30,14 @@ env:
>>      # t9810 occasionally fails on Travis CI OS X
>>      # t9816 occasionally fails with "TAP out of sequence errors" on Travis CI OS X
>>      - GIT_SKIP_TESTS="t9810 t9816"
>> +  matrix:
>> +    - GIT_LFS_VERSION="1.2.0"
>> +    - GIT_LFS_VERSION="1.1.0"
>> +
>> +matrix:
>> +  exclude:
>> +    - os: osx
>> +      env: GIT_LFS_VERSION="1.1.0"
>>
>>  before_install:
>>    - >
>> diff --git a/git-p4.py b/git-p4.py
>> index 527d44b..6c06d17 100755
>> --- a/git-p4.py
>> +++ b/git-p4.py
>> @@ -1064,7 +1064,12 @@ def generatePointer(self, contentFile):
>>          if pointerProcess.wait():
>>              os.remove(contentFile)
>>              die('git-lfs pointer command failed. Did you install the extension?')
>> -        pointerContents = [i+'\n' for i in pointerFile.split('\n')[2:][:-1]]
>> +        pointerLines = pointerFile.split('\n')
>> +        # In git-lfs < 1.2, the pointer output included some extraneous information
>> +        # this was removed in https://github.com/github/git-lfs/pull/1105
>> +        if pointerLines[0].startswith('Git LFS pointer for'):
>> +            pointerLines = pointerLines[2:]
>> +        pointerContents = [i+'\n' for i in pointerLines[:-1]]
>>          oid = pointerContents[1].split(' ')[1].split(':')[1][:-1]
>>          localLargeFile = os.path.join(
>>              os.getcwd(),
>>
>> --
>> https://github.com/git/git/pull/231
>> --
>> To unsubscribe from this list: send the line "unsubscribe git" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: Luke DiamandNext: Lars Schneider
Message 3 of 10 in “Update git-p4 to be compatible with git-lfs 1.2”
  1. Update git-p4 to be compatible with git-lfs 1.2Ben Woosley, Apr 20, 2016
  2. Luke DiamandApr 20, 2016
  3. Ben WoosleyApr 20, 2016
  4. Lars SchneiderApr 20, 2016
  5. Ben WoosleyApr 20, 2016
  6. Lars SchneiderApr 22, 2016
  7. SZEDER GáborApr 25, 2016
  8. Junio C HamanoApr 25, 2016
  9. SZEDER GáborApr 25, 2016
  10. Lars SchneiderApr 28, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.