| 156 | // --------------------------------------------------------------- |
| 157 | |
| 158 | function printHelp(): GitCliResult { |
| 159 | const lines = [ |
| 160 | "usage: git <command> [<args>]", |
| 161 | "", |
| 162 | "Supported workspace git commands:", |
| 163 | " add Stage paths into the index.", |
| 164 | " branch Create, delete, or list branches.", |
| 165 | " cat-file Read raw bytes for an object by oid.", |
| 166 | " checkout Move HEAD to a ref, or restore paths.", |
| 167 | " clean Remove untracked files from the working tree.", |
| 168 | " clone Clone a remote repository into the workspace.", |
| 169 | " commit Write the current index to a new commit.", |
| 170 | " config Read or write a config key.", |
| 171 | " diff Show changes between HEAD and the working tree.", |
| 172 | " fetch Fetch refs from a remote.", |
| 173 | " hash-object Hash bytes as a blob (optionally write).", |
| 174 | " init Initialise a new repository.", |
| 175 | " log List commits reachable from HEAD.", |
| 176 | " ls-files List files in the index (or at a ref).", |
| 177 | " ls-tree List one level of a tree.", |
| 178 | " merge Merge a ref into the current branch.", |
| 179 | " pull Fetch and merge in one step.", |
| 180 | " push Push local refs to a remote.", |
| 181 | " remote Manage configured remotes.", |
| 182 | " reset Unstage paths or hard-reset to a ref.", |
| 183 | " rev-parse Resolve a ref to its SHA-1 oid.", |
| 184 | " rm Unstage paths from the index.", |
| 185 | " show Read a single commit.", |
| 186 | " stash Stash and restore working-tree changes.", |
| 187 | " status Describe the working-tree / index / HEAD delta.", |
| 188 | " switch Switch branches, or create one with -c.", |
| 189 | " symbolic-ref Print the current branch name.", |
| 190 | " tag Create, delete, or list tags.", |
| 191 | " update-ref Write a ref directly.", |
| 192 | " help Show this help.", |
| 193 | " version Print the workspace git wrapper version.", |
| 194 | "", |
| 195 | ]; |
| 196 | return { stdout: `${lines.join("\n")}`, stderr: "", exitCode: 0 }; |
| 197 | } |
| 198 | |
| 199 | function printVersion(): GitCliResult { |
| 200 | // Deliberately not impersonating a real git version string. |