git-for-windows / git

A fork of Git containing Windows-specific patches.
http://gitforwindows.org/
Other
8.27k stars 2.51k forks source link

busybox.exe --list instead of busybox.exe --help #4440

Open ale5000-git opened 1 year ago

ale5000-git commented 1 year ago

Setup

$ git --version --build-options

git version 2.40.1.windows.1
cpu: x86_64
built from commit: ceee26d5cac05a3437097b43d034c4ad2e99d571
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
$ cmd.exe /c ver

Microsoft Windows [Versione 10.0.19045.2965]
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
> type "$env:USERPROFILE\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

Editor Option: Notepad++
Custom Editor Path:
Default Branch Option: main
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: OpenSSL
CRLF Option: CRLFCommitAsIs
Bash Terminal Option: ConHost
Git Pull Behavior Option: Rebase
Use Credential Manager: Disabled
Performance Tweaks FSCache: Enabled
Enable Symlinks: Enabled
Enable Pseudo Console Support: Disabled
Enable FSMonitor: Enabled

Details

In this change: https://github.com/git-for-windows/git/commit/823569827130c487ab313cbdbc8083ac2fbba530 it parse the output of busybox.exe --help to find out what applets are included but I think that instead parsing busybox.exe --list would be easier and more correct.

What do you think?

dscho commented 1 year ago

I am seriously side-tracked for, oh gosh, almost 2 years already? Time flies, from https://github.com/git-for-windows/git/pull/3301, which would be a better approach. That approach does not even require busybox.exe to be called to list applets because only sh would be overridden, any applet would have to be called via sh.