* 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. */
| 169 | * error. |
| 170 | */ |
| 171 | static 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 |
no test coverage detected