Git в браузере. Расширяем возможности с помощью LFS

Привет, Хабр! Я Паша, разработчик

https://habr.com/ru/companies/gram_ax/articles/994384/

#git #libgit2 #lfs #webassembly #rust #ffi #emscripten #docsascode #opensource #localfirst

Git в браузере. Расширяем возможности с помощью LFS

Привет, Хабр! Я Паша, разработчик Gramax — Open Source платформы для управления документацией в подходе Docs as Code. В прошлой статье я рассказывал о том, как мы переводили наше приложение с...

Хабр

Как мы засунули Git в браузер (и чего нам это стоило)

Привет, Хабр! Меня зовут Паша, я разработчик

https://habr.com/ru/companies/gram_ax/articles/928144/

#emscripten #rust #webassembly #libgit2 #wasm #git #wysiwyg #open_source #localfirst

Как мы засунули Git в браузер (и чего нам это стоило)

Привет, Хабр! Меня зовут Паша, я разработчик Gramax — open source-платформы для управления технической документацией в подходе Docs as Code. В этой статья я расскажу, как и для чего мы интегрировали...

Хабр
In the course of tracking down a runtime error in #libgit2 (v1.9.0), I ran the #Xcode static analyzer against it, and it's kind of scary…

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

#GitHub

build: Fix build against, and require, libgit2 1.8.0 (!40) · Merge requests · GNOME / libgit2-glib · GitLab

Welcome to GNOME GitLab

GitLab

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

build: Fix build against, and require, libgit2 1.8.0 (!40) · Merge requests · GNOME / libgit2-glib · GitLab

Welcome to GNOME GitLab

GitLab
I was planning on using #libgit2 for my next project, and I wanted a bit of crash course on #git #internals, and came across this absolutely fantastic series of tutorials on #YouTube by Omer Rosenbaum. If you want to dig into git in more detail, these are a great place to start. https://youtu.be/fWMKue-WBok?si=yygfpQ-il-G4EeCN
Git Internals - Intro Video

YouTube

#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

GitHub - mbernson/SwiftGit2: Swift bindings to libgit2

Swift bindings to libgit2. Contribute to mbernson/SwiftGit2 development by creating an account on GitHub.

GitHub

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.

https://github.com/rust-lang/cargo/issues/11857

#Gentoo #NIH

git error `invalid data in index` with index.skipHash config · Issue #11857 · rust-lang/cargo

Problem before 1.68, this worked: # be in a git repository $ git init . # create a junk commit (required; any history) $ touch x && git add x && git commit -m x $ mkdir -p a/b && cd a/b # grab a ru...

GitHub

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.

https://github.com/rust-lang/cargo/issues/11857

#Gentoo #RustLang

git error `invalid data in index` with index.skipHash config · Issue #11857 · rust-lang/cargo

Problem before 1.68, this worked: # be in a git repository $ git init . # create a junk commit (required; any history) $ touch x && git add x && git commit -m x $ mkdir -p a/b && cd a/b # grab a ru...

GitHub