chiark
/
gitweb
/
~mdw
/
tig
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9989bf6
)
Load config before parsing command line options so they can override
author
Jonas Fonseca
<fonseca@diku.dk>
Wed, 24 May 2006 21:12:28 +0000
(23:12 +0200)
committer
Jonas Fonseca
<fonseca@antimatter.localdomain>
Wed, 24 May 2006 21:12:28 +0000
(23:12 +0200)
tig.c
patch
|
blob
|
blame
|
history
diff --git
a/tig.c
b/tig.c
index 49c2492f919168e15c96f562b21ae645104814a8..4c60855595f97e13fa66512ae69bd54855466f77 100644
(file)
--- a/
tig.c
+++ b/
tig.c
@@
-436,6
+436,9
@@
parse_options(int argc, char *argv[])
}
}
+ if (*opt_encoding && strcasecmp(opt_encoding, "UTF-8"))
+ opt_utf8 = FALSE;
+
return TRUE;
}
return TRUE;
}
@@
-2472,6
+2475,11
@@
main(int argc, char *argv[])
signal(SIGINT, quit);
signal(SIGINT, quit);
+ /* Load the repo config file first so options can be overwritten from
+ * the command line. */
+ if (load_config() == ERR)
+ die("Failed to load repo config.");
+
if (!parse_options(argc, argv))
return 0;
if (!parse_options(argc, argv))
return 0;
@@
-2482,15
+2490,9
@@
main(int argc, char *argv[])
if (refs_size == 0 && opt_request != REQ_VIEW_PAGER)
die("Not a git repository");
if (refs_size == 0 && opt_request != REQ_VIEW_PAGER)
die("Not a git repository");
- if (load_config() == ERR)
- die("Failed to load repo config.");
-
for (i = 0; i < ARRAY_SIZE(views) && (view = &views[i]); i++)
view->cmd_env = getenv(view->cmd_env);
for (i = 0; i < ARRAY_SIZE(views) && (view = &views[i]); i++)
view->cmd_env = getenv(view->cmd_env);
- if (*opt_encoding && strcasecmp(opt_encoding, "UTF-8"))
- opt_utf8 = FALSE;
-
request = opt_request;
init_display();
request = opt_request;
init_display();