MCPcopy Index your code
hub / github.com/git/git / wt_longstatus_print

Function wt_longstatus_print

wt-status.c:1890–2014  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1888}
1889
1890static void wt_longstatus_print(struct wt_status *s)
1891{
1892 const char *branch_color = color(WT_STATUS_ONBRANCH, s);
1893 const char *branch_status_color = color(WT_STATUS_HEADER, s);
1894 enum fsmonitor_mode fsm_mode = fsm_settings__get_mode(s->repo);
1895
1896 if (s->branch) {
1897 const char *on_what = _("On branch ");
1898 const char *branch_name = s->branch;
1899 if (!strcmp(branch_name, "HEAD")) {
1900 branch_status_color = color(WT_STATUS_NOBRANCH, s);
1901 if (s->state.rebase_in_progress ||
1902 s->state.rebase_interactive_in_progress) {
1903 if (s->state.rebase_interactive_in_progress)
1904 on_what = _("interactive rebase in progress; onto ");
1905 else
1906 on_what = _("rebase in progress; onto ");
1907 branch_name = s->state.onto;
1908 } else if (s->state.detached_from) {
1909 branch_name = s->state.detached_from;
1910 if (s->state.detached_at)
1911 on_what = _("HEAD detached at ");
1912 else
1913 on_what = _("HEAD detached from ");
1914 } else {
1915 branch_name = "";
1916 on_what = _("Not currently on any branch.");
1917 }
1918 } else
1919 skip_prefix(branch_name, "refs/heads/", &branch_name);
1920 status_printf(s, color(WT_STATUS_HEADER, s), "%s", "");
1921 status_printf_more(s, branch_status_color, "%s", on_what);
1922 status_printf_more(s, branch_color, "%s\n", branch_name);
1923 if (!s->is_initial)
1924 wt_longstatus_print_tracking(s);
1925 }
1926
1927 wt_longstatus_print_state(s);
1928
1929 if (s->is_initial) {
1930 status_printf_ln(s, color(WT_STATUS_HEADER, s), "%s", "");
1931 status_printf_ln(s, color(WT_STATUS_HEADER, s),
1932 s->commit_template
1933 ? _("Initial commit")
1934 : _("No commits yet"));
1935 status_printf_ln(s, color(WT_STATUS_HEADER, s), "%s", "");
1936 }
1937
1938 wt_longstatus_print_updated(s);
1939 wt_longstatus_print_unmerged(s);
1940 wt_longstatus_print_changed(s);
1941 if (s->submodule_summary &&
1942 (!s->ignore_submodule_arg ||
1943 strcmp(s->ignore_submodule_arg, "all"))) {
1944 wt_longstatus_print_submodule_summary(s, 0); /* staged */
1945 wt_longstatus_print_submodule_summary(s, 1); /* unstaged */
1946 }
1947 if (s->show_untracked_files) {

Callers 1

wt_status_printFunction · 0.85

Calls 15

fsm_settings__get_modeFunction · 0.85
status_printfFunction · 0.85
status_printf_moreFunction · 0.85
status_printf_lnFunction · 0.85
advice_enabledFunction · 0.85

Tested by

no test coverage detected