Thread (9 messages) flat view 9 messages, 3 authors, 2016-06-15

Re: [PATCH 41/68] init: use strbufs to store paths

From: Torsten Bögershausen <hidden>
Date: 2016-06-15 23:06:45

Possibly related (same subject, not in this thread)

On 03.10.15 18:54, Junio C Hamano wrote:
Torsten Bögershausen [off-list ref] writes:
quoted
On 30.09.15 02:23, Jeff King wrote:
quoted
On Tue, Sep 29, 2015 at 04:50:39PM -0700, Michael Blume wrote:
quoted
I see compile errors on my mac:
This is my attempt, passing the test, but not fully polished.
Thanks.
quoted
diff --git a/builtin/init-db.c b/builtin/init-db.c
index 89f2c05..60b559c 100644
--- a/builtin/init-db.c
+++ b/builtin/init-db.c
@@ -276,7 +276,9 @@ static int create_default_files(const char *template_path)
 		path = git_path_buf(&buf, "CoNfIg");
 		if (!access(path, F_OK))
 			git_config_set("core.ignorecase", "true");
-		probe_utf8_pathname_composition(path);
+		/* Probe utf-8 normalization withou mangling CoNfIG */
+		path = git_path_buf(&buf, "config");
+		probe_utf8_pathname_composition(path, strlen(path));
Hmph, Peff's quick-fix passed the original "CoNfIg" in &buf directly
to probe_utf8_pathname_composition() without changing its signature.
True, ( I was thinking that the test did only work on case insensitive FS).
We can skip that change.

Beside that, I later realized, that a better signature could be:
+void probe_utf8_pathname_composition(const char *path, size_t len)

I can send a proper patch the next days.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help