Thread (15 messages) 15 messages, 2 authors, 2016-06-15

Re: [PATCH 3/5] introduce GIT_WORK_TREE environment variable

flat view

From: Matthias Lederhofer <hidden>
Date: 2016-06-15 22:43:00

Possibly related (same subject, not in this thread)

Matthias Lederhofer [off-list ref] wrote:
quoted hunk ↗ jump to hunk
diff --git a/setup.c b/setup.c
[..]
quoted hunk ↗ jump to hunk
 const char *setup_git_directory_gently(int *nongit_ok)
 {
 	static char cwd[PATH_MAX+1];
@@ -199,21 +211,93 @@ const char *setup_git_directory_gently(int *nongit_ok)
 	int len, offset;
 
 	/*
-	 * If GIT_DIR is set explicitly, we're not going
-	 * to do any discovery, but we still do repository
-	 * validation.
+	 * If GIT_DIR is set explicitly, we do repository validation
+	 * and check for GIT_WORK_TREE as working tree.
 	 */
 	gitdirenv = getenv(GIT_DIR_ENVIRONMENT);
 	if (gitdirenv) {
+		const char *gitwt;
+		char worktree[PATH_MAX+1], gitdir[PATH_MAX+1];
+		int len;
                ^^^^^^^^
This is not really needed because there is already a variable len of
the same type.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help