desktop / desktop/dugite

Add a hook to disable Git download and use Git distributed with OS

Open
#182 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
516
Forks
154
PR merge metrics
No merged PRs in 30d

Description

Would it be possible to add a hook to `dugite` to disable any attempt at downloading a Git distribution at installation time and instead use the `git` binaries distributed with the system?

My need for this is twofold:

1. I'm using `dugite` (actually [surf-build](https://github.com/surf-build/surf) which depends on it in the latest betas) on platforms for which you don't distribute native binaries and probably never will (various BSDs).
2. Even on platforms where you do distribute native binaries, I'd prefer to use the system distribution rather than some random binary from the Internet.

I'm aware of `LOCAL_GIT_DIRECTORY` and `GIT_EXEC_PATH`, however those variables only have an effect at execution time, not at `npm install` time.

FWIW, you should be able to easily script detecting if Git is already correctly installed by attempting to run e.g. `git --version` and if successful using the output of `git --exec-path`.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the npm install path that currently downloads a Git distribution, then review the existing LOCAL_GIT_DIRECTORY and GIT_EXEC_PATH behavior. Check whether git --version succeeds and what git --exec-path returns; done means an installation hook can skip downloading and use the system Git across the stated platforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, node.js, typescript
Domain
build-system, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.