by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Robbie Cronin
    @robert-cronin
    @trivigy I had to do the same thing as well, even when the server doesn't advertise sideband-64 it still asks for it. In my case I was trying to hack together a pure JavaScript implementation of a git backend using isogit: https://github.com/MatrixAI/js-polykey/blob/add-git-backend/src/lib/git/side-band/GitSideBand.ts
    that comes directly from the Isogit http-reciever branch. It has been quiet for a while so I decided it's probably not going to get incorporated into Isogit anytime soon and so stiched together what I needed
    it would be really awesome if it gets finished one day though, so Isogit would be the client and server because I've never seen it done in pure JavaScript
    Latn Black
    @LatnBlack_twitter
    Hi, anyone had issues with 'circular definition' errors? I'm using Angular/Typescript and upgrading from 0.78.x to 1.7.
    Latn Black
    @LatnBlack_twitter
    For anyone interested or who might be able to offer insight on how to fix this, I'm seeing errors such as the following:
    ERROR in node_modules/isomorphic-git/http/web/index.d.ts:69:14 - error TS2303: Circular definition of import alias 'request'.
    
    69     export { request };
                    ~~~~~~~
    node_modules/isomorphic-git/index.d.ts:627:14 - error TS2303: Circular definition of import alias 'Errors'.
    
    627     export { Errors };
                     ~~~~~~
    node_modules/isomorphic-git/index.d.ts:628:14 - error TS2303: Circular definition of import alias 'STAGE'.
    
    628     export { STAGE };
                     ~~~~~
    node_modules/isomorphic-git/index.d.ts:629:14 - error TS2303: Circular definition of import alias 'TREE'.
    ...
    Latn Black
    @LatnBlack_twitter
    Okay, to fix the circular definition errors it turned out I just needed to update Typescript. I was on 3.4.3, I upgraded to 3.9.5. It wasn't the first thing I tried because I didn't see any mention anywhere of a need to update TS.
    Alisson Cavalcante Agiani
    @thelinuxlich
    hi is there a guide for migrating from node-git?
    Aditya Mittal
    @aditya-mittal

    @thelinuxlich I have been using nodegit earlier, but then migrated to isomorphic-git due to few limitations of nodegit.

    I havent yet managed to write up the doc to migrate from nodegit, though you may find this repo helpful - https://github.com/aditya-mittal/gl2gh

    Specifically these commits:

    Aditya Mittal
    @aditya-mittal

    I am unable to push tags while using, https://isomorphic-git.org/docs/en/push.

    Is there something I am missing?

    Here is my snippet for push,

    git.push({fs, http, dir: repo_path_on_local, remote: remote_name, ref: branch_name})
    Stefan Stoichev
    @countnazgul
    Good evening. I'm having some issues when trying to push new files, which are being added into a new sub-folder (using lightning-fs). Most likely im doing something wrong :). The idea is that after the repo is cloned, im creating a new sub-folder, creating new file there, commit and push. The whole process is running ok and can see the commit in GitHub but ... the new folder and file are not there (0 additions and 0 deletions). Any advice on how to handle this? Thank you.
        const dir = '/test-repo';
    
        await fs.promises.mkdir(`${dir}/new_folder`)
        await fs.promises.writeFile(`${dir}/new_folder/new-file.txt`, `# NEW FILE`)
    
        await git.add({ fs, dir: `${dir}/new_folder`, filepath: 'new-file.txt' })
    
        let status = await git.status({ fs, dir: `${dir}/new_folder`, filepath: 'new-file.txt' })
        console.log(status) // "added" is returned
    
        let sha = await git.commit({
            fs,
            dir,
            message: 'Added new-file.txt',
            author: { name: 'test', email: 'test@test.com' }
        })
    
        console.log(sha) // sha is returned. no errors
    
        let pushResult = await git.push({
            fs,
            http,
            dir,
            url: 'https://username:token@github.com/user/test-repo',
        })
    
        console.log(pushResult) // "ok" is returned. can see the commit in GitHub but 0 files are added/changed
    Stefan Stoichev
    @countnazgul
    @wmhilton any advice?
    Alisson Cavalcante Agiani
    @thelinuxlich
    hey I'm seeing a weird error when trying to clone a repository with isomorphic-git in MacOS, "could not find master", which doesn't happen in Linux, is there any special configuration I need to do for MacOSX?
    Alisson Cavalcante Agiani
    @thelinuxlich
    hey fellows, how do you get around the exception MergeNotSupportedError: Merges with conflicts are not supported yet. ? It's been really painful
    Alisson Cavalcante Agiani
    @thelinuxlich
    ?
    Anton Strogonoff
    @strogonoff
    I don’t think it’s possible to use isomorphic-git where merges are required. Workarounds we use: (1) try to make sure pushes/pulls happen often (that reduces the possibility of merge conflicts), (2) structure data and workflows such that multiple users are unlikely to concurrently modify the same object
    We also plan on offering users an UI to perform a manual merge (by checking out both versions and showing a nice diff)
    Ideally if pushes/pulls happen all the time continuously in background this should be less of an issue, but for some reason Git operations cause significant UI lag in our Electron app, even though they happen in the main thread (currently upgrading to latest isomorphic-git to see if that addresses it, and will look into background Node workers as well)
    shediv
    @shediv
    Hi All
    I need help with getting started with https://isomorphic-git.org/
    I tried clone API by passing token but gives 401 error
    Alisson Cavalcante Agiani
    @thelinuxlich
    @strogonoff hey Anton thanks for the answer, I'm trying to make pushes happen often, but I'm getting lots of Failed to finalize commit "GitPushError: One or more branches were not updated: - refs/heads/master: failed to update ref" if send some concurrent requests...
    Alisson Cavalcante Agiani
    @thelinuxlich
    has anyone stumbled upon this?
    Alisson Cavalcante Agiani
    @thelinuxlich
    so it's safe to say that multiple pushes on the same repository at the same time is impossible in isomorphic-git? I need to create some sort of lock
    syncomsblr
    @syncomsblr_twitter
    is sparse checkout option is available?
    Anton Strogonoff
    @strogonoff

    so it's safe to say that multiple pushes on the same repository at the same time is impossible in isomorphic-git? I need to create some sort of lock

    I believe locks are required. We use a lock to ensure our app doesn’t try to perform simultaneous operations on a repo. (Though this can’t prevent accessing the repo from outside the app.) @thelinuxlich

    async-lock is one NPM package that can be used for that
    Alisson Cavalcante Agiani
    @thelinuxlich
    @strogonoff that's right, a lock/mutex solved it! thanks
    Richard Nienaber
    @rjnienaber
    can anyone help me with converting git commands to isomorphic-git ?

    the two that i have are:

    git rev-parse HEAD:$(basename $(pwd)) and
    git log --pretty=format:'%cI' -n 1 -- .

    the first one gets the commit sha for the current directory
    the second one gets the the commit date for the current directory
    i'm thinking both could be solved if I could get the last commit for a specific directory
    however, i couldn't seem to get https://isomorphic-git.org/docs/en/log.html to work for me with any combination of dir and gitdir i tried
    Latn Black
    @LatnBlack_twitter

    Since updating from 0.70.7 to 1.7.0 I'm keep getting the following error involving CacheFS, which causes certain operations to fail (e.g. cloning an existing repo):

    errors.js:4 Uncaught (in promise) Error: ENOENT: [...whatever project path...]/.git/config
        at CacheFS._lookup (CacheFS.js:115)
        at CacheFS.stat (CacheFS.js:213)
        at PromisifiedFS.stat (PromisifiedFS.js:290)
        at PromisifiedFS.stat (PromisifiedFS.js:124)

    What do I need to do to resolve this?

    Gil Schmidt
    @gilsmdt
    hi,
    I've submitted a new issue isomorphic-git/isomorphic-git#1231
    basically I'm trying to pull & push changes and I encounter an error if a file (a.txt) was changed on the remote repo and other file (b.txt) was changed on the local repo
    anyone encountered something like that?
    Karl Koster
    @karl_koster_twitter
    Hey all , I am trying to test a locally deployed app against an in-house instance of GitLab. I stood up the @isomorphic-git/cors-proxy locally to get around the cross origin problems. However, as soon as a request is made to GitLab over https, I get the error: SELF_SIGNED_CERT_IN_CHAIN. I have set the http.sslVerfy to false in the browser, but it doesn't appear to affect the cors-proxy. What is the best way to work around this?