Skip to content

Commit

Permalink
docs: spelling and grammar fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Nov 14, 2023
1 parent be35ad4 commit dae4aa3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions cmd/add-doc.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
This command will try to build the following structure in repository:
├───.git
│ └───hooks
│ └───pre-commit // this executable will be added. Existed file with
│ └───pre-commit // this executable will be added. Existing file with
│ // same name will be renamed to pre-commit.old
(lefthook add this dirs if you run command with -d option)
(lefthook adds these dirs if you run the command with the -d option)
├───.lefthook // directory for project level hooks
│ └───pre-commit // directory with hooks executables
└───.lefthook-local // directory for personal hooks add it in .gitignore
│ └───pre-commit // directory with hook executables
└───.lefthook-local // directory for personal hooks; add it in .gitignore
└───pre-commit
2 changes: 1 addition & 1 deletion cmd/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func newAddCmd(opts *lefthook.Options) *cobra.Command {

addCmd := cobra.Command{
Use: "add hook-name",
Short: "This command add a hook directory to a repository",
Short: "This command adds a hook directory to a repository",
Long: addDoc,
Example: "lefthook add pre-commit",
Args: cobra.MinimumNArgs(1),
Expand Down
6 changes: 3 additions & 3 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ Use cases:

- You have a GUI program that runs git hooks (e.g., VSCode)
- You reference executables that are accessible only from a tweaked $PATH environment variable (e.g., when using rbenv or nvm)
- Or even if your GUI programm cannot locate the `lefthook` executable :scream:
- Or even if your GUI program cannot locate the `lefthook` executable :scream:
- Or if you want to use ENV variables that control the executables behavior in `lefthook.yml`

```bash
Expand Down Expand Up @@ -305,7 +305,7 @@ This can be changed in the future. For convenience, please use `remote` configur

### `git_url`

A URL to Git repository. It will be accessed with priveleges of the machine lefthook runs on.
A URL to Git repository. It will be accessed with privileges of the machine lefthook runs on.

**Example**

Expand Down Expand Up @@ -1085,7 +1085,7 @@ Whether to use interactive mode. This applies the certain behavior:

**Note**

If you want to pass stdin to your command or script but don't need to get the input from CLI, use [`use_stdin`](#use_stdin) option isntead.
If you want to pass stdin to your command or script but don't need to get the input from CLI, use [`use_stdin`](#use_stdin) option instead.

## Script

Expand Down
2 changes: 1 addition & 1 deletion internal/git/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (o *OsExec) CmdLines(cmd string) ([]string, error) {
return strings.Split(out, "\n"), nil
}

// CmdArgs runs a command provided with separted words. Trims spaces around output.
// CmdArgs runs a command provided with separated words. Trims spaces around output.
func (o *OsExec) CmdArgs(args ...string) (string, error) {
out, err := o.rawExecArgs(args...)
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions internal/lefthook/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ func (l *Lefthook) Run(hookName string, args RunArgs, gitArgs []string) error {
return err
}

// Suppress prepare-commit-msg output if the hook doesn't exists in config.
// prepare-commit-msg hook is used for seemless synchronization of hooks with config.
// Suppress prepare-commit-msg output if the hook doesn't exist in config.
// prepare-commit-msg hook is used for seamless synchronization of hooks with config.
// See: internal/lefthook/install.go
_, ok := cfg.Hooks[hookName]
if hookName == config.GhostHookName && !ok && !verbose {
Expand Down Expand Up @@ -136,7 +136,7 @@ Run 'lefthook install' manually.`,
}

if cfg.Remote.Configured() {
// Apend only source_dir, because source_dir_local doesn't make sense
// Append only source_dir, because source_dir_local doesn't make sense
sourceDirs = append(
sourceDirs,
filepath.Join(
Expand Down

0 comments on commit dae4aa3

Please sign in to comment.