MCPcopy Create free account
hub / github.com/git/git / wt_status_check_rebase

Function wt_status_check_rebase

wt-status.c:1745–1773  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1743}
1744
1745int wt_status_check_rebase(const struct worktree *wt,
1746 struct wt_status_state *state)
1747{
1748 struct stat st;
1749
1750 if (!wt)
1751 BUG("wt_status_check_rebase() called with NULL worktree");
1752
1753 if (!stat(worktree_git_path(wt, "rebase-apply"), &st)) {
1754 if (!stat(worktree_git_path(wt, "rebase-apply/applying"), &st)) {
1755 state->am_in_progress = 1;
1756 if (!stat(worktree_git_path(wt, "rebase-apply/patch"), &st) && !st.st_size)
1757 state->am_empty_patch = 1;
1758 } else {
1759 state->rebase_in_progress = 1;
1760 state->branch = get_branch(wt, "rebase-apply/head-name");
1761 state->onto = get_branch(wt, "rebase-apply/onto");
1762 }
1763 } else if (!stat(worktree_git_path(wt, "rebase-merge"), &st)) {
1764 if (!stat(worktree_git_path(wt, "rebase-merge/interactive"), &st))
1765 state->rebase_interactive_in_progress = 1;
1766 else
1767 state->rebase_in_progress = 1;
1768 state->branch = get_branch(wt, "rebase-merge/head-name");
1769 state->onto = get_branch(wt, "rebase-merge/onto");
1770 } else
1771 return 0;
1772 return 1;
1773}
1774
1775int wt_status_check_bisect(const struct worktree *wt,
1776 struct wt_status_state *state)

Callers 3

wt_status_get_stateFunction · 0.85

Calls 3

worktree_git_pathFunction · 0.85
get_branchFunction · 0.85
statClass · 0.70

Tested by

no test coverage detected