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

Re: [RFC] introduce GIT_WORK_DIR environment variable

From: Nguyen Thai Ngoc Duy <hidden>
Date: 2016-06-15 22:42:59

On 3/11/07, Matthias Lederhofer [off-list ref] wrote:
quoted hunk ↗ jump to hunk
diff --git a/environment.c b/environment.c
index 0151ad0..5c30c9b 100644
--- a/environment.c
+++ b/environment.c
@@ -61,6 +61,8 @@ int is_bare_repository(void)
        const char *dir, *s;
        if (0 <= is_bare_repository_cfg)
                return is_bare_repository_cfg;
+       if (0 <= has_working_directory)
+               return !has_working_directory;

        dir = get_git_dir();
        if (!strcmp(dir, DEFAULT_GIT_DIR_ENVIRONMENT))
Um.. git-sh-setup.sh may need special treatment because its
is_bare_directory doesn't call this function.
-- 
Duy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help