git-wait

Crates.iogit-wait
lib.rsgit-wait
version
sourcesrc
created_at2024-11-27 08:04:41.022673
updated_at2024-12-01 19:10:13.48072
descriptionA simple wrapper utility around git that waits until index.lock file is no longer present running the command.
homepage
repositoryhttps://github.com/darshanparajuli/git-wait
max_upload_size
id1462761
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Darshan Parajuli (darshanparajuli)

documentation

README

git-wait

A simple wrapper utility around git that waits until index.lock file is no longer present before forwarding all the args to git and running the command. This is especially useful when there are potentially other git commands running on the same repo.

Installation

  1. Ensure Rust is installed.
  2. Run cargo install git-wait.

Usage

git-wait <git args>

The set-it-and-forget-it approach:

# Put this in your shell config.
alias git=git-wait

Timeout can be set by setting GIT_WAIT_TIMEOUT_MS env var. It is in milliseconds.

# 5-second timeout:
$ GIT_WAIT_TIMEOUT_MS=5000 git-wait status

Example

$ git-wait status
$ git-wait push

When index.lock is present:

$ git-wait status
Waiting on index.lock... done!
<regular git status output>
Commit count: 15

cargo fmt