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

Function advice_enabled

advice.c:132–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132int advice_enabled(enum advice_type type)
133{
134 int enabled = advice_setting[type].level != ADVICE_LEVEL_DISABLED;
135 static int globally_enabled = -1;
136
137 if (globally_enabled < 0)
138 globally_enabled = git_env_bool(GIT_ADVICE_ENVIRONMENT, 1);
139 if (!globally_enabled)
140 return 0;
141
142 if (type == ADVICE_PUSH_UPDATE_REJECTED)
143 return enabled &&
144 advice_enabled(ADVICE_PUSH_UPDATE_REJECTED_ALIAS);
145
146 return enabled;
147}
148
149void advise_if_enabled(enum advice_type type, const char *advice, ...)
150{

Callers 15

error_dirty_indexFunction · 0.85
print_commit_summaryFunction · 0.85
create_seq_dirFunction · 0.85
sequencer_skipFunction · 0.85
format_branch_comparisonFunction · 0.85
format_tracking_infoFunction · 0.85
wt_longstatus_printFunction · 0.85
advise_if_enabledFunction · 0.85

Calls 1

git_env_boolFunction · 0.85

Tested by

no test coverage detected