Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    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?
    Karl Koster
    @karl_koster_twitter
    Anyone else getting 404 from GitLab when pulling from a repository? The URL seems a bit strange (but I don't have a lot of knowledge of GitLab internals). The GET sets git-upload-pack as a query parameter (this works without problems). When a POST is issued, the git-upload-pack is a path parameter. That's when I get a 404.
    1 reply
    Alisson Cavalcante Agiani
    @thelinuxlich
    @strogonoff actually I'm still having issues with "MergeNotSupportedError: Merges with conflicts are not supported yet.", even though I've added mutex to all isomorphic-git write calls...
    Alisson Cavalcante Agiani
    @thelinuxlich
    @wmhilton
    Jakub T. Jankiewicz
    @jcubic
    @thelinuxlich Isomorphic-git don't support merge conflicts as the message say. I have no idea what you use mutexes for conflicts are not about write, I'm not sure if you know how git works but conflicts are when you want to merge two commits that modify same line (I think that if the line is in same chunk in same file)
    Alisson Cavalcante Agiani
    @thelinuxlich
    @jcubic isomorphic-git supports "simple conflicts" using a diff3 algorithm, I was asking if someone knew if it's a matter of doing the writes in a certain way to make the algorithm happy
    Jakub T. Jankiewicz
    @jcubic
    I have no idea, last time I've checked it didn't even supported merges different the fast forward, lot of things changed I need to play with it again.
    Sayan
    @dit7ya_gitlab

    Has anybody used isomorphic-git in browser extensions?

    Some sample code will be very helpful.

    Sayan
    @dit7ya_gitlab

    I am getting this error in lighting-fs:

    lightning-fs.js, line 1: TypeError: tSymbol.iterator.next is not a function

    Nathan Brown
    @webdevisme
    Hi. Are there any good examples of isomorphic-git with no working tree in the fs? I'm trying to write API operations for updating a remote repo and don't want the source files in the API fs. I've gotten so far with the plumbing commands, but I'm missing some details.
    Amit Shani
    @amits1995
    @wmhilton is there any plan to add ssh support for node.js?
    If not, I am willing to contribute if that sounds relevant
    Jakub T. Jankiewicz
    @jcubic
    @amits1995 Check discussion at isomorphic-git/isomorphic-git#665
    Amit Shani
    @amits1995
    @jcubic Thanks!
    I'm not sure what are the key takeaways from this?
    That conversation ended in Jan 2019 and I believe nothing was done since?
    Anyhow, If I try to implement ssh will there be any problem?
    Jakub T. Jankiewicz
    @jcubic
    I have no idea, this seems to be the only discussion on the subject
    Noah Hummel
    @strangedev
    Hi everyone :wave:
    Is there anyone here who would be willing to provide some guidance on how to run the test suite? I am trying to contribute a PR and having trouble getting the tests to run.
    1 reply
    Noah Hummel
    @strangedev
    After some playing around with the tests, I noticed that __tests__/__helpers__/generate-docs.js sometimes crashes because it runs out of RAM. On my machine, it sometimes uses over 4GB of RAM. That seems like a lot, what's up with that?
    Dominik Schenk
    @domiSchenk

    Hey everyone

    statusMatrix returns all files as [ 1, 2, 1]
    im calling the code like this:

    const matrix = await git.statusMatrix({ fs: this.fs, dir: 'D:/_dev/_repotest/branch' ) })
    .gitignore: 1 2 1
    firstfile.md: 1 2 1
    folder1/folder2/test2.md: 1 2 1
    folder1/test.md: 1 1 1
    new5.md: 1 2 1
    nr4.md: 1 2 1
    readme.md: 1 2 1
    secondfile.md: 1 2 1
    thiirdfile.md: 1 2 1

    what am i doing wrong? (using nodejs)
    and there are no changes currently

    1 reply
    Pabitra Mohapatra
    @pabitra
    Hi
    Pabitra Mohapatra
    @pabitra
    Can I use isomorphic-git for aws codecommit
    William Hilton
    @wmhilton
    @pabitra yes
    Everyone: I am so sorry it's been nearly a year(?!!!) since I've checked this chat. 😔 Mentally, the COVID-19 pandemic just completely pushed me beyond my limits and this was one of a couple facets of my life that got neglected.
    William Hilton
    @wmhilton
    I want to write a nice blog post explaining my dilemma, but in the meantime, just let it be known I really won't mind if the community (if there is one) forks the repo on order to continue the project. Maybe I can set up a proper "peaceful transition of power" for the actual isomorphic-git GitHub org at some point, but honestly, I'd take advantage of the situation to rebrand with a less annoying name.