Skip to main content

rebase_in_progress

Function rebase_in_progress 

Source
pub async fn rebase_in_progress(repo_dir: &Path) -> bool
Expand description

Check whether a rebase is currently in progress.

Git creates .git/rebase-merge (for interactive/standard rebase) or .git/rebase-apply (for git am / git rebase --apply) while a rebase is active. Worktrees store these under .git/worktrees/<name>/ instead, so we use git rev-parse --git-dir to find the correct location.