git_operations.ts

view source

Declarations
#

3 declarations

git_add
#

git_operations.ts view source

(files: string | string[], options?: SpawnOptions | undefined): Promise<void> import {git_add} from '@fuzdev/fuz_repos/git_operations.js';

Adds files to git staging area and throws if anything goes wrong.

files

type string | string[]

options?

type SpawnOptions
optional

returns

Promise<void>

git_commit
#

git_operations.ts view source

(message: string, files: string[], options?: SpawnOptions | undefined): Promise<void> import {git_commit} from '@fuzdev/fuz_repos/git_operations.js';

Commits files alone with a message, leaving anything else staged out of the commit, and throws if anything goes wrong. files must be non-empty: an empty list would commit the whole index.

message

type string

files

type string[]

options?

type SpawnOptions
optional

returns

Promise<void>

git_current_commit_hash_required
#

git_operations.ts view source

(options?: SpawnOptions | undefined): Promise<string> import {git_current_commit_hash_required} from '@fuzdev/fuz_repos/git_operations.js';

Wrapper for gro's git_current_commit_hash that reads HEAD and throws if null.

options?

type SpawnOptions
optional

returns

Promise<string>

Imported by
#