Git в браузере. Расширяем возможности с помощью LFS
Привет, Хабр! Я Паша, разработчик
https://habr.com/ru/companies/gram_ax/articles/994384/
#git #libgit2 #lfs #webassembly #rust #ffi #emscripten #docsascode #opensource #localfirst
Git в браузере. Расширяем возможности с помощью LFS
Привет, Хабр! Я Паша, разработчик
https://habr.com/ru/companies/gram_ax/articles/994384/
#git #libgit2 #lfs #webassembly #rust #ffi #emscripten #docsascode #opensource #localfirst
Как мы засунули Git в браузер (и чего нам это стоило)
Привет, Хабр! Меня зовут Паша, я разработчик
https://habr.com/ru/companies/gram_ax/articles/928144/
#emscripten #rust #webassembly #libgit2 #wasm #git #wysiwyg #open_source #localfirst
Hello #FediHelp I am trying to create a script using #git in #rustlang
I need to:
- blame (including blaming a file from other commits than the current one)
- show basic information about a commit (sha-1, author, date, commit message)
- iterate on the hunks of the diff introduced by a given commit (hunk with the +/- sign and context)
Should I:
- Shell out and parse the result of git cli output
- use #libgit2 binding
- use #gitoxide if possible, libgit2 when the API I need does not exist yet
Sytuacja: są trzy konkurujące ze sobą łatki na dodanie wsparcia #libgit2 1.8 do libgit2-glib. I każda z nich jest trochę inna, niektóre z jasną sugestią, że autor nie miał pojęcia, co robi.
Serio, czy pokolenie GitHuba naprawdę nie potrafi poszukać, zanim wyśle własną łatkę?
A tak przy okazji, wygląda na to, że ten projekt umarł.
https://gitlab.gnome.org/GNOME/libgit2-glib/-/merge_requests/40
https://gitlab.gnome.org/GNOME/libgit2-glib/-/merge_requests/43
https://gitlab.gnome.org/GNOME/libgit2-glib/-/merge_requests/44
Situation: there are 3 competing merge requests to add #libgit2 1.8 support to libgit2-glib. And all of them are slightly different, some with clear indication that the author had no clue what they were doing.
Seriously, can't #GitHub generation actually search before sending something?
Also, the project seems entirely dead.
https://gitlab.gnome.org/GNOME/libgit2-glib/-/merge_requests/40
https://gitlab.gnome.org/GNOME/libgit2-glib/-/merge_requests/43
https://gitlab.gnome.org/GNOME/libgit2-glib/-/merge_requests/44
#SwiftGit2 is the #Swift language binding that the #libgit2 project references. For reasons, I wanted SwiftGit2 to be available as a Swift package. I discovered that @mathijsb had made libgit2 itself available as a Swift package and then used that to simplify and clean up SwiftGit2 as a Swift package. This makes consuming SwiftGit2 with up-to-date libgit2 dependencies much easier! Links:
#SPM support for SwiftGit2: https://github.com/mbernson/SwiftGit2
#SPM support for libgit2: https://github.com/mbernson/libgit2
It's been a while since I've complained about #RustLang itself, so…
Cargo insists on interacting with #git repositories. At the same time, cargo insists on vendoring an old version of #LibGit2 (1.6.2 FWICS). So, if your system is using a new git version (2.44.0), you won't be able to `cargo build`:
```
error: failed to determine package fingerprint for build script for uv v0.1.38 (/tmp/uv/crates/uv)
Caused by:
failed to determine the most recently modified file in /tmp/uv/crates/uv
Caused by:
failed to determine list of files in /tmp/uv/crates/uv
Caused by:
failed to open git index at /tmp/uv/.git/
Caused by:
invalid data in index - calculated checksum does not match expected; class=Index (10)
```
You have to clone everything with `-c index.skipHash=false` to work around this.
But yeah, I'm sure there's a great benefit to using an outdated vendored C library that NIHs git.
Już dłuższą chwilę nie narzekałem na Rusta samego w sobie, więc…
Cargo upiera się na interakcji z repozytoriami #git. Jednocześnie, Cargo upiera się przy używaniu włączonej (zamiast systemowej), starej wersji #LibGit2 (z tego, co widzę: 1.6.2). Tak więc, jeżeli wasz system używa nowego gita (2.44.0), to `cargo build` nie przejdzie:
```
error: failed to determine package fingerprint for build script for uv v0.1.38 (/tmp/uv/crates/uv)
Caused by:
failed to determine the most recently modified file in /tmp/uv/crates/uv
Caused by:
failed to determine list of files in /tmp/uv/crates/uv
Caused by:
failed to open git index at /tmp/uv/.git/
Caused by:
invalid data in index - calculated checksum does not match expected; class=Index (10)
```
Można to obejść, klonując wszystko z `-c index.skipHash=false`.
Ale spoko, na pewno jest wielka zaleta z użycia przestarzałej, włączonej na sztywno biblioteki w C, która wynajduje gita na nowo.