# \[RFC PATCH 24/35\] pull: move configuration fetches

- From: Felipe Contreras \<hidden\>
- Date: 2021-07-05 12:32:56 
- List: git
- Page: https://ratatoskr.run/git/2021/07/7894187
- Thread: https://ratatoskr.run/git/2021/07/7894163/t.md

```text
Now that we have REBASE_DEFAULT we can fetch the configuration before
parsing the argument options.

The options will override the configuration, and if they don't;
opt_rebase will remain being REBASE_DEFAULT.

Signed-off-by: Felipe Contreras <redacted>
---
 builtin/pull.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/builtin/pull.c b/builtin/pull.c
index 94fc8b0739..61af8ea2cb 100644
--- a/builtin/pull.c
+++ b/builtin/pull.c
@@ -949,6 +949,9 @@ int cmd_pull(int argc, const char **argv, const char *prefix)
 	struct object_id rebase_fork_point;
 	int can_ff;
 
+	opt_ff = xstrdup_or_null(config_get_ff());
+	opt_rebase = config_get_rebase();
+
 	if (!getenv("GIT_REFLOG_ACTION"))
 		set_reflog_message(argc, argv);
 
@@ -965,12 +968,6 @@ int cmd_pull(int argc, const char **argv, const char *prefix)
 
 	parse_repo_refspecs(argc, argv, &repo, &refspecs);
 
-	if (!opt_ff)
-		opt_ff = xstrdup_or_null(config_get_ff());
-
-	if (!opt_rebase)
-		opt_rebase = config_get_rebase();
-
 	if (read_cache_unmerged())
 		die_resolve_conflict("pull");
 
-- 
2.32.0.36.g70aac2b1aa

```
