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

Re: [PATCH] git-init: set core.workdir when GIT_WORK_DIR is specified

flat view

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

Possibly related (same subject, not in this thread)

Here is a new patch series replacing ml/workdir.

Changes:
 * rename GIT_WORK_DIR to GIT_WORK_TREE, --work-dir to --work-tree and
   core.workdir to core.worktree
 * use getcwd and prefixcmp instead of stat to check if cwd is below
   GIT_DIR or GIT_WORK_TREE
 * rename 'has_working_directory' to 'inside_working_tree'

The first two patches have not changed except for their order in the
series but I repost them anyway for easier review.

Things I'm not sure about how/if to change (see my last mail too)
 * is_bare_repository() uses the old check
       /* definitely bare */
       if (is_bare_repository_cfg == 1)
               return 1;
       /* GIT_WORK_TREE is set, bare if cwd is outside */
       if (inside_working_tree >= 0)
               return !inside_working_tree;
       /* configuration says it is not bare */
       if (is_bare_repository_cfg == 0)
               return 0;
 * is_bare_repository() in general
 * git init does not show the expansion of GIT_WORK_TREE to an
   absolute path, this might confuse the user
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help