Thread (20 messages) flat view 20 messages, 5 authors, 2016-06-15

Re: Garbage in .git directories???

From: Petr Baudis <hidden>
Date: 2016-06-15 22:42:06
Subsystem: the rest · Maintainer: Linus Torvalds

Dear diary, on Tue, Sep 20, 2005 at 01:16:14AM CEST, I got a letter
where "H. Peter Anvin" [off-list ref] told me that...
Petr Baudis wrote:
quoted
quoted
FWIW, using cg-clone (using git-core 0.99.6 and cogito 0.14.1) I keep 
finding a directory in .git which consists of a single DEL character 
(\177).
Does cg-init produce it too? It really seems that this has to be a bug
in git-init-db. If that is the case, could you try temporarily renaming
the templates directory?
cg-init does produce it, too.  I'm not sure what you mean with 
temporarily renaming the templates directory?
Preventing git-init-db to copy its stuff into your .git/ - I think the
bug is likely somewhere there. Actually, this can be prevented by
passing an argument to git-init-db:

	git-init-db --template=somethingnonexisting

Another idea - try this patch:
diff --git a/init-db.c b/init-db.c
--- a/init-db.c
+++ b/init-db.c
@@ -154,6 +154,7 @@ static void copy_templates(const char *g
 	}
 
 	memcpy(path, git_dir, len);
+	path[len] = 0;
 	copy_templates_1(path, len,
 			 template_path, template_len,
 			 dir);
-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help