Skip to content

Fix extracting lfs.url from git config#19

Merged
gmpify merged 3 commits intotecnix-gcsfrom
gmpify/fix_lfs_use_alternative_url
Mar 24, 2026
Merged

Fix extracting lfs.url from git config#19
gmpify merged 3 commits intotecnix-gcsfrom
gmpify/fix_lfs_use_alternative_url

Conversation

@gmpify
Copy link
Copy Markdown

@gmpify gmpify commented Mar 24, 2026

Follow-up from #13

This PR:

  • Fixes reading a git config file. libgit's git_repository_config returns 0 when it can successfully read a git config file (as seen in docs). There was a bug here, causing nix to never get the existing config.
  • Strips suffix /info/lfs from the URL, given that lfs.url would usually have this suffix. This change makes this return path in line with the others in the rest of the function, where it extracts the URL from the origin remote.

This change fixes tecnix to work with wcb.

Fixes:
* Only add `/info/lfs` (and possibly `.git`) to remotes
* Properly have `href` field from SSH server discovery be optional
* Do not remove/re-add `/info/lfs` to `lfs.url` config and use it
  directly as LFS API endpoint
Copy link
Copy Markdown

@lilyinstarlight lilyinstarlight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and everything worked correctly when tested after latest change!

@gmpify gmpify merged commit 1b90e86 into tecnix-gcs Mar 24, 2026
8 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants