Skip to content

A simple git wrapper that waits until index.lock file is removed when present before running the command.

License

Notifications You must be signed in to change notification settings

darshanparajuli/git-wait

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>

About

A simple git wrapper that waits until index.lock file is removed when present before running the command.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages