Git Product home page Git Product logo

Comments (5)

billiegoose avatar billiegoose commented on May 14, 2024

@mojavelinux thoughts?

from isomorphic-git.

mojavelinux avatar mojavelinux commented on May 14, 2024

I like the fact that you're using the same function to get each object in succession since that reflects how git actually works.

I would think you'd need to specify the type/format for the last call in your example:

let blob = await git.getObject({fs, dir, ref: file.oid, type: 'content'})

right? otherwise, I'd expect to get a BlobDescription based on your proposal.

I'm worried we're overloading the meaning of "type" (see https://git-scm.com/docs/git-cat-file). Type is already used for the object type (tree, blob, etc). Perhaps format instead?

from isomorphic-git.

billiegoose avatar billiegoose commented on May 14, 2024

otherwise, I'd expect to get a BlobDescription based on your proposal.

True! It would probably be blob.data.toString() or something.

Perhaps format instead?

I thought I did call it format... no worries! I agree that 'type' already has a meaning. I definitely won't call it type. :)

from isomorphic-git.

mojavelinux avatar mojavelinux commented on May 14, 2024

👍

from isomorphic-git.

billiegoose avatar billiegoose commented on May 14, 2024

I changed the names for more consistency / descriptiveness. Instead of getObject it is readObject (because presumably we will add a writeObject at some point) and instead of 'raw' and 'plain' I called them 'deflated' and 'wrapped'. Soon as the CI tests pass it should be published!

https://isomorphic-git.github.io/docs/readObject.html

from isomorphic-git.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.