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

Function config_get_ff

builtin/pull.c:171–189  ·  view source on GitHub ↗

* If pull.ff is unset, returns NULL. If pull.ff is "true", returns "--ff". If * pull.ff is "false", returns "--no-ff". If pull.ff is "only", returns * "--ff-only". Otherwise, if pull.ff is set to an invalid value, die with an * error. */

Source from the content-addressed store, hash-verified

169 * error.
170 */
171static const char *config_get_ff(void)
172{
173 const char *value;
174
175 if (repo_config_get_value(the_repository, "pull.ff", &value))
176 return NULL;
177
178 switch (git_parse_maybe_bool(value)) {
179 case 0:
180 return "--no-ff";
181 case 1:
182 return "--ff";
183 }
184
185 if (!strcmp(value, "only"))
186 return "--ff-only";
187
188 die(_("invalid value for '%s': '%s'"), "pull.ff", value);
189}
190
191/**
192 * Returns the default configured value for --rebase. It first looks for the

Callers 1

cmd_pullFunction · 0.85

Calls 3

repo_config_get_valueFunction · 0.85
git_parse_maybe_boolFunction · 0.85
dieFunction · 0.50

Tested by

no test coverage detected