summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ef5404a)
raw | patch | inline | side by side (parent: ef5404a)
author | Jonas Fonseca <fonseca@diku.dk> | |
Wed, 14 Jun 2006 19:38:03 +0000 (21:38 +0200) | ||
committer | Jonas Fonseca <fonseca@antimatter.localdomain> | |
Wed, 14 Jun 2006 19:39:48 +0000 (21:39 +0200) |
So now you can use both:
set commit-encoding = "UTF-8"
set commit-encoding = 'UTF-8'
set commit-encoding = UTF-8
set commit-encoding = "UTF-8"
set commit-encoding = 'UTF-8'
set commit-encoding = UTF-8
tig.c | patch | blob | history |
index cda8a71e9a7d15882b82eb672c788257dfb00f09..a3b92c851d5b43bb98dd597344099a0d907d1ecd 100644 (file)
--- a/tig.c
+++ b/tig.c
}
if (!strcmp(argv[0], "commit-encoding")) {
- string_copy(opt_encoding, argv[2]);
- return OK;
+ char *arg = argv[2];
+ int delimiter = *arg;
+ int i;
+
+ switch (delimiter) {
+ case '"':
+ case '\'':
+ for (arg++, i = 0; arg[i]; i++)
+ if (arg[i] == delimiter) {
+ arg[i] = 0;
+ break;
+ }
+ default:
+ string_copy(opt_encoding, arg);
+ return OK;
+ }
}
config_msg = "Unknown variable name";