| Crates.io | git-wait |
| lib.rs | git-wait |
| version | 0.4.0 |
| created_at | 2024-11-27 08:04:41.022673+00 |
| updated_at | 2024-12-01 19:10:13.48072+00 |
| description | A simple wrapper utility around git that waits until index.lock file is no longer present running the command. |
| homepage | |
| repository | https://github.com/darshanparajuli/git-wait |
| max_upload_size | |
| id | 1462761 |
| size | 19,936 |
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.
cargo install git-wait.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
$ git-wait status
$ git-wait push
When index.lock is present:
$ git-wait status
Waiting on index.lock... done!
<regular git status output>