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
    Is the internal API for uploadPack only implementing writeRefsAdResponse atm? or is there another branch that takes care of sending pack files as well?
    Purusothaman Ramanujam
    @Purus
    Hi all, where can I find a simple clone example in a react app? I am trying to connect the dots of how to wire the lightning-fs with isomorphic-git in react.
    Purusothaman Ramanujam
    @Purus

    Hi all, where can I find a simple clone example in a react app? I am trying to connect the dots of how to wire the lightning-fs with isomorphic-git in react.

    I am able to make it work now..

    My project uses typescript.. i am looking for a good file system library which provides typescript typings.. Can you experts please suggest one.. LightningFS, FilerJS and BrowserFS does not seem to provide typings. Please correct me if I am wrong.
    Konstantin Itskov
    @trivigy
    Hey I am trying to integrate https://github.com/go-git/go-git (as a server) with isomorphic-git. Having issues with isomorphic-git hanging the browser. The repository is just a tiny repo with a single README.md file so it is definitely not an issues with size/space. Would greatly appreciate someone's help debug the issue. I have been digging into isomorphic source code for a little while now and almost entirely sure that the issues arises from the fact that go-git doesn't support side-band or side-band-64k capabilities yes but isomorphic-git is expecting the data to be as such. Or something like that that doesn't match up.
    Example response to a clone:
    request: 005bwant 151fc63f1c25c54939caed59d2274e69d5a07a23 ofs-delta agent=git/isomorphic-git@1.4.1 00000009done
    response
    ┌─[trivigy@x1carbon1]─[~/Desktop/another]
    └─[master]─$ echo -n "MDAwOE5BSwpQQUNLAAAAAgAAAAa7AnicykjNycnXLc8vyknhSknlSklNzkxJTVEoyVdITElRyM0vSlVIzkjMS08t1gMEAAD//1RXD087eJzKSM3Jydctzy/KSQEEAAD//xpZBGqlAnicMjQwMDc1VQhydXTxddXLTWFI/+ZeI+wesSyl9lZanfur9T8dyj8DAgAA///XuQ6apQJ4nDI0MDA3NVUIcnV08XXVy01h2HtV5lC1h07cS4M9LJ6lovJqnB9fAQIAAP//0TIMkpwQeJyszElKBTEQANB9TlEX8JOhMoGILsVTZKj4m7ZT0in7/IILT/C3b/HkJII6ctI1oHbBhkYjJUuoI1WbEV1LORocyUX1XU6aAmhKrTUa9H5om3OxpjZC0wtF26MdMbvgKaryI3c+4YPnkjJlm/Aua+cLnvd/um1/9Lrztcm6NT5ewPhsTfDBeXjSqLVqfBybCD3iUm+9U4fFB0Fj/oJ2L/OTlvoNAAD//3tNVQqcDXicrMxBDsIgEADAO6/YD9gAgaUkxujR+AoK1BKETcra95t48AVe5zC85wxm0cYmNzvlVyNRog0JwzovKI1F9E5rrdwcRXjzRjs8qA8OnUuHO49KB5zrj6bypWulo/CYIrULKOu1Qmu8hpM0UopIrRXm/I9L3FLKCQa1DJHoBXEL/ZmH+AQAAP//NQNG/ui+IDAjblMy5UcSAPzM8yKNrfFk" | base64 -d | xxd
    00000000: 3030 3038 4e41 4b0a 5041 434b 0000 0002  0008NAK.PACK....
    00000010: 0000 0006 bb02 789c ca48 cdc9 c9d7 2dcf  ......x..H....-.
    00000020: 2fca 49e1 4a49 e54a 494d ce4c 494d 5128  /.I.JI.JIM.LIMQ(
    00000030: c957 484c 4951 c8cd 2f4a 5548 ce48 cc4b  .WHLIQ../JUH.H.K
    00000040: 4f2d d603 0400 00ff ff54 570f 4f3b 789c  O-.......TW.O;x.
    00000050: ca48 cdc9 c9d7 2dcf 2fca 4901 0400 00ff  .H....-./.I.....
    00000060: ff1a 5904 6aa5 0278 9c32 3430 3037 3555  ..Y.j..x.240075U
    00000070: 0872 7574 f175 d5cb 4d61 48ff e65e 23ec  .rut.u..MaH..^#.
    00000080: 1eb1 2ca5 f656 5a9d fbab f53f 1dca 3f03  ..,..VZ....?..?.
    00000090: 0200 00ff ffd7 b90e 9aa5 0278 9c32 3430  ...........x.240
    000000a0: 3037 3555 0872 7574 f175 d5cb 4d61 d87b  075U.rut.u..Ma.{
    000000b0: 55e6 50b5 874e dc4b 833d 2c9e a5a2 f26a  U.P..N.K.=,....j
    000000c0: 9c1f 5f01 0200 00ff ffd1 320c 929c 1078  .._.......2....x
    000000d0: 9cac cc49 4a05 3110 00d0 7d4e 5117 f093  ...IJ.1...}NQ...
    000000e0: a132 8188 2ec5 5364 a8f8 9bb6 53d2 29fb  .2....Sd....S.).
    000000f0: fc82 0b4f f0b7 6ff1 e424 823a 72d2 35a0  ...O..o..$.:r.5.
    00000100: 76c1 8646 2325 4ba8 2355 9b11 5d4b 391a  v..F#%K.#U..]K9.
    00000110: 1cc9 45f5 5d4e 9a02 684a ad35 1af4 7e68  ..E.]N..hJ.5..~h
    00000120: 9b73 b1a6 3642 d30b 45db a31d 31bb e029  .s..6B..E...1..)
    00000130: aaf2 2377 3ee1 83e7 9232 659b f02e 6be7  ..#w>....2e...k.
    00000140: 0b9e f77f ba6d 7ff4 baf3 b5c9 ba35 3e5e  .....m.......5>^
    00000150: c0f8 6c4d f0c1 7978 d2a8 b56a 7c1c 9b08  ..lM..yx...j|...
    00000160: 3de2 526f bd53 87c5 0741 63fe 8276 2ff3  =.Ro.S...Ac..v/.
    00000170: 9396 fa0d 0000 ffff 7b4d 550a 9c0d 789c  ........{MU...x.
    00000180: accc 410e c220 1000 c03b afd8 0fd8 0081  ..A.. ...;......
    00000190: a524 c6e8 d1f8 0a0a d412 844d cada f79b  .$.........M....
    000001a0: 78f0 055e e730 bce7 0c66 d1c6 2637 3be5  x..^.0...f..&7;.
    000001b0: 5723 51a2 0d09 c33a 2f28 8d45 f44e 6bad  W#Q....:/(.E.Nk.
    000001c0: dc1c 4578 f346 3b3c a80f 0e9d 4b87 3b8f  ..Ex.F;<....K.;.
    000001d0: 4a07 9ceb 8fa6 f2a5 6ba5 a3f0 9822 b50b  J.......k...."..
    000001e0: 28eb b542 6bbc 8693 3452 8a48 ad15 e6fc  (..Bk...4R.H....
    000001f0: 8f4b dc52 ca09 06b5 0c91 e805 710b fd99  .K.R........q...
    00000200: 87f8 0400 00ff ff35 0346 fee8 be20 3023  .......5.F... 0#
    00000210: 6e53 32e5 4712 00fc ccf3 228d adf1 64    nS2.G....."...d
    If anyone understands enough the implementation please let me know and share some of your knowledge.
    Konstantin Itskov
    @trivigy
    Pretty sure that this is exactly the problem. It seems that the isomorphic implementation assumes that side-band-64k capability and parses the packfile as such. Meaning that it expects a length + mux_type in front of every packfile chunk. But when implementing without side-band that info is not added. Just read to the end kinda deal. As you can see above there is not info about length right after 0008NAK\0PACK.
    Konstantin Itskov
    @trivigy
    Whelp never mind. I ended up implementing a side-band capability on the server side and it fixed the issue. Effectively it seems that isomorphic-git doesn't know how to handle parsing the non side-band or side-band-64k upload-pack. I am not entirely sure if this could be classified as an issue on the isomorphic-git or not since the documentation for git-http actually states that transmissions over http are going to be side-band be default. But I guess there is the cli tool as well. Just commenting on state of things.
    Aditya Mittal
    @aditya-mittal

    Can we push multiple branches in one go using, https://isomorphic-git.org/docs/en/push?

    Like we do using git push --all --tags

    Eryou Hao
    @EryouHao
    Hi, I want to know how to using git push -u origin master -f
    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?