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

Re: [PATCH] Preserve cwd in setup_git_directory()

From: Johannes Sixt <hidden>
Date: 2016-06-15 22:45:00

Nguyễn Thái Ngọc Duy schrieb:
quoted hunk ↗ jump to hunk
--- a/setup.c
+++ b/setup.c
@@ -577,10 +577,14 @@ const char *setup_git_directory(void)
 	/* If the work tree is not the default one, recompute prefix */
 	if (inside_work_tree < 0) {
 		static char buffer[PATH_MAX + 1];
+		static char cwd[PATH_MAX + 1];
 		char *rel;
+		getcwd(cwd, PATH_MAX);
This needs an error check.

-- Hannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help